/* ============================================================
 * 企业诊断智能辅助管理系统 - 全局样式
 * 设计语言：现代 SaaS · 简洁专业（浅色侧边栏 / 靛蓝主色 / 发丝边框 + 极轻阴影）
 * ============================================================ */

:root {
  /* 主色：靛蓝 indigo */
  --primary: #3157d5;
  --primary-dark: #2446b8;
  --primary-light: #dbe7ff;
  --primary-50: #edf3ff;
  /* 语义色 */
  --accent: #059669;
  --accent-light: #d1fae5;
  --warn: #d97706;
  --warn-light: #fef3c7;
  --danger: #e11d48;
  --danger-light: #ffe4e6;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --cyan: #0891b2;
  --cyan-light: #cffafe;
  /* 中性色 */
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #172033;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e5eaf2;
  --border-strong: #d8e0eb;
  /* 侧边栏（浅色） */
  --sidebar-bg: #ffffff;
  --sidebar-text: #52525b;
  --sidebar-active: var(--primary);
  /* 圆角与阴影 */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(30,41,59,0.035);
  --shadow-md: 0 12px 30px -18px rgba(30,41,59,0.28), 0 2px 8px -4px rgba(30,41,59,0.1);
  --shadow-lg: 0 28px 70px -24px rgba(30,41,59,0.34);
  --ring: 0 0 0 3px rgba(49,87,213,0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; background-clip: content-box; }

/* ============ 登录页 ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f7f8fa 0%, #eef2ff 55%, #e0e7ff 100%);
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.16) 0%, transparent 70%);
  top: -220px; right: -120px;
  filter: blur(8px);
}
.login-page::after {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5,150,105,0.12) 0%, transparent 70%);
  bottom: -200px; left: -120px;
  filter: blur(8px);
}
.login-box {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 20px;
  padding: 44px 40px;
  width: 420px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-logo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 10px 24px -6px rgba(79,70,229,0.5);
}
.login-title { text-align: center; font-size: 21px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.login-subtitle { text-align: center; font-size: 13px; color: var(--text-muted); margin: 7px 0 30px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 13px; color: var(--text); margin-bottom: 7px; font-weight: 500; }
.login-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-field input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.role-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.role-option {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
  background: white;
}
.role-option:hover { border-color: var(--primary); background: var(--primary-50); }
.role-option.active { border-color: var(--primary); background: var(--primary-50); box-shadow: var(--ring); }
.role-option .icon { font-size: 22px; }
.role-option .name { font-size: 13px; font-weight: 600; margin-top: 4px; }
.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px -4px rgba(79,70,229,0.5);
}
.login-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px -4px rgba(79,70,229,0.55); }
.login-btn:active { transform: translateY(0); }
.login-footer { text-align: center; font-size: 12px; color: var(--text-light); margin-top: 18px; }

/* ============ 主框架布局 ============ */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.sidebar-logo {
  padding: 18px 18px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -4px rgba(79,70,229,0.45);
}
.sidebar-logo .logo-text { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.3; letter-spacing: -0.01em; }
.sidebar-logo .logo-text small { display: block; font-size: 11px; font-weight: 400; color: var(--text-light); letter-spacing: 0; }
.nav-menu { flex: 1; overflow-y: auto; padding: 10px 10px; }
.nav-group {
  padding: 14px 12px 6px;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  cursor: pointer;
  transition: color 0.13s, background-color 0.13s, border-color 0.13s;
  border-radius: 10px;
  margin: 1px 0;
  font-size: 13.5px;
  color: var(--sidebar-text);
  font-weight: 500;
}
.nav-item:hover { background: #f4f4f5; color: var(--text); }
.nav-item.active {
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 600;
}
.nav-item .nav-icon { font-size: 17px; width: 22px; text-align: center; }
.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-light);
}

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 60px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 26px;
  gap: 16px;
  flex-shrink: 0;
}
.topbar-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.topbar-breadcrumb { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  gap: 6px;
  width: 240px;
}
.topbar-search input { border: none; background: transparent; outline: none; width: 100%; font-size: 13px; }
.topbar-search .icon { color: var(--text-light); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 6px;
  border-radius: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.user-chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.user-chip .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.user-chip .info .name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-chip .info .role { font-size: 11px; color: var(--text-muted); }

.content {
  flex: 1;
  overflow-y: auto;
  padding: 26px;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.page-header .sub { font-size: 13px; color: var(--text-muted); margin-top: 5px; }
.page-actions { display: flex; gap: 10px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  background: white;
  color: var(--text);
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 6px -2px rgba(79,70,229,0.45); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px -3px rgba(79,70,229,0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { border-color: var(--border-strong); background: white; color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn-success { background: var(--accent); color: white; box-shadow: 0 2px 6px -2px rgba(5,150,105,0.4); }
.btn-success:hover { filter: brightness(0.96); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(0.96); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============ 卡片与统计 ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.stat-icon {
  width: 50px; height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-50); }
.stat-icon.green { background: var(--accent-light); }
.stat-icon.amber { background: var(--warn-light); }
.stat-icon.red { background: var(--danger-light); }
.stat-icon.purple { background: var(--purple-light); }
.stat-icon.cyan { background: var(--cyan-light); }
.stat-info .label { font-size: 12.5px; color: var(--text-muted); }
.stat-info .value { font-size: 25px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
.stat-info .trend { font-size: 12px; color: var(--accent); font-weight: 500; }

.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  overflow: hidden;
}
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: -0.01em; }
.panel-body { padding: 20px; }
.panel-body.no-pad { padding: 0; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left;
  padding: 11px 16px;
  background: #fafafa;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--primary-50); }
.data-table .actions-cell { display: flex; gap: 6px; }
.data-table .link { color: var(--primary); cursor: pointer; font-weight: 600; }
.data-table .link:hover { text-decoration: underline; }

/* ============ 状态标签 ============ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.6;
}
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: var(--accent-light); color: #047857; }
.tag-amber { background: var(--warn-light); color: #b45309; }
.tag-red { background: var(--danger-light); color: #be123c; }
.tag-purple { background: var(--purple-light); color: #6d28d9; }
.tag-cyan { background: var(--cyan-light); color: #0e7490; }
.tag-gray { background: #f4f4f5; color: var(--text-muted); }

.progress-bar {
  width: 100px;
  height: 6px;
  background: #eeeef0;
  border-radius: 4px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
.progress-bar .fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.progress-bar .fill.green { background: var(--accent); }
.progress-bar .fill.blue { background: var(--primary); }
.progress-bar .fill.amber { background: var(--warn); }
.progress-bar .fill.red { background: var(--danger); }

/* ============ 甘特图 ============ */
.gantt-wrap { overflow-x: auto; padding: 8px 0; }
.gantt {
  min-width: 1024px;
  position: relative;
  font-size: 12px;
}
.gantt-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.gantt-axis {
  position: relative;
  height: 22px;
}
.gantt-axis .axis-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-light);
}
.gantt-body {
  display: grid;
  grid-template-columns: 200px 1fr;
}
.gantt-rows { border-right: 1px solid var(--border); }
.gantt-row {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  gap: 8px;
  font-weight: 500;
  font-size: 12.5px;
  border-bottom: 1px solid #f4f4f5;
  overflow: hidden;
}
.gantt-row .link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-row .tag { flex-shrink: 0; }
.gantt-track { position: relative; border-bottom: 1px solid #f4f4f5; }
.gantt-track .track-line {
  position: absolute;
  top: 17px; left: 0; right: 0;
  height: 4px;
  background: #eeeef0;
  border-radius: 2px;
}
.gantt-bar {
  position: absolute;
  top: 9px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: white;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 2px 5px -1px rgba(0,0,0,0.18);
}
.gantt-bar.done { background: linear-gradient(135deg, var(--accent), #047857); }
.gantt-bar.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.gantt-bar.planned { background: linear-gradient(135deg, #a1a1aa, #71717a); }
.gantt-bar.lagging { background: linear-gradient(135deg, var(--danger), #be123c); }
.gantt-legend { display: flex; gap: 16px; padding: 12px 0 4px; font-size: 12px; color: var(--text-muted); }
.gantt-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

/* ============ 雷达图/图表容器 ============ */
.chart-box { width: 100%; height: 320px; }
.chart-box.sm { height: 240px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .chart-grid { grid-template-columns: 1fr; } }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(24,24,27,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}
.modal-mask.show { display: flex; }
.modal {
  background: white;
  border-radius: 16px;
  width: 560px;
  max-width: 92vw;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal.lg { width: 780px; }
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; padding: 4px; line-height: 1; border-radius: 6px; transition: color 0.15s, background-color 0.15s; }
.modal-close:hover { color: var(--text); background: var(--bg); }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-group label .req { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
  color: var(--text);
}
.form-control:focus { border-color: var(--primary); box-shadow: var(--ring); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ============ 文件库 ============ */
.file-lib { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.dir-tree { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.dir-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 2px;
  transition: background 0.15s;
}
.dir-item:hover { background: white; }
.dir-item.active { background: white; box-shadow: var(--shadow); font-weight: 600; }
.dir-item .count { margin-left: auto; background: var(--primary-light); color: var(--primary-dark); font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 600; }
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
  background: white;
}
.file-item:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.file-item .f-icon { font-size: 24px; }
.file-item .f-info { flex: 1; min-width: 0; }
.file-item .f-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .f-meta { font-size: 11.5px; color: var(--text-muted); }
.file-item .f-actions { display: flex; gap: 6px; }
.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
  margin-bottom: 16px;
  background: var(--bg);
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.upload-zone .big-icon { font-size: 36px; margin-bottom: 8px; }

/* ============ 三角验证 ============ */
.verify-flow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.verify-node {
  flex: 1;
  min-width: 150px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.verify-node .v-icon { font-size: 26px; }
.verify-node .v-name { font-weight: 600; margin-top: 6px; font-size: 13px; }
.verify-node .v-count { font-size: 12px; color: var(--text-muted); }
.verify-arrow { font-size: 22px; color: var(--primary); }
.verify-result {
  border-left: 3px solid var(--primary);
  background: var(--primary-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.verify-result.warn { border-left-color: var(--warn); background: var(--warn-light); }
.verify-result.ok { border-left-color: var(--accent); background: var(--accent-light); }
.verify-result .v-title { font-weight: 600; margin-bottom: 4px; }
.verify-result .v-text { font-size: 13px; }

/* ============ 技能卡片 ============ */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.skill-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  background: white;
  box-shadow: var(--shadow);
}
.skill-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.skill-card .s-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.skill-card .s-name { font-weight: 700; font-size: 14px; }
.skill-card .s-desc { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; min-height: 38px; }
.skill-card .s-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 8px; }
.skill-card .s-meta span { background: var(--bg); border: 1px solid var(--border); padding: 3px 8px; border-radius: 6px; }

/* ============ 详情页 ============ */
.detail-header {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.detail-avatar {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 8px 18px -6px rgba(79,70,229,0.45);
}
.detail-info h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.detail-info .tags { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.detail-meta { margin-left: auto; text-align: right; }
.detail-meta .m-item { font-size: 12.5px; color: var(--text-muted); margin-bottom: 4px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.info-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.info-item .k { font-size: 12px; color: var(--text-muted); }
.info-item .v { font-weight: 600; font-size: 14px; margin-top: 2px; }

/* ============ 时间线 ============ */
.visit-timeline { position: relative; padding-left: 30px; }
.visit-timeline::before {
  content: '';
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border-strong);
}
.visit-item { position: relative; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.visit-item::before {
  content: '';
  position: absolute;
  left: -26px; top: 5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
}
.visit-item.done::before { background: var(--accent); border-color: var(--accent); }
.visit-item.report::before { border-color: var(--purple); }
.visit-item .v-num { font-size: 11px; color: var(--text-light); font-weight: 600; }
.visit-item .v-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.visit-item .v-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.visit-item .v-date { font-size: 12px; color: var(--accent); margin-top: 3px; }

/* ============ Toast 通知 ============ */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  border-left: 4px solid var(--accent);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 340px;
}
.toast.success { border-left-color: var(--accent); }
.toast.warn { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--primary); }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============ 空状态 ============ */
.empty-state { text-align: center; padding: 52px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 44px; margin-bottom: 12px; }

/* ============ 筛选栏 ============ */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar .form-control { width: auto; min-width: 140px; }
.filter-bar .search-input { flex: 1; min-width: 200px; }

/* ============ 权限提示 ============ */
.permission-note {
  background: var(--warn-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: #b45309;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ 标签页 ============ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============ 打磨层：微交互 / 无障碍 / 排版细节 ============ */
::selection { background: rgba(79,70,229,0.18); }

/* 数字等宽对齐 */
.stat-info .value, .data-table td, .info-item .v, .gp .track, .pill b { font-variant-numeric: tabular-nums; }

/* 页面切换：内容渐次淡入 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
#content > * { animation: fadeUp 0.34s cubic-bezier(0.16, 1, 0.3, 1) both; }
#content > *:nth-child(2) { animation-delay: 0.04s; }
#content > *:nth-child(3) { animation-delay: 0.08s; }
#content > *:nth-child(4) { animation-delay: 0.12s; }
#content > *:nth-child(5) { animation-delay: 0.16s; }

/* 可键盘聚焦元素统一焦点环 */
.nav-item:focus-visible, .tab:focus-visible, .dir-item:focus-visible,
.link:focus-visible, .data-table .link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

/* 尊重系统「减少动效」偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .sidebar { width: 66px; }
  .sidebar-logo { justify-content: center; padding: 18px 8px; }
  .sidebar-logo .logo-text, .nav-item .nav-label, .nav-group, .sidebar-footer { display: none; }
  .nav-item { justify-content: center; padding: 11px; }
  .file-lib { grid-template-columns: 1fr; }
  .detail-header { flex-wrap: wrap; }
  .detail-meta { margin-left: 0; text-align: left; }
  .topbar-search { display: none; }
  .content { padding: 18px; }
}

/* ============================================================
 * 2026 云版界面重构层
 * 统一应用框架、业务密度、交互状态与移动端体验
 * ============================================================ */
.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 5000;
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--text);
  color: white;
  font-weight: 700;
  transition: top .18s ease;
}
.skip-link:focus { top: 14px; }

/* 登录：品牌说明与身份入口并列，宽屏表达平台可信度，窄屏保留核心表单 */
.login-page {
  background:
    radial-gradient(circle at 8% 12%, rgba(49,87,213,.15), transparent 28%),
    radial-gradient(circle at 92% 88%, rgba(11,155,122,.11), transparent 26%),
    linear-gradient(145deg, #edf3ff 0%, #f8fafc 46%, #eef7f4 100%);
}
.login-page::before {
  width: 720px;
  height: 720px;
  top: -420px;
  right: -260px;
  border: 1px solid rgba(49,87,213,.1);
  background: transparent;
  box-shadow: 0 0 0 80px rgba(255,255,255,.18), 0 0 0 160px rgba(255,255,255,.12);
}
.login-page::after {
  width: 460px;
  height: 460px;
  bottom: -300px;
  left: -180px;
  border: 1px solid rgba(11,155,122,.1);
  background: transparent;
}
.login-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 440px;
  width: min(1080px, 100%);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 26px;
  background: rgba(255,255,255,.7);
  box-shadow: 0 32px 90px -36px rgba(30,64,175,.34);
  backdrop-filter: blur(24px) saturate(1.1);
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1);
}
.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 64px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(150deg, rgba(20,42,97,.96), rgba(36,70,184,.94)),
    #2446b8;
}
.login-intro::after {
  content: '';
  position: absolute;
  right: -110px;
  bottom: -150px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 72px rgba(255,255,255,.035), 0 0 0 144px rgba(255,255,255,.025);
}
.login-brand { position: absolute; top: 36px; left: 44px; display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.login-brand span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.28); border-radius: 10px; background: rgba(255,255,255,.12); }
.login-kicker { margin-bottom: 18px; color: #bcd0ff; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.login-intro h1 { position: relative; z-index: 1; max-width: 540px; font-size: clamp(30px, 3vw, 44px); line-height: 1.28; letter-spacing: -.035em; }
.login-intro > p { position: relative; z-index: 1; max-width: 540px; margin-top: 22px; color: rgba(235,242,255,.82); font-size: 15px; line-height: 1.9; }
.login-capabilities { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 40px; }
.login-capabilities div { padding: 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.07); }
.login-capabilities strong, .login-capabilities span { display: block; }
.login-capabilities strong { margin-bottom: 4px; font-size: 14px; }
.login-capabilities span { color: rgba(235,242,255,.66); font-size: 11px; line-height: 1.5; }
.login-trust { position: absolute; bottom: 34px; left: 64px; color: rgba(235,242,255,.62); font-size: 11px; letter-spacing: .08em; }
.login-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  padding: 58px 52px;
  border: 0;
  border-radius: 0;
  background: rgba(255,255,255,.94);
  box-shadow: none;
  animation: none;
}
.login-logo { width: 48px; height: 48px; margin: 0 0 20px; border-radius: 13px; font-size: 17px; font-weight: 800; }
.login-title { text-align: left; font-size: 26px; letter-spacing: -.025em; }
.login-subtitle { margin: 5px 0 30px; text-align: left; }
.login-field { margin-bottom: 17px; }
.login-field input { min-height: 46px; padding: 11px 13px; }
.login-hint { min-height: 22px; margin: -4px 0 8px; color: var(--danger); font-size: 12px; }
.login-btn { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.login-demo { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.login-demo > span { width: 100%; color: var(--text-light); font-size: 11px; }
.login-demo button { padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; color: var(--text-muted); font-size: 11px; }
.login-demo button:hover, .login-demo button:focus-visible { border-color: var(--primary); color: var(--primary); background: var(--primary-50); outline: none; }
.login-footer { margin-top: 14px; text-align: left; }
.btn-spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 应用框架 */
.sidebar { width: 244px; z-index: 80; box-shadow: 8px 0 30px -26px rgba(30,41,59,.38); }
.sidebar-logo { min-height: 68px; padding: 15px 18px; }
.sidebar-logo .logo-icon { width: 38px; height: 38px; border-radius: 11px; font-size: 14px; font-weight: 800; }
.sidebar-logo .logo-text { font-size: 14px; }
.nav-menu { padding: 12px; }
.nav-group { padding: 16px 11px 6px; color: #a0aec0; font-size: 10px; }
.nav-item {
  position: relative;
  width: 100%;
  min-height: 42px;
  border: 0;
  text-align: left;
  line-height: 1.4;
  background: transparent;
}
.nav-item::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 4px 4px 0; background: transparent; }
.nav-item.active::before { background: var(--primary); }
.nav-item .nav-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 15px; filter: saturate(.85); }
.nav-item .nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active .nav-icon { background: rgba(49,87,213,.09); }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin: 10px 12px 14px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; }
.sidebar-footer > span { font-size: 15px; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { color: #475569; font-size: 11px; }
.sidebar-footer small { color: var(--text-light); font-size: 9.5px; }
.sidebar-backdrop, .mobile-menu-btn { display: none; }
.main { min-width: 0; }
.topbar { height: 68px; padding: 0 28px; background: rgba(255,255,255,.88); }
.topbar-title { font-size: 15px; }
.topbar-breadcrumb { margin-top: 0; font-size: 10.5px; }
.topbar-right { position: relative; gap: 10px; }
.topbar-search { width: min(290px, 24vw); min-height: 38px; background: #f6f8fb; }
.topbar-search:focus-within { border-color: var(--primary); background: white; box-shadow: var(--ring); }
.topbar-search kbd { padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 5px; background: white; color: var(--text-light); font: inherit; font-size: 10px; }
.topbar-icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: white; color: var(--text-muted); font-size: 20px; }
.topbar-icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.user-chip { min-height: 40px; border: 1px solid var(--border); font-family: inherit; color: var(--text); }
.user-chip .user-chevron { margin-left: 3px; color: var(--text-light); }
.user-menu { position: absolute; top: 50px; right: 0; z-index: 150; display: none; width: 190px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: white; box-shadow: var(--shadow-lg); }
.user-menu.show { display: block; animation: fadeUp .18s ease; }
.user-menu-meta { display: flex; flex-direction: column; padding: 8px 9px 10px; border-bottom: 1px solid var(--border); }
.user-menu-meta span { color: var(--text-muted); font-size: 11px; }
.user-menu button { width: 100%; margin-top: 5px; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--danger); text-align: left; }
.user-menu button:hover { background: var(--danger-light); }
.topbar-icon-btn:focus-visible, .user-chip:focus-visible, .mobile-menu-btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--primary); }
.content { padding: 28px; background: var(--bg); }
.content > * { width: 100%; max-width: 1600px; margin-left: auto; margin-right: auto; }

/* 通用业务组件 */
.page-header { align-items: center; margin-bottom: 24px; }
.page-header h1 { color: #15213a; font-size: 24px; line-height: 1.3; }
.page-header .sub { max-width: 760px; margin-top: 6px; }
.page-actions { align-items: center; flex-wrap: wrap; }
.btn { min-height: 38px; padding: 8px 14px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #4269df); }
.cards-grid { grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { position: relative; min-height: 112px; padding: 18px; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; right: -28px; top: -32px; width: 90px; height: 90px; border-radius: 50%; background: rgba(49,87,213,.025); }
.stat-card:hover { transform: translateY(-2px); }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; font-size: 20px; }
.stat-info { min-width: 0; }
.stat-info .label { color: #718096; }
.stat-info .value { font-size: 28px; line-height: 1.18; }
.stat-info .trend { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel { border-color: #e2e8f0; box-shadow: var(--shadow); }
.panel-header { min-height: 56px; padding: 15px 19px; }
.panel-header h3 { color: #26334c; }
.panel-body { padding: 20px; }
.chart-grid { gap: 18px; }
.chart-fallback { height: 100%; display: grid; place-content: center; gap: 3px; border: 1px dashed var(--border-strong); border-radius: 12px; background: #f8fafc; color: var(--text-muted); text-align: center; }
.chart-fallback small { color: var(--text-light); }
.dashboard-stats { grid-template-columns: repeat(6, minmax(150px, 1fr)); }
.dashboard-stats .stat-card { align-items: flex-start; flex-direction: column; gap: 10px; min-height: 146px; }
.dashboard-stats .stat-info { width: 100%; }
.dashboard-charts { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.dashboard-lower { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.data-table th { position: relative; padding: 12px 16px; background: #f7f9fc; color: #718096; font-size: 11px; }
.data-table td { height: 54px; padding: 11px 16px; }
.data-table tbody tr:hover { background: #f5f8ff; }
.table-wrap { scrollbar-width: thin; }
.tag { min-height: 24px; padding: 3px 9px; border-radius: 999px; }
.progress-bar { width: 96px; height: 7px; background: #e9eef5; }
.filter-bar { padding: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,.76); box-shadow: var(--shadow); }
.filter-bar .form-control { min-height: 40px; }
.detail-header { position: relative; padding: 22px; overflow: hidden; }
.detail-header::after { content: ''; position: absolute; right: -60px; top: -90px; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(49,87,213,.08), transparent 68%); pointer-events: none; }
.detail-avatar { width: 60px; height: 60px; border-radius: 15px; }
.info-item { border-color: #e7ebf2; background: #f7f9fc; }
.verify-node { border-color: #e2e8f0; background: #f7f9fc; }
.file-lib { grid-template-columns: 250px minmax(0, 1fr); }
.dir-tree { background: #f7f9fc; }
.file-item { min-height: 64px; }
.skill-card { min-height: 172px; }
.modal-mask { background: rgba(15,23,42,.48); }
.modal { border: 1px solid rgba(255,255,255,.85); }
.modal-open { overflow: hidden; }
.form-control { min-height: 40px; }
.form-control:hover { border-color: #cbd5e1; }
.empty-state { margin: 8px auto; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: rgba(255,255,255,.65); }
.empty-state h3 { margin-bottom: 4px; color: var(--text); font-size: 15px; }
.empty-state .btn { margin-top: 16px; }
.error-state .icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; background: var(--danger-light); color: var(--danger); font-size: 22px; font-weight: 800; }

/* 骨架加载 */
.loading-state { padding-top: 8px; color: var(--text-light); font-size: 12px; }
.loading-head, .loading-card { overflow: hidden; border-radius: var(--radius); background: #e8edf4; }
.loading-head { width: 280px; height: 62px; margin-bottom: 22px; }
.loading-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.loading-card { height: 116px; }
.loading-head::after, .loading-card::after { content: ''; display: block; width: 45%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); animation: shimmer 1.15s infinite; }
@keyframes shimmer { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* 页面级密度：同一套组件在不同业务场景下保持合适宽度 */
.content[data-page="enterprises"] .panel { margin-top: 16px; }
.content[data-page="enterprises"] .data-table td:first-child { min-width: 58px; }
.content[data-page="enterprises"] .data-table td:nth-child(2) { min-width: 250px; }
.content[data-page="enterprises"] .data-table td:nth-child(5) { letter-spacing: .12em; }
.sequence-col, .sequence-cell { width: 64px; text-align: center !important; }
.sequence-cell { color: var(--primary); font-weight: 800; font-variant-numeric: tabular-nums; }
.leader-name { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; background: #ecfdf5; color: #047857; font-weight: 700; white-space: nowrap; }
.content[data-page="selfeval"] .page-actions .form-control,
.content[data-page="files"] .page-actions .form-control { min-height: 40px; }
.content[data-page="progress"] .panel:first-of-type .panel-body { padding-top: 14px; }
.content[data-page="search"] > .panel:first-of-type { border-color: #d8e3fa; background: linear-gradient(135deg, #fff, #f7faff); }
.content[data-page="search"] > .panel:first-of-type .form-control:first-child { min-width: 280px; }
.content[data-page="verify"] .verify-result { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.content[data-page="reports"] .cards-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); max-width: 720px; margin-left: 0; }
.content[data-page="ai"] .skill-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.content[data-page="system"] .panel { margin-bottom: 18px; }
.content[data-page="system"] .data-table td:first-child { font-weight: 600; }

/* 工作台：面向政府领导与专家的项目驾驶舱 */
.content[data-page="dashboard"] { padding-top: 22px; }
.dashboard-simple-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 4px 2px; }
.dashboard-simple-header h1 { color: #17233a; font-size: 24px; line-height: 1.3; letter-spacing: -.025em; }
.dashboard-summary-line { display: flex; gap: 18px; margin-top: 5px; color: #718096; font-size: 12px; }
.dashboard-summary-line span + span { position: relative; }
.dashboard-summary-line span + span::before { content: ''; position: absolute; left: -10px; top: 8px; width: 3px; height: 3px; border-radius: 50%; background: #aab6c7; }
.dashboard-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dashboard-actions .btn { white-space: nowrap; }
.dashboard-actions .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dashboard-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card { min-width: 0; min-height: 128px; padding: 16px 17px; border: 1px solid #dfe6ef; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px -18px rgba(15,35,70,.65); }
.kpi-card.primary { border-color: #cbd8f6; background: #fbfcff; }
.kpi-card.risk { border-color: #eed8bf; background: #fffdf9; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #6c7b90; font-size: 11.5px; font-weight: 650; }
.kpi-head i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #edf3ff; color: #3157d5; }
.kpi-card.risk .kpi-head i { background: #fff1df; color: #b36c1f; }
.kpi-head svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpi-value { margin-top: 9px; color: #172033; font-size: 31px; font-weight: 750; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi-value small { margin-left: 4px; color: #77869a; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.kpi-note { display: flex; align-items: center; gap: 7px; margin-top: 11px; overflow: hidden; color: #7a899d; font-size: 10.5px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.mini-progress { display: inline-block; flex: 0 0 38px; height: 4px; overflow: hidden; border-radius: 3px; background: #e9eef5; }
.mini-progress b { display: block; height: 100%; border-radius: inherit; background: #3157d5; }

.dashboard-panel { margin-bottom: 18px; border-radius: 14px; box-shadow: 0 7px 22px -22px rgba(15,35,70,.7); }
.dashboard-panel .panel-header { min-height: 62px; padding: 14px 18px; }
.dashboard-panel .panel-header h3 { margin-top: 2px; color: #25344d; font-size: 15px; }
.panel-kicker { color: #8795a8; font-size: 10px; font-weight: 650; letter-spacing: .08em; }
.panel-unit { color: #8a98aa; font-size: 10.5px; }
.dashboard-panel .chart-box { height: 300px; }
.dashboard-charts { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.dashboard-lower { grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr); }
.risk-count { min-width: 46px; padding: 4px 9px; border-radius: 999px; background: #fff3e5; color: #a5631d; font-size: 11px; font-weight: 700; text-align: center; }
.leader-plain { color: #334155; font-weight: 650; white-space: nowrap; }
.action-copy { color: #80551e; font-size: 11.5px; line-height: 1.45; }
.table-empty { height: 108px !important; padding: 28px !important; color: #94a3b8; text-align: center; }
.activity-panel .panel-body { overflow-x: auto; }
.briefing-panel .panel-body { padding: 6px 18px 12px; }
.briefing-list { display: grid; }
.briefing-list article { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 15px 0; border-bottom: 1px solid #edf1f6; }
.briefing-list article:last-child { border-bottom: 0; }
.briefing-index { padding-top: 2px; color: #9aa7b8; font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; }
.briefing-list strong { display: block; color: #334155; font-size: 12.5px; }
.briefing-list p { margin-top: 4px; color: #75849a; font-size: 11px; line-height: 1.55; }
.briefing-level { align-self: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.briefing-level.watch { background: #fff2df; color: #9d611b; }
.briefing-level.normal { background: #e9f7f2; color: #19705d; }
.content[data-page="dashboard"] .data-table th { background: #f6f8fb; color: #76859a; font-size: 10.5px; letter-spacing: .035em; }
.content[data-page="dashboard"] .data-table td { height: 50px; color: #425066; font-size: 12px; }
.content[data-page="dashboard"] .data-table .link { color: #284fb7; }

@media (max-width: 1320px) {
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-card { min-height: 116px; }
  .dashboard-stats { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
  .dashboard-stats .stat-card { min-height: 118px; flex-direction: row; align-items: center; }
  .cards-grid { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
}

@media (max-width: 1100px) {
  .login-shell { grid-template-columns: minmax(0, 1fr) 410px; }
  .login-intro { padding: 64px 42px; }
  .login-capabilities { grid-template-columns: 1fr; }
  .login-capabilities div:nth-child(3) { display: none; }
  .dashboard-charts, .dashboard-lower { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 900px) {
  .app { position: relative; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-105%); box-shadow: 18px 0 55px -28px rgba(15,23,42,.48); transition: transform .24s cubic-bezier(.16,1,.3,1); }
  .sidebar-logo { justify-content: flex-start; padding: 15px 18px; }
  .sidebar-logo .logo-text, .nav-item .nav-label, .nav-group, .sidebar-footer { display: flex; }
  .sidebar-logo .logo-text { display: block; }
  .nav-item { justify-content: flex-start; padding: 9px 12px; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 70; display: block; border: 0; background: rgba(15,23,42,.38); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .mobile-menu-btn { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 10px; background: white; color: var(--text); font-size: 17px; }
  .topbar { height: 64px; padding: 0 16px; }
  .topbar-search, .topbar-icon-btn { display: none; }
  .user-chip .info, .user-chevron { display: none; }
  .user-chip { padding: 4px; border-radius: 50%; }
  .user-chip .avatar { width: 34px; height: 34px; }
  .user-menu { top: 46px; }
  .content { padding: 20px 16px 32px; }
  .page-header { align-items: flex-start; }
  .page-header h1 { font-size: 22px; }
  .file-lib { grid-template-columns: 1fr; }
  .loading-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .login-page { padding: 14px; align-items: stretch; }
  .login-shell { display: block; min-height: auto; margin: auto 0; border-radius: 20px; }
  .login-intro { display: none; }
  .login-box { min-height: min(680px, calc(100vh - 28px)); padding: 38px 26px; border-radius: 20px; }
  .login-logo { margin-left: auto; margin-right: auto; }
  .login-title, .login-subtitle { text-align: center; }
  .cards-grid, .dashboard-stats { grid-template-columns: 1fr; }
  .dashboard-simple-header { align-items: flex-start; flex-direction: column; }
  .dashboard-simple-header h1 { font-size: 22px; }
  .dashboard-actions { width: 100%; justify-content: stretch; }
  .dashboard-actions .btn { flex: 1; justify-content: center; }
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card { min-height: 112px; }
  .dashboard-panel .chart-box { height: 280px; }
  .dashboard-stats .stat-card, .stat-card { min-height: 98px; flex-direction: row; align-items: center; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; justify-content: center; }
  .filter-bar { align-items: stretch; }
  .filter-bar .form-control, .filter-bar .search-input, .filter-bar .btn { width: 100%; }
  .detail-header { align-items: flex-start; }
  .detail-info { min-width: calc(100% - 84px); }
  .detail-meta { width: 100%; padding-top: 14px; border-top: 1px solid var(--border); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .chart-box { height: 280px; }
  .verify-flow { align-items: stretch; flex-direction: column; }
  .verify-arrow { transform: rotate(90deg); align-self: center; }
  .modal { max-width: calc(100vw - 20px); max-height: 92vh; border-radius: 14px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  .data-table { min-width: 720px; }
  .content[data-page="reports"] .cards-grid { grid-template-columns: 1fr; max-width: none; }
  .content[data-page="search"] > .panel:first-of-type .form-control:first-child { min-width: 0; }
}

@media (max-width: 480px) {
  .dashboard-kpis { grid-template-columns: 1fr; }
  .kpi-card { min-height: 104px; }
  .dashboard-actions { flex-direction: column; }
}
