/* ===== 全局变量与重置 ===== */
:root {
  --primary: #0ea5e9;
  --primary-hover: #0284c7;
  --primary-light: #e0f2fe;
  --success: #22c55e;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #0ea5e9;
  --info-light: #e0f2fe;
  --purple: #0ea5e9;
  --purple-light: #e0f2fe;
  --bg: #f0f6fb;
  --bg-card: #ffffff;
  --bg-secondary: #ecf3f8;
  --bg-hover: #e6f0f7;
  --bg-tint: #e0f2fe;
  --bg-danger: #fef2f2;
  --bg-warning: #fffbeb;
  --bg-success: #f0fdf4;
  --border: #d8e6f0;
  --border-light: #e8f0f6;
  --text: #0f2c43;
  --text-dark: #0f2c43;
  --text-secondary: #5a7a93;
  --text-muted: #94a8b8;
  --text-on-dark: #e2e8f0;
  --shadow: 0 2px 8px rgba(14,165,233,0.06);
  --shadow-lg: 0 8px 30px rgba(14,165,233,0.1);
  --radius: 10px;
  --sidebar-width: 230px;
  --sidebar-bg: #0c2a43;
  --sidebar-text: #8da6be;
  --sidebar-active: #0ea5e9;
  --sidebar-border: #1636519;
  --sidebar-title: #5a7a93;
  --sidebar-logo-title: #ffffff;
  --sidebar-logo-sub: #8da6be;
  --sidebar-hover: #163651;
  /* 便利贴颜色 */
  --sticky-yellow-bg: #fef3c7;
  --sticky-yellow-border: #f59e0b;
  --sticky-blue-bg: #dbeafe;
  --sticky-blue-border: #3b82f6;
  --sticky-red-bg: #fee2e2;
  --sticky-red-border: #ef4444;
  --sticky-green-bg: #dcfce7;
  --sticky-green-border: #22c55e;
  /* 语义化背景/边框/文字色 */
  --primary-bg: #e0f2fe;
  --primary-border: #7dd3fc;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --warning-border: #f59e0b;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --primary-dark: #0284c7;
  --info-bg: #e0f2fe;
  --info-border: #7dd3fc;
  /* 语义状态色 Token（供 JS STATUS_COLORS 引用） */
  --status-pending: #94a8b8;
  --status-reviewing: #0ea5e9;
  --status-approved: #22c55e;
  --status-rejected: #ef4444;
  --status-warning: #f59e0b;
  --status-purple: #0ea5e9;
  --status-info: #0ea5e9;
  --status-executed: #22c55e;
}

/* ===== 深色模式 ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-light: #0c2a43;
    --success: #4ade80;
    --success-light: #14532d;
    --warning: #fbbf24;
    --warning-light: #422006;
    --danger: #f87171;
    --danger-light: #450a0a;
    --info: #38bdf8;
    --info-light: #0c2a43;
    --purple: #38bdf8;
    --purple-light: #0c2a43;
    --bg: #0a1929;
    --bg-card: #112638;
    --bg-secondary: #1a3148;
    --bg-hover: #1a3148;
    --bg-tint: #0c2a43;
    --bg-danger: #450a0a;
    --bg-warning: #422006;
    --bg-success: #14532d;
    --border: #1a3148;
    --border-light: #23405a;
    --text: #e0f2fe;
    --text-dark: #f0f9ff;
    --text-secondary: #94a8b8;
    --text-muted: #5a7a93;
    --text-on-dark: #e0f2fe;
    --shadow: 0 2px 8px rgba(0,0,0,.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.4);
    --sidebar-bg: #0a1929;
    --sidebar-text: #5a7a93;
    --sidebar-active: #38bdf8;
    --sidebar-border: #112638;
    --sidebar-title: #475569;
    --sidebar-logo-title: #e0f2fe;
    --sidebar-logo-sub: #475569;
    --sidebar-hover: #112638;
    /* 便利贴颜色（深色模式适配） */
    --sticky-yellow-bg: #422006;
    --sticky-yellow-border: #f59e0b;
    --sticky-blue-bg: #1e3a5f;
    --sticky-blue-border: #3b82f6;
    --sticky-red-bg: #450a0a;
    --sticky-red-border: #ef4444;
    --sticky-green-bg: #14532d;
    --sticky-green-border: #22c55e;
    /* 语义化背景/边框/文字色（深色模式） */
    --primary-bg: #0c2a43;
    --primary-border: #0c2a43;
    --warning-bg: #422006;
    --warning-text: #fbbf24;
    --danger-bg: #450a0a;
    --danger-border: #7f1d1d;
    --success-bg: #14532d;
    --success-border: #166534;
    --info-bg: #0c2a43;
    --info-border: #0c2a43;
    /* 语义状态色 Token（深色模式） */
    --status-pending: #5a7a93;
    --status-reviewing: #38bdf8;
    --status-approved: #4ade80;
    --status-rejected: #f87171;
    --status-warning: #fbbf24;
    --status-purple: #38bdf8;
    --status-info: #38bdf8;
    --status-executed: #4ade80;
  }
}

/* ===== SVG 图标系统 ===== */
.ic { display:inline-block; vertical-align:middle; flex-shrink:0; }
.ic.icon-xs { width:12px; height:12px; }
.ic.icon-sm { width:16px; height:16px; }
.ic.icon-md { width:20px; height:20px; }
.ic.icon-lg { width:24px; height:24px; }
.nav-icon.ic { width:20px; height:20px; }
.logo-icon .ic { width:28px; height:28px; }

/* ===== 通用工具类 ===== */
.flex-row { display:flex; gap:8px; align-items:center; }
.flex-wrap { display:flex; gap:6px; flex-wrap:wrap; }
.muted-text { font-size:12px; color:var(--text-muted); }
.hint-box { font-size:13px; color:var(--text-muted); line-height:1.7; margin-bottom:12px; }
.detail-meta { font-size:12px; line-height:1.8; margin-top:8px; }
.track-status { display:flex; gap:6px; flex-wrap:wrap; font-size:12px; }

* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
#app { display:flex; height:100vh; overflow:hidden; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display:flex; flex-direction:column;
  flex-shrink:0;
}
.sidebar-header { padding:22px 18px; border-bottom:1px solid var(--sidebar-border); }
.sidebar-project-switch { margin-top:10px; }
.sidebar-project-select {
  width:100%; padding:6px 10px; border:1px solid var(--sidebar-border);
  border-radius:6px; background:var(--sidebar-bg-soft,#f1f5f9); color:var(--sidebar-text);
  font-size:12px; font-weight:600; outline:none; cursor:pointer;
}
.sidebar-project-select:focus { border-color:var(--primary); }
.sidebar-search { padding:8px 14px; border-bottom:1px solid var(--sidebar-border); }
.sidebar-search input {
  width:100%; padding:6px 10px; border:1px solid var(--sidebar-border);
  border-radius:6px; background:var(--sidebar-bg-soft,#f1f5f9); color:var(--sidebar-text);
  font-size:12px; outline:none; transition:border-color 150ms;
}
.sidebar-search input:focus { border-color:var(--primary); }
.sidebar-search input::placeholder { color:var(--sidebar-title); opacity:0.6; }
.logo { display:flex; align-items:center; gap:12px; }
.logo-icon { font-size:28px; }
.logo-title { font-size:17px; font-weight:700; color:var(--sidebar-logo-title); letter-spacing:-0.3px; }
.logo-sub { font-size:11px; color:var(--sidebar-logo-sub); margin-top:2px; }
.sidebar-nav { flex:1; padding:14px 10px; overflow-y:auto; }
.nav-section { margin-bottom:10px; }
.nav-section-title {
  font-size:11px; color:var(--sidebar-title); text-transform:uppercase;
  letter-spacing:.8px; padding:6px 10px 6px; font-weight:600;
  border-radius:6px; transition: background .15s;
}
.nav-section-title:hover { background: rgba(255,255,255,.05); }
.nav-section-title .nav-count {
  float: right; font-size:10px; opacity:.5; font-weight:400;
}
.nav-item {
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:8px; cursor:pointer;
  color:var(--sidebar-text); text-decoration:none;
  transition:all .15s;
  margin-bottom:2px; font-size:13.5px;
}
.nav-item:hover { background:var(--sidebar-hover); color:#c9d2e8; }
.nav-item.active { background:var(--sidebar-active); color:#fff; font-weight:600; }
.nav-item.disabled { opacity:.5; cursor:not-allowed; }
.nav-item.disabled:hover { background:transparent; color:var(--sidebar-text); }
.nav-icon { font-size:16px; width:20px; text-align:center; }
.nav-label { flex:1; }
.nav-badge {
  font-size:10px; background:var(--primary); color:#fff;
  padding:1px 7px; border-radius:10px; font-weight:600;
}
.sidebar-footer { padding:16px 18px; border-top:1px solid var(--sidebar-border); }
.storage-label { font-size:11px; color:var(--sidebar-title); text-transform:uppercase; letter-spacing:.5px; }
.storage-usage { font-size:12px; color:var(--sidebar-text); margin-top:4px; }

/* ===== 主内容区 ===== */
.main { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.main-header {
  background:var(--bg-card); padding:16px 28px;
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:12px;
  flex-shrink:0;
}
.page-title { font-size:19px; font-weight:700; letter-spacing:-0.3px; }
.header-actions { display:flex; gap:8px; margin-left:auto; }
.main-content { flex:1; overflow-y:auto; padding:24px 28px; }

/* ===== 按钮 ===== */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 16px; border-radius:8px; border:1px solid var(--border);
  background:var(--bg-card); color:var(--text);
  font-size:13px; cursor:pointer; transition:all .15s;
  text-decoration:none; user-select:none; font-weight:500;
}
.btn:hover { background:var(--bg-hover); border-color:#d4d7e0; }
.btn-primary { background:var(--primary); border-color:var(--primary); color:#fff; font-weight:600; }
.btn-primary:hover { background:var(--primary-hover); border-color:var(--primary-hover); }
.btn-danger { color:var(--danger); border-color:var(--border); }
.btn-danger:hover { background:#fef2f2; border-color:#fecaca; }
.btn-sm { padding:5px 12px; font-size:12px; }
.btn-icon { padding:6px 10px; }

/* ===== 卡片与面板 ===== */
.card {
  background:var(--bg-card); border-radius:var(--radius);
  box-shadow:var(--shadow); border:1px solid var(--border-light);
}
.card-header {
  padding:14px 18px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
}
.card-title { font-size:15px; font-weight:600; }
.card-body { padding:18px; }

/* ===== 资料归档布局 ===== */
.archive-layout { display:grid; grid-template-columns:240px 1fr; gap:16px; height:100%; }
.project-panel { display:flex; flex-direction:column; }
.project-list { flex:1; overflow-y:auto; padding:8px; }
.project-item {
  padding:9px 12px; border-radius:6px; cursor:pointer;
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:2px; transition:background .15s;
}
.project-item:hover { background:var(--bg-hover); }
.project-item.active { background:var(--primary-light); color:var(--primary); font-weight:500; }
.project-item-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.project-item-count { font-size:11px; color:var(--text-muted); background:var(--bg); padding:1px 6px; border-radius:8px; }
.project-item.active .project-item-count { background:#fff; color:var(--primary); }

.archive-tabs {
  display:flex; gap:4px; border-bottom:2px solid var(--border);
  margin-bottom:16px;
}
.archive-tab {
  padding:8px 18px; cursor:pointer; font-size:14px;
  border-bottom:2px solid transparent; margin-bottom:-2px;
  color:var(--text-secondary); transition:all .15s;
  display:flex; align-items:center; gap:6px;
}
.archive-tab:hover { color:var(--text); }
.archive-tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:500; }
.archive-tab .tab-count {
  font-size:11px; background:var(--bg); color:var(--text-muted);
  padding:0 6px; border-radius:8px;
}
.archive-tab.active .tab-count { background:var(--primary-light); color:var(--primary); }

/* 工具栏 */
.toolbar {
  display:flex; align-items:center; gap:10px; margin-bottom:14px;
  flex-wrap:wrap;
}
.toolbar .spacer { flex:1; }
.search-input {
  padding:7px 12px; border:1px solid var(--border); border-radius:6px;
  font-size:13px; width:220px; outline:none; transition:border .15s;
}
.search-input:focus { border-color:var(--primary); }
.filter-select {
  padding:7px 10px; border:1px solid var(--border); border-radius:6px;
  font-size:13px; background:var(--bg-card); cursor:pointer; outline:none;
}

/* 文件网格 */
.file-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:12px;
}
.file-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px; cursor:pointer;
  transition:all .15s; position:relative;
}
.file-card:hover { box-shadow:var(--shadow-lg); border-color:#cbd5e1; transform:translateY(-1px); }
.file-card.selected { border-color:var(--primary); background:var(--primary-light); }
.file-card-del {
  position:absolute; top:8px; right:8px;
  width:22px; height:22px; border-radius:50%;
  background:rgba(220,38,38,.85); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; cursor:pointer; opacity:0;
  transition:opacity .15s, background .15s;
  z-index:2; line-height:1;
}
.file-card:hover .file-card-del { opacity:1; }
.file-card-del:hover { background:rgba(220,38,38,1); }
.file-icon { font-size:32px; margin-bottom:8px; }
.file-name {
  font-size:13px; font-weight:500; margin-bottom:4px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.file-meta { font-size:11px; color:var(--text-muted); }
.file-meta > span { display:inline-block; margin-right:8px; }
.file-badges { position:absolute; top:8px; right:8px; display:flex; gap:4px; }
.badge {
  font-size:10px; padding:1px 6px; border-radius:8px;
  background:var(--bg); color:var(--text-secondary);
}
.badge-raw { background:#fef3c7; color:#92400e; }
.badge-processed { background:#d1fae5; color:#065f46; }
.badge-category { background:var(--primary-light); color:var(--primary); }

/* 空状态 */
.empty-state {
  text-align:center; padding:60px 20px; color:var(--text-muted);
}
.empty-state .empty-icon { font-size:48px; margin-bottom:12px; opacity:.5; }
.empty-state .empty-text { font-size:14px; }

/* 上传拖放区 */
.drop-zone {
  border:2px dashed var(--border); border-radius:var(--radius);
  padding:32px; text-align:center; color:var(--text-secondary);
  transition:all .2s; cursor:pointer; margin-bottom:16px;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color:var(--primary); background:var(--primary-light); color:var(--primary);
}
.drop-zone .dz-icon { font-size:36px; margin-bottom:8px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  display:flex; align-items:center; justify-content:center;
  z-index:1000;
}
.modal-mask.hidden { display:none; }
.modal {
  background:var(--bg-card); border-radius:10px; box-shadow:var(--shadow-lg);
  width:560px; max-width:92vw; max-height:88vh;
  display:flex; flex-direction:column; overflow:hidden;
}
.modal-header {
  padding:14px 20px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
}
.modal-title { font-size:15px; font-weight:600; }
.modal-close {
  background:none; border:none; font-size:20px; cursor:pointer;
  color:var(--text-muted); padding:0 4px;
}
.modal-close:hover { color:var(--text); }
.modal-body { padding:20px; overflow-y:auto; flex:1; }
.modal-footer {
  padding:12px 20px; border-top:1px solid var(--border);
  display:flex; justify-content:flex-end; gap:8px;
}

/* ===== 表单 ===== */
.form-group { margin-bottom:14px; }
.form-label {
  display:block; font-size:13px; font-weight:500; margin-bottom:5px;
  color:var(--text);
}
.form-label .required { color:var(--danger); margin-left:2px; }
.form-input, .form-select, .form-textarea {
  width:100%; padding:8px 12px; border:1px solid var(--border);
  border-radius:6px; font-size:13px; outline:none;
  font-family:inherit; transition:border .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color:var(--primary); }
.form-textarea { resize:vertical; min-height:80px; }
.form-hint { font-size:11px; color:var(--text-muted); margin-top:3px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* ===== Toast ===== */
.toast-container {
  position:fixed; top:20px; right:20px; z-index:2000;
  display:flex; flex-direction:column; gap:8px;
}
.toast {
  background:#1e293b; color:#fff; padding:10px 18px;
  border-radius:8px; box-shadow:var(--shadow-lg);
  font-size:13px; animation:slideIn .25s ease;
  display:flex; align-items:center; gap:8px;
  max-width:320px;
}
.toast-success { background:var(--success); }
.toast-error { background:var(--danger); }
.toast-warning { background:var(--warning); }
@keyframes slideIn {
  from { transform:translateX(100%); opacity:0; }
  to { transform:translateX(0); opacity:1; }
}
.toast.fade-out { opacity:0; transform:translateX(100%); transition:all .3s; }

/* ===== 骨架屏 ===== */
.skeleton-row { padding: 12px 16px; }
.skeleton-bar {
  height: 16px; border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-soft, #f0f0f0) 25%, var(--bg-card, #fff) 50%, var(--bg-soft, #f0f0f0) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-color-scheme: dark) {
  .skeleton-bar {
    background: linear-gradient(90deg, var(--bg-soft, #252732) 25%, var(--bg-card, #1a1c25) 50%, var(--bg-soft, #252732) 75%);
    background-size: 200% 100%;
  }
}

/* ===== 知识库 ===== */
.kb-layout { display:grid; grid-template-columns:200px 1fr; gap:16px; }
.kb-cat-list { padding:8px; }
.kb-cat-item {
  padding:8px 12px; border-radius:6px; cursor:pointer;
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:2px; font-size:13px;
}
.kb-cat-item:hover { background:var(--bg-hover); }
.kb-cat-item.active { background:var(--primary-light); color:var(--primary); font-weight:500; }
.kb-list { display:flex; flex-direction:column; gap:10px; }
.kb-item {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px 16px; cursor:pointer;
  transition:all .15s;
}
.kb-item:hover { box-shadow:var(--shadow); border-color:#cbd5e1; }
.kb-item-title { font-size:14px; font-weight:600; margin-bottom:4px; display:flex; align-items:center; gap:8px; }
.kb-item-preview {
  font-size:12px; color:var(--text-secondary);
  overflow:hidden; text-overflow:ellipsis; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.kb-item-meta { font-size:11px; color:var(--text-muted); margin-top:6px; display:flex; gap:10px; }
.tag {
  display:inline-block; font-size:10px; padding:1px 7px;
  border-radius:8px; background:var(--primary-light); color:var(--primary);
  margin-right:4px;
}

/* 全局搜索结果项 hover */
.gs-item:hover { background: var(--bg-hover); }

/* ===== 首页重构布局 ===== */
.dash-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 14px; padding: 16px 20px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 16px;
  color: #fff; box-shadow: 0 4px 20px rgba(14,165,233,0.2);
}
.dash-header-left { flex: 0 0 auto; }
.dash-header-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.dash-header-sub { font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 2px; }
.dash-header-weather {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.15); border-radius: 10px; padding: 8px 14px;
}
.dash-header-clock { flex: 0 0 auto; text-align: right; }
.dash-clock-time { font-size: 24px; font-weight: 700; font-family: monospace; letter-spacing: 1px; }
.dash-clock-date { font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 2px; }

/* 台风预警 */
.dash-typhoon {
  border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; cursor: pointer;
  background: var(--danger-bg); border: 2px solid var(--danger-border);
}

/* 主区域：单列流式（统计在上） */
.dash-main-grid {
  display: flex; flex-direction: column; gap: 14px;
}
.dash-main-left { min-width: 0; }
.dash-main-right { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* 区块标题 */
.dash-section { margin-bottom: 12px; }
.dash-section-title {
  font-size: 14px; font-weight: 700; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}

/* 待办网格 */
.dash-todo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px;
}

/* 空状态 */
.dash-empty {
  text-align: center; padding: 20px; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}

/* 统计网格 — 横向4列 */
.dash-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.dash-stat-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.dash-stat-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.dash-stat-item:active { transform: scale(0.97); }
.dash-stat-icon { display: flex; justify-content: center; }
.dash-stat-num { font-size: 20px; font-weight: 700; color: var(--text); }
.dash-stat-label { font-size: 11px; color: var(--text-muted); }

/* 闭环追踪网格 */
.dash-tracker-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.dash-tracker-item {
  text-align: center; padding: 10px 6px; background: var(--bg-secondary);
  border-radius: 6px; cursor: pointer;
}
.dash-tracker-num { font-size: 18px; font-weight: 700; color: var(--c, var(--text)); }
.dash-tracker-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 列表网格 */
.dash-lists-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.dash-list-body {
  padding: 6px 14px; max-height: 280px; overflow-y: auto;
}

/* 兼容旧样式 */
.welcome-banner { display: none; } /* 旧横幅隐藏，新布局使用 .dash-header */
.weather-card { display: none; } /* 旧天气卡片隐藏，新布局内嵌头部 */
.welcome-clock { display: none; }
.welcome-date { display: none; }
.welcome-title { display: none; }
.welcome-sub { display: none; }
.made-by { text-align: right; font-size: 11px; color: var(--text-muted); margin: 8px 0; }

/* 快捷操作栏 */
.dash-quick-actions { }
.dash-quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.dash-quick-btn {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 150ms ease;
}
.dash-quick-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.dash-quick-btn:active { transform: scale(0.97); }

/* 滚动条 */
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#cbd5e1; border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:#94a3b8; }

/* 详情查看 */
.detail-section { margin-bottom:16px; }
.detail-label { font-size:12px; color:var(--text-muted); margin-bottom:4px; }
.detail-value { font-size:14px; white-space:pre-wrap; word-break:break-word; }
.detail-content-box {
  background:var(--bg-hover); border:1px solid var(--border);
  border-radius:6px; padding:12px; max-height:300px; overflow-y:auto;
  font-size:13px; white-space:pre-wrap; word-break:break-word;
}

/* ===== 目录索引树 ===== */
.idx-group { margin-bottom:12px; }
.idx-group-title {
  font-size:13px; font-weight:600; padding:6px 0;
  border-bottom:1px solid var(--border); margin-bottom:4px;
}
.idx-cat { margin-left:12px; }
.idx-cat-title {
  display:flex; justify-content:space-between; align-items:center;
  padding:5px 8px; border-radius:6px; cursor:pointer; font-size:13px;
}
.idx-cat-title:hover { background:var(--bg-hover); }
.idx-files { margin-left:12px; padding:2px 0; }
.idx-file {
  display:flex; justify-content:space-between; align-items:center;
  padding:4px 8px 4px 16px; font-size:12px; cursor:pointer; border-radius:4px;
}
.idx-file:hover { background:var(--primary-light); }

/* 标记点动画 */
.mark-point { animation:popIn .2s ease; }
@keyframes popIn {
  from { transform:translate(-50%,-50%) scale(0); }
  to { transform:translate(-50%,-50%) scale(1); }
}

/* ===== 日志合并 ===== */
.mg-table { width:100%; border-collapse:collapse; font-size:12px; }
.mg-table th {
  text-align:left; padding:8px 10px; background:var(--bg-hover);
  border-bottom:1px solid var(--border); font-weight:600;
  color:var(--text-secondary); white-space:nowrap;
}
.mg-table td { padding:7px 10px; border-bottom:1px solid var(--border); }
.mg-table tr:hover td { background:var(--bg-hover); }
.mg-radio {
  display:flex; align-items:flex-start; gap:6px; font-size:13px;
  margin-bottom:6px; cursor:pointer; line-height:1.5;
}
.mg-radio input { margin-top:3px; }

/* ===== 首页便利贴 ===== */
.sticky-note {
  position:relative; padding:14px 16px 14px 36px;
  border-radius:4px; cursor:pointer; transition:transform .15s, box-shadow .15s;
  box-shadow:0 1px 3px rgba(0,0,0,.12);
  font-size:13px; line-height:1.6;
}
.sticky-note:hover { transform:translateY(-2px); box-shadow:0 4px 10px rgba(0,0,0,.18); }
.sticky-note::before {
  content:''; position:absolute; left:8px; top:0; bottom:0; width:4px;
  border-radius:2px;
}
.sticky-yellow { background:var(--sticky-yellow-bg); color:#92400e; }
.sticky-yellow::before { background:var(--sticky-yellow-border); }
.sticky-red    { background:var(--sticky-red-bg); color:#991b1b; }
.sticky-red::before { background:var(--sticky-red-border); }
.sticky-blue   { background:var(--sticky-blue-bg); color:#1d4ed8; }
.sticky-blue::before { background:var(--sticky-blue-border); }
.sticky-green  { background:var(--sticky-green-bg); color:#166534; }
.sticky-green::before { background:var(--sticky-green-border); }
.sticky-title  { font-weight:600; margin-bottom:4px; }
.sticky-meta  { font-size:11px; opacity:.7; margin-top:4px; }
.sticky-badge  { display:inline-block; font-size:10px; padding:1px 6px; border-radius:8px; margin-left:6px; }

/* ===== 移动端适配 ===== */
.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text); padding: 6px; margin-right: 4px;
  display: none; align-items: center; justify-content: center;
}
@media (max-width: 768px) {
  .menu-toggle { display: flex !important; }
  .sidebar {
    position: fixed; left: -260px; top: 0; bottom: 0; z-index: 1000;
    transition: left .25s ease; box-shadow: 2px 0 12px rgba(0,0,0,.2);
  }
  .sidebar.open { left: 0; }
  .main { width: 100%; }
  .main-header { padding: 10px 14px; }
  .main-header .page-title { font-size: 16px; }
  #globalSearch { max-width: 140px !important; font-size: 12px !important; margin-left: 8px !important; }
  .header-actions { display: none; }
  .main-content { padding: 12px !important; }
  .form-row { flex-direction: column !important; }
  .form-row .form-group { width: 100% !important; }
  .mg-table { font-size: 11px; }
  .mg-table th, .mg-table td { padding: 4px 6px !important; }
  .file-grid { grid-template-columns: 1fr !important; }
  .card { margin-bottom: 10px; }
  .modal { width: 95% !important; margin: 10px auto; max-height: 92vh; }
  .modal-body { max-height: 60vh !important; }
  .drop-zone { padding: 16px !important; }
  /* Dashboard 重构后移动端适配 */
  .dash-header { flex-direction: column; gap: 10px; text-align: center; padding: 12px 14px; }
  .dash-header-weather { width: 100%; }
  .dash-header-title { font-size: 16px; }
  .dash-clock-time { font-size: 20px; }
  .dash-main-grid { grid-template-columns: 1fr !important; }
  .dash-lists-grid { grid-template-columns: 1fr !important; }
  .dash-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-tracker-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-todo-grid { grid-template-columns: 1fr !important; }
  .toolbar { gap: 6px; }
  .toolbar .search-input { width: 100% !important; }
  .toolbar .spacer { display: none; }
  .archive-layout { grid-template-columns: 1fr !important; }
  .kb-layout { grid-template-columns: 1fr !important; }
  .archive-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .archive-tab { white-space: nowrap; }
  .file-card { padding: 10px; }
  .sticky-note { padding: 10px 12px 10px 28px; font-size: 12px; }
  .dash-stat { padding: 10px !important; }
  .form-row { grid-template-columns: 1fr !important; }
  .modal-footer { flex-wrap: wrap; }
}

/* ===== 侧栏分组折叠 ===== */
.nav-section-title {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-section-title .arrow {
  display: inline-block; flex-shrink:0;
  transition: transform .2s ease;
  margin-left:6px;
}
.nav-section.collapsed .nav-section-title .arrow { transform: rotate(-90deg); }
.nav-section.collapsed .nav-item { display: none; }

/* 遮罩层（移动端侧栏打开时） */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3);
  z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ===== 高频内联style提取（Phase 3 代码质量优化） ===== */

/* 文字尺寸+颜色组合（63+28+18+13+9处） */
.t-sm-muted { font-size: 12px; color: var(--text-muted); }
.t-xs-muted { font-size: 11px; color: var(--text-muted); }
.t-sm { font-size: 12px; }
.t-xs { font-size: 11px; }
.t-md { font-size: 13px; }
.t-muted { color: var(--text-muted); }

/* flex 布局（28+24+9处） */
.f1 { flex: 1; }
.f1-min0 { flex: 1; min-width: 0; }
.flex-row-center { display: flex; gap: 8px; align-items: center; }

/* 间距（15+15+13+10+9+8处） */
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 10px; }
.mb-lg { margin-bottom: 12px; }
.mb-xl { margin-bottom: 14px; }
.mb-2xl { margin-bottom: 16px; }
.mt-sm { margin-top: 8px; }

/* 空/提示状态（17+12处） */
.empty-hint { padding: 20px; text-align: center; color: var(--text-muted); }
.empty-hint-lg { padding: 40px; text-align: center; color: var(--text-muted); }

/* 统计卡片容器（15处） */
.stats-card { padding: 12px; text-align: center; }

/* 表格滚动容器（8+8处） */
.scroll-400 { max-height: 400px; overflow-y: auto; }
.scroll-320 { max-height: 320px; overflow-y: auto; }
.scroll-table { padding: 0; overflow-x: auto; }

/* 列表行（7处） */
.list-row {
  display: flex; gap: 8px; padding: 6px 4px;
  font-size: 13px; border-bottom: 1px solid var(--border);
  cursor: pointer;
}

/* 隐藏（21处） */
.hide { display: none; }

/* 宽度（12+12+10+9+7处） */
.w-60 { width: 60px; }
.w-80 { width: 80px; }
.w-90 { width: 90px; }
.w-110 { width: 110px; }
.w-full { width: 100%; }

/* 居中（10处） */
.text-center { text-align: center; }

/* ===== 第二波高频内联style提取 ===== */

/* 鼠标手型（13处） */
.cursor-pointer { cursor: pointer; }

/* 字重（9+9处） */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-500 { font-weight: 500; }

/* 字重+尺寸组合（9处） */
.fw-600-t-md { font-weight: 600; font-size: 13px; }

/* 信息提示文字（6处：12px muted + mb-10 + line-height 1.7） */
.info-text { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.7; }

/* 链接式按钮（6处） */
.link-btn { cursor: pointer; color: var(--primary); margin: 0 4px; }

/* 文字+颜色+间距组合（7处） */
.t-xs-muted-mt { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.t-sm-muted-mb-sm { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.t-sm-muted-mb-md { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.t-sm-muted-mb-xs { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }

/* 文字尺寸（6+7处） */
.t-lg { font-size: 16px; }
.t-xl { font-size: 20px; }

/* 填充式空状态（6处） */
.empty-padded { padding: 24px; text-align: center; color: var(--text-muted); }

/* 边距（6+6处） */
.mt-md { margin-top: 10px; }
.mt-xs { margin-top: 4px; }

/* 表格容器（10处） */
.table-body { padding: 0; overflow-x: auto; }

/* 文字截断（6处） */
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
