/* ============================================================
 * 个人工作台 · 视觉系统 v2（精致工具风）
 * 设计语言：冷灰分层底 + 靛蓝单一强调 + 发丝级边框 + 柔和分区阴影
 * 约定：所有类名、CSS 变量名与业务语义色保持不变（app.js 内联样式依赖）
 * ============================================================ */

/* ============ 设计令牌 ============ */
:root {
  /* 中性底色（略带冷蓝，比纯灰更干净） */
  --bg: #f5f6f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f2f4f8;
  --line: #e7eaf0;
  --line-soft: #f0f2f6;
  --text: #1c2130;
  --text-2: #5b6474;
  --text-3: #98a1b1;

  /* 品牌主色：沉稳靛蓝，保留原有的蓝色认知 */
  --primary: #4a5bd9;
  --primary-hover: #3d4dc4;
  --primary-soft: #eef1fd;
  --primary-ring: rgba(74, 91, 217, .16);

  /* 归属语义色（保持业务含义，重新校准饱和度） */
  --company: #4a5bd9;
  --company-soft: #eef1fd;
  --personal: #64708a;
  --shared: #8b5cf6;

  /* 状态语义色 */
  --warn: #d9820b;
  --warn-soft: #fff6e8;
  --danger: #d9483a;
  --danger-soft: #fdf0ee;
  --ok: #12855c;
  --ok-soft: #e9f7f0;

  /* 形状与阴影 */
  --radius: 12px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(24, 32, 56, .04), 0 4px 16px rgba(24, 32, 56, .045);
  --shadow-hover: 0 2px 4px rgba(24, 32, 56, .05), 0 12px 28px rgba(24, 32, 56, .09);
  --shadow-pop: 0 12px 40px rgba(24, 32, 56, .16);

  /* 字体与动效 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ============ 基础 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font);
  font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.strong { font-weight: 650; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 精致滚动条 */
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #d6dae4; border-radius: 20px;
  border: 2px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: #bcc3d1; border: 2px solid transparent; background-clip: padding-box; }

/* 统一键盘焦点反馈（无障碍） */
:where(button, input, select, textarea, [data-act]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ============ 布局 ============ */
.topbar {
  height: 62px;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(150deg, #6172e6, #3f4fc9);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px;
  box-shadow: 0 3px 9px rgba(74, 91, 217, .32), inset 0 1px 0 rgba(255, 255, 255, .25);
  letter-spacing: -1px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.28; }
.brand-text strong { font-size: 15px; letter-spacing: -.2px; font-weight: 700; }
.brand-text small { color: var(--text-3); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.member-switch {
  display: flex; background: var(--surface-3); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 3px; gap: 2px;
}
.member-chip {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 7px;
  font-size: 12px; color: var(--text-2); white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.member-chip:hover { color: var(--text); }
.member-chip.active {
  background: var(--surface); color: var(--text); font-weight: 650;
  box-shadow: 0 1px 3px rgba(24, 32, 56, .1);
}
.icon-btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px;
  padding: 6px 13px; font-size: 12px; color: var(--text-2);
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.demo-banner {
  background: var(--warn-soft); border-bottom: 1px solid #f3e2c3; color: #8a5a10;
  padding: 8px 20px; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 14px;
}
.demo-banner b { font-weight: 700; }
.layout { display: flex; min-height: calc(100vh - 62px); }
.sidebar {
  width: 202px; flex: 0 0 202px; background: rgba(255, 255, 255, .55);
  border-right: 1px solid var(--line);
  padding: 16px 12px; position: sticky; top: 62px; height: calc(100vh - 62px);
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13px; margin-bottom: 3px; cursor: pointer; border: 0;
  background: transparent; width: 100%; text-align: left;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-item::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%) scaleY(0);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--primary);
  transition: transform .18s var(--ease);
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }
.nav-ico { width: 18px; text-align: center; font-size: 15px; opacity: .9; font-weight: 600; }
.nav-badge {
  margin-left: auto; background: var(--danger-soft); color: var(--danger);
  border-radius: 20px; padding: 1px 7px; font-size: 10px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nav-section {
  font-size: 10px; color: var(--text-3); letter-spacing: 1.4px; font-weight: 700;
  padding: 16px 12px 7px; text-transform: uppercase;
}
.nav-section:first-child { padding-top: 4px; }
.main { flex: 1; min-width: 0; padding: 26px 30px 96px; max-width: 1240px; }
.tabbar { display: none; }

/* ============ 通用组件 ============ */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-title {
  font-size: 21px; font-weight: 720; letter-spacing: -.5px; margin: 0; line-height: 1.3;
}
.page-desc { color: var(--text-3); font-size: 12px; margin-top: 5px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card-pad { padding: 18px; }
.card-head {
  padding: 15px 18px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -.1px; }
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  border-radius: var(--radius-sm); padding: 8px 15px; font-size: 13px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease),
    transform .12s var(--ease), box-shadow .16s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: #cdd4e2; background: var(--surface-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #5566e2, #4656cf);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 6px rgba(74, 91, 217, .26), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #4a5bd9, #3d4cc4); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(74, 91, 217, .34);
}
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: #f2d3cd; }
.btn-danger:hover { background: var(--danger-soft); border-color: #ebc2ba; color: var(--danger); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: var(--radius-xs); font-size: 11px; font-weight: 650; white-space: nowrap;
  line-height: 1.7;
}
.tag-company { background: var(--company-soft); color: var(--company); }
.tag-personal { background: #f1f3f7; color: var(--personal); }
.tag-shared { background: #f3edfd; color: var(--shared); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-plain { background: var(--surface-3); color: var(--text-2); }

.seg {
  display: inline-flex; background: var(--surface-3); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap;
}
.seg button {
  border: 0; background: transparent; padding: 6px 13px; border-radius: 7px;
  font-size: 12px; color: var(--text-2);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button.active {
  background: var(--surface); color: var(--primary); font-weight: 650;
  box-shadow: 0 1px 3px rgba(24, 32, 56, .1);
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 13px; outline: none; width: 100%;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring);
}
.field textarea { resize: vertical; min-height: 64px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 11px; color: var(--text-3); line-height: 1.55; }
.field-label { font-size: 12px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; color: var(--text-3); font-weight: 650;
  padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  letter-spacing: .3px;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--surface-2); }
.t-right { text-align: right; }
.t-amount { font-weight: 650; font-variant-numeric: tabular-nums; }
.t-out { color: var(--danger); }
.t-in { color: var(--ok); }

.empty { text-align: center; padding: 40px 18px; color: var(--text-3); font-size: 13px; }
.empty-ico {
  font-size: 28px; display: block; margin-bottom: 10px; opacity: .45;
  width: 52px; height: 52px; line-height: 52px; margin-left: auto; margin-right: auto;
  background: var(--surface-3); border-radius: 16px;
}

/* ============ 首页指标 ============ */
.metric {
  --accent: var(--primary);
  padding: 17px 18px 16px; position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #dde2ee; }
.metric.accent-blue { --accent: var(--primary); }
.metric.accent-warn { --accent: var(--warn); }
.metric.accent-danger { --accent: var(--danger); }
.metric.accent-ok { --accent: var(--ok); }
.metric-label {
  font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; font-weight: 550;
}
.metric-label::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px;
  background: var(--accent); opacity: .9;
}
.metric-value {
  font-size: 27px; font-weight: 720; letter-spacing: -1px; margin-top: 11px;
  font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--text);
}
.metric-foot { font-size: 11px; color: var(--text-3); margin-top: 8px; min-height: 16px; }
/* 顶部一道极细渐变，取代原先生硬的整条左侧色块 */
.metric-stripe {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 78%);
}

.formula {
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 12px; color: var(--text-2); line-height: 1.8;
  font-variant-numeric: tabular-nums;
}
.formula code {
  background: var(--surface-3); padding: 2px 6px; border-radius: var(--radius-xs);
  font-size: 11px; color: var(--primary);
}
.list-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.list-row:last-child { border-bottom: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.bullet {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; flex: 0 0 30px; font-weight: 650;
}

/* ============ 日历 ============ */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.cal-title { font-size: 18px; font-weight: 720; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--text-3); padding: 6px 0 4px; font-weight: 650; }
.cal-cell {
  min-height: 98px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
  transition: border-color .16s var(--ease), background .16s var(--ease),
    transform .16s var(--ease), box-shadow .16s var(--ease);
}
.cal-cell:hover {
  border-color: #b9c3e9; background: var(--surface);
  transform: translateY(-1px); box-shadow: var(--shadow-hover);
}
.cal-cell.blank { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.blank:hover { border-color: transparent; background: transparent; transform: none; box-shadow: none; }
.cal-cell.today {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--surface) 55%);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.cal-day {
  font-size: 12px; font-weight: 650; color: var(--text-2);
  display: flex; justify-content: space-between; align-items: center;
  font-variant-numeric: tabular-nums;
}
.cal-day .today-mark {
  font-size: 9px; background: var(--primary); color: #fff; border-radius: 5px;
  padding: 1px 5px; font-weight: 650;
}
.cal-pill {
  font-size: 10px; padding: 3px 6px; border-radius: 5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; line-height: 1.5;
}
.pill-event { background: var(--primary-soft); color: var(--primary); }
.pill-todo { background: var(--warn-soft); color: var(--warn); }
.pill-warn { background: var(--danger-soft); color: var(--danger); }
.pill-more { color: var(--text-3); font-size: 10px; padding-left: 2px; }
.cal-lunar {
  font-size: 10px; line-height: 1.3; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.cal-lunar.lunar-festival { color: var(--danger); font-weight: 650; }
.cal-lunar.lunar-term { color: var(--ok); font-weight: 600; }
.cal-legend {
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--text-3); margin-top: 14px;
  padding-top: 13px; border-top: 1px solid var(--line-soft);
}

/* ============ 待办 ============ */
.todo-item { padding: 15px 17px; border-bottom: 1px solid var(--line-soft); transition: background .16s var(--ease); }
.todo-item:hover { background: var(--surface-2); }
.todo-item:last-child { border-bottom: 0; }
.todo-top { display: flex; align-items: flex-start; gap: 10px; }
.todo-title { font-size: 13px; font-weight: 600; cursor: pointer; }
.todo-title:hover { color: var(--primary); }
.todo-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.progress-wrap { display: flex; align-items: center; gap: 11px; margin-top: 12px; }
.progress { flex: 1; height: 6px; background: var(--surface-3); border-radius: 20px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 20px; transition: width .25s var(--ease);
  background: linear-gradient(90deg, #5b6ce0, var(--primary));
}
.progress-fill.done { background: linear-gradient(90deg, #29b37d, var(--ok)); }
.progress-num { font-size: 11px; color: var(--text-2); width: 34px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
input[type=range].p-slider { flex: 1; accent-color: var(--primary); height: 18px; }
.todo-done .todo-title { text-decoration: line-through; color: var(--text-3); }
.suggest {
  background: var(--warn-soft); border: 1px solid #f2e2c4; border-radius: 10px;
  padding: 11px 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: #8a5a10;
}

/* ============ 账本 ============ */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: 7px 10px; font-size: 12px; outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.filters select:focus, .filters input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none; }
.checkbox input { accent-color: var(--primary); width: 15px; height: 15px; }
.batch-bar {
  position: sticky; bottom: 12px; background: rgba(28, 33, 48, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; border-radius: 12px; padding: 11px 15px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(20, 26, 42, .28);
  z-index: 10; margin-top: 12px;
}
.batch-bar .grow { color: #fff; font-size: 12px; }
.link-btn {
  border: 0; background: transparent; color: var(--primary); font-size: 12px;
  padding: 2px 4px; border-radius: 4px; transition: color .16s var(--ease);
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }

.stat-line {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.stat-line:last-child { border-bottom: 0; }
.stat-line b { font-variant-numeric: tabular-nums; font-weight: 650; }
.big-number { font-size: 30px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.8px; }
.receipt-thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: var(--bg); }
.receipt-empty {
  width: 38px; height: 38px; border-radius: 8px; border: 1px dashed var(--line);
  display: grid; place-items: center; color: var(--text-3); font-size: 15px;
}

/* ============ 工作台：项目 / 知识 / 设备 ============ */
.project-card { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.project-card:hover {
  transform: translateY(-2px); border-color: #d3dced; box-shadow: var(--shadow-hover);
}
.project-card .btn-sm { padding: 5px 9px; font-size: 11px; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kanban-col {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; min-width: 0;
}
.kanban-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kanban-body { display: flex; flex-direction: column; gap: 9px; max-height: 64vh; overflow-y: auto; }
.know-card { padding: 13px; transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.know-card:hover { border-color: #d3dced; transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.know-card .strong { cursor: pointer; }
.know-card .strong:hover { color: var(--primary); }
.know-excerpt {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.55;
}
.modal .card { box-shadow: none; }
.modal .table-scroll table { min-width: 480px; }

/* ============ FAB / 弹窗 / toast ============ */
.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 25; border: 0;
  background: linear-gradient(150deg, #5b6ce6, #4352cf); color: #fff;
  border-radius: 26px; height: 50px; padding: 0 19px; font-size: 14px; font-weight: 650;
  box-shadow: 0 8px 22px rgba(67, 82, 207, .38), inset 0 1px 0 rgba(255, 255, 255, .2);
  display: flex; align-items: center; gap: 7px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(67, 82, 207, .45); }
.fab:active { transform: translateY(0); }
.fab span { font-size: 13px; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(18, 24, 40, .46); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: maskIn .18s var(--ease);
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 520px;
  max-height: 90vh; overflow: auto; box-shadow: var(--shadow-pop);
  animation: modalIn .24s var(--ease);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal.wide { max-width: 720px; }
.modal-head {
  padding: 19px 21px 14px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.modal-close {
  border: 0; background: transparent; font-size: 20px; color: var(--text-3); line-height: 1;
  padding: 3px 7px; border-radius: 7px; transition: background .16s var(--ease), color .16s var(--ease);
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-body { padding: 20px 21px; display: flex; flex-direction: column; gap: 15px; }
.modal-foot { padding: 14px 21px 20px; display: flex; gap: 9px; justify-content: flex-end; }
.modal-foot .btn { min-width: 84px; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: rgba(28, 33, 48, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; padding: 11px 19px; border-radius: 10px;
  font-size: 13px; z-index: 90; opacity: 0; pointer-events: none; transition: all .24s var(--ease);
  box-shadow: 0 10px 30px rgba(20, 26, 42, .26); max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 导出报账单弹窗 ============ */
.report-form .field-row { margin-bottom: 10px; }
.report-checks {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding: 11px 13px; margin: 4px 0 12px;
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 10px;
}
.report-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 11px 13px; margin: 14px 0 10px;
  background: var(--primary-soft); border: 1px solid #dfe5fb; border-radius: 10px;
  font-size: 12px; color: var(--text-2);
}
.report-summary b { color: var(--text); font-size: 14px; }
.report-summary .t-amount { font-size: 15px; }
.report-table-wrap {
  max-height: 320px; overflow: auto; border: 1px solid var(--line);
  border-radius: 10px; -webkit-overflow-scrolling: touch;
}
.report-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 12px; }
.report-table th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2);
  text-align: left; font-weight: 650; color: var(--text-2);
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.report-table td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-sel, .mini-inp {
  width: 100%; min-width: 92px; padding: 5px 8px; font-size: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--text);
  outline: none; transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.mini-inp { min-width: 180px; }
.mini-sel:focus, .mini-inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.report-map {
  max-height: 250px; overflow: auto; border: 1px solid var(--line);
  border-radius: 10px; padding: 4px 10px;
}
.report-map-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px; border-bottom: 1px solid var(--line-soft); font-size: 12px;
}
.report-map-row:last-child { border-bottom: 0; }
.report-map-row select {
  width: 92px; padding: 5px 8px; font-size: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--text);
}
@media (max-width: 720px) {
  .report-checks { gap: 7px 12px; }
  .report-summary { gap: 6px 12px; }
  .report-table-wrap { max-height: 260px; }
}

/* ============ 日程：备忘录与附件 ============ */
.huangli-strip {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; margin-bottom: 2px;
  background: linear-gradient(100deg, var(--primary-soft), #fafbff);
  border: 1px solid #dfe5fb; border-radius: 10px;
  font-size: 12px; flex-wrap: wrap;
}
.huangli-mark {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  color: #fff; background: linear-gradient(150deg, #6172e6, #3f4fc9);
}
.huangli-bit { color: var(--text-2); font-weight: 550; white-space: nowrap; }
.huangli-sep { color: var(--text-3); margin: 0 1px; }

.cal-pill[data-act] { cursor: pointer; }
.cal-pill[data-act]:hover { filter: brightness(.97); outline: 1px solid var(--primary); }
.pill-flag {
  display: inline-block; margin-right: 4px; padding: 0 3px; border-radius: 3px;
  background: var(--danger); color: #fff; font-size: 9px; line-height: 14px;
}
.att-badge {
  margin-left: 5px; padding: 0 4px; border-radius: 4px; white-space: nowrap;
  background: var(--company-soft); color: var(--company); font-size: 9px; line-height: 15px;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.detail-note { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.detail-h4 { margin: 16px 0 8px; font-size: 13px; font-weight: 650; }
.memo-input { min-height: 118px; line-height: 1.7; font-size: 13px; }
.memo-view {
  white-space: pre-wrap; word-break: break-word; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 13px; line-height: 1.75; min-height: 54px;
  max-height: 320px; overflow: auto;
}
.att-block { margin: 14px 0 4px; }
.att-pick {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 9px 12px; text-align: center;
  border: 1px dashed #c9d0e0; border-radius: 10px;
  background: var(--surface-2); color: var(--primary); font-size: 12px; font-weight: 550; cursor: pointer;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.att-pick:hover { border-color: var(--primary); background: var(--primary-soft); }
.att-pick input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: 0; padding: 0;
}
.att-hint { font-size: 11px; color: var(--text-3); line-height: 1.6; margin: 7px 0; }
.att-hint.warn { color: var(--danger); }
.att-list { margin-top: 8px; }
.att-list:empty { display: none; }
.att-item {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
}
.att-thumb {
  width: 46px; height: 46px; flex: none; object-fit: cover;
  border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; background: var(--surface-2);
}
.att-file {
  width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
  color: var(--text-2); font-size: 10px; font-weight: 700; cursor: pointer;
}
.att-info { flex: 1; min-width: 0; }
.att-name { font-size: 12px; font-weight: 550; }
.att-ops { display: flex; gap: 8px; flex: none; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; }
.att-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  background: var(--surface); text-align: center; min-width: 0;
}
.att-thumb.big { width: 100%; height: 108px; object-fit: contain; cursor: zoom-in; }
.att-file.big { width: 100%; height: 108px; font-size: 18px; }
.att-card .att-name { margin-top: 8px; }
.att-card .link-btn { margin-top: 4px; }
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(16, 22, 34, .84);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: maskIn .16s var(--ease);
}
.lightbox-inner {
  width: min(92vw, 900px); max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .34);
  animation: modalIn .22s var(--ease);
}
.lightbox-bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 13px;
  border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-2);
}
.lightbox-img {
  flex: 1; min-height: 0; padding: 12px; overflow: auto; text-align: center;
  background: var(--surface-2);
}
.lightbox-img img { max-width: 100%; max-height: 74vh; object-fit: contain; }
@media (max-width: 720px) {
  .att-grid { grid-template-columns: repeat(2, 1fr); }
  .memo-input { min-height: 100px; }
  .att-ops { gap: 4px; }
  .att-item { gap: 7px; padding: 7px; }
}
@media (max-width: 380px) {
  .att-badge { display: none; }
  .att-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
}

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .kanban { grid-template-columns: 1fr; }
  .kanban-body { max-height: none; }
  .modal.wide { max-width: 100%; }
  .project-card .row.wrap { gap: 5px; }
}
@media (max-width: 760px) {
  .topbar { height: 54px; padding: 0 14px; }
  .brand-text small { display: none; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
  .member-chip { padding: 5px 8px; font-size: 11px; }
  .icon-btn { padding: 5px 9px; font-size: 11px; }
  .demo-banner { padding: 7px 12px; font-size: 11px; gap: 8px; flex-wrap: wrap; text-align: center; }
  .sidebar { display: none; }
  .layout { min-height: calc(100vh - 54px); }
  .main { padding: 17px 14px 116px; }
  .page-title { font-size: 19px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 28;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
  }
  .tabbar::-webkit-scrollbar { display: none; }
  .tab {
    border: 0; background: transparent; flex: 1 0 56px; min-width: 56px;
    display: flex; flex-direction: column;
    align-items: center; gap: 2px; padding: 5px 0; color: var(--text-3); font-size: 10px;
    border-radius: 8px; transition: color .16s var(--ease);
  }
  .tab .nav-ico { font-size: 18px; }
  .tab.active { color: var(--primary); font-weight: 650; }
  .fab { right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); height: 46px; padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-4.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 14px; }
  .metric-value { font-size: 22px; }
  .cal-cell { min-height: 64px; padding: 5px; gap: 2px; }
  .cal-lunar { font-size: 9px; }
  .cal-pill { font-size: 9px; padding: 2px 4px; }
  .cal-day { font-size: 11px; }
  .cal-grid { gap: 4px; }
  .card-head { padding: 14px; }
  .card-pad { padding: 15px; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-scroll table { min-width: 620px; }
  .field-row { grid-template-columns: 1fr; }
  .modal { max-height: 88vh; border-radius: 14px; }
  .modal-body, .modal-head, .modal-foot { padding-left: 15px; padding-right: 15px; }
  .batch-bar { bottom: calc(68px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .cal-cell { min-height: 56px; }
  .cal-pill { display: none; }
  .cal-day .today-mark { display: none; }
}

/* ============ 降低动效偏好（无障碍） ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
