/* 部门待办中心 —— 界面样式（手机优先，电脑自适应） */

:root {
  --brand: #1e5eff;
  --brand-dark: #1a4fd6;
  --brand-soft: #eaf0ff;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1b2330;
  --text-2: #5c6b82;
  --text-3: #8b98ab;
  --line: #e6eaf2;
  --urgent: #f4333c;
  --high: #ff8a1f;
  --normal: #1e5eff;
  --low: #8b98ab;
  --ok: #12a150;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(24, 39, 75, 0.06);
  --shadow-lg: 0 12px 40px rgba(24, 39, 75, 0.16);
  --side-w: 224px;
  --tab-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 600; }
code { background: var(--brand-soft); color: var(--brand-dark); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.muted { color: var(--text-3); font-size: 13px; margin: 8px 0 0; }
.hint { float: right; font-weight: 400; font-size: 12px; color: var(--text-3); }

/* ---------------------------- 通用控件 ---------------------------- */

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--text-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: #fff; color: var(--urgent); border-color: #ffd6d8; }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

input, select, textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30, 94, 255, 0.12); }
textarea { resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6b82' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; padding-right: 30px; }

.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.req { color: var(--urgent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin: 10px 0 14px; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.form-error { color: var(--urgent); font-size: 13px; margin: 4px 0 10px; }

.panel { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.panel > h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.form .field:last-of-type { margin-bottom: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }

.select {
  appearance: none;
}

/* ---------------------------- 登录页 ---------------------------- */

.login-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: linear-gradient(160deg, #eef3ff 0%, #f7f9fc 45%, #eef6ff 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
}
.brand { display: flex; gap: 13px; align-items: center; margin-bottom: 24px; }
.brand-logo { width: 46px; height: 46px; border-radius: 12px; }
.brand h1 { font-size: 20px; }
.brand p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); }
.login-tip { font-size: 12px; color: var(--text-3); margin: 18px 0 0; line-height: 1.7; }
.wecom-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; margin-top: 12px; padding: 12px; border-radius: 11px;
  background: #fff; border: 1px solid #d5e3ff; color: #1e5eff; font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.wecom-btn:hover { background: #f4f8ff; }

/* ---------------------------- 框架布局 ---------------------------- */

.app { display: block; min-height: 100%; }
.sidebar { display: none; }
.main { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: calc(12px + env(safe-area-inset-top));
}
.topbar-left { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.topbar h2 { font-size: 17px; }
.topbar-sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative;
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--urgent); border: 2px solid #fff; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; flex: none; font-family: inherit;
}
.avatar-lg { width: 54px; height: 54px; font-size: 20px; }

.content { flex: 1; padding: 14px 12px calc(var(--tab-h) + 26px); max-width: 1160px; width: 100%; margin: 0 auto; }
.view { animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------------------------- 底部导航 ---------------------------- */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  position: relative;
  flex: 1 1 0; min-width: 0;
  border: none; background: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-3); font-size: 10.5px; padding: 0;
}
.tabbar button.on { color: var(--brand); }
.tabbar svg { width: 22px; height: 22px; }
.tab-mic svg { width: 26px; height: 26px; }
.tabbar button.tab-mic { color: var(--brand); }
.tabbar button.tab-mic svg {
  background: var(--brand); color: #fff; padding: 9px; border-radius: 50%;
  width: 44px; height: 44px; margin-top: -16px; box-shadow: 0 6px 16px rgba(30, 94, 255, 0.4);
  stroke: #fff;
}
.badge {
  position: absolute; top: 6px; right: 50%; margin-right: -22px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--urgent); color: #fff; font-size: 11px; font-style: normal;
  display: flex; align-items: center; justify-content: center;
}

/* ---------------------------- 工具栏 / 筛选 ---------------------------- */

.toolbar { margin-bottom: 12px; }
.seg {
  display: flex; gap: 4px; padding: 4px; background: #e9eef8; border-radius: 11px;
  margin-bottom: 10px; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1; white-space: nowrap; border: none; cursor: pointer; font-family: inherit;
  background: transparent; color: var(--text-2); font-size: 13.5px;
  padding: 8px 12px; border-radius: 8px; transition: 0.15s;
}
.seg button.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: var(--shadow); }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar-row .search { min-width: 170px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px;
}
.search svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.search input { border: none; padding: 9px 0; background: transparent; }
.search input:focus { box-shadow: none; }
.toolbar-row .select { width: auto; flex: none; font-size: 13.5px; padding: 9px 28px 9px 11px; }

/* ---------------------------- 待办卡片 ---------------------------- */

.todo-list { display: grid; gap: 10px; }
.todo-card {
  position: relative;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 13px 14px 13px 17px; cursor: pointer; overflow: hidden;
  transition: 0.15s;
}
.todo-card:hover { box-shadow: 0 6px 20px rgba(24, 39, 75, 0.1); transform: translateY(-1px); }
.todo-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--normal); }
.todo-card.p-low::before { background: var(--low); }
.todo-card.p-normal::before { background: var(--normal); }
.todo-card.p-high::before { background: var(--high); }
.todo-card.p-urgent::before { background: var(--urgent); }
.todo-card.done { opacity: 0.62; }
.todo-card.done .tc-title { text-decoration: line-through; color: var(--text-2); }

.tc-head { display: flex; gap: 10px; align-items: flex-start; }
.tc-title { flex: 1; font-size: 15.5px; font-weight: 500; line-height: 1.45; word-break: break-word; }
.status-pill {
  flex: none; font-size: 11.5px; padding: 2px 8px; border-radius: 20px;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap;
}
.status-pill.doing { background: #fff3e3; color: #c26800; }
.status-pill.done { background: #e8f7ee; color: var(--ok); }
.status-pill.cancelled { background: #f0f2f6; color: var(--text-3); }

.tc-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.tc-meta i { font-style: normal; display: inline-flex; align-items: center; gap: 4px; }
.tc-meta .overdue { color: var(--urgent); font-weight: 600; }
.tc-meta .today { color: var(--high); font-weight: 600; }
.tc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: #f1f4f9; color: var(--text-2); }
.tc-actions { display: flex; gap: 8px; margin-top: 11px; }
.tc-actions .btn { flex: none; }

/* 批量模式 */
.todo-card .pick {
  position: absolute; top: 10px; right: 10px; width: 22px; height: 22px;
  border-radius: 6px; border: 2px solid #c6d2e5; background: #fff; z-index: 2;
}
.todo-card .pick.on { background: var(--brand); border-color: var(--brand); }
.todo-card .pick.on::after {
  content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.todo-card.selectable { cursor: pointer; }
.todo-card.picked { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.todo-card.selectable .status-pill { margin-right: 26px; }
.batch-on .content { padding-bottom: calc(var(--tab-h) + 118px + env(safe-area-inset-bottom)); }
.batch-bar {
  position: fixed; left: 0; right: 0; z-index: 26;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(24, 39, 75, 0.1);
  padding: 9px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.batch-bar .bb-count { font-size: 13px; color: var(--text-2); font-weight: 600; margin-right: auto; }
.batch-bar .bb-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.empty { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty p { margin: 0 0 14px; }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); z-index: 25;
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(30, 94, 255, 0.42);
  display: flex; align-items: center; justify-content: center;
}
.fab svg { width: 24px; height: 24px; stroke-width: 2.2; }

/* ---------------------------- 看板 ---------------------------- */

.cal-toolbar { margin-bottom: 10px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav b { font-size: 15px; min-width: 104px; text-align: center; }
.cal-nav .btn { margin-left: auto; }
.cal-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cal-summary span {
  background: #fff; border-radius: 20px; padding: 5px 12px; font-size: 12.5px;
  box-shadow: var(--shadow); color: var(--text-2);
}
.cal-summary span b { color: var(--text); font-size: 14px; margin-right: 3px; }
.cal-summary span.danger { color: var(--urgent); }
.cal-summary span.danger b { color: var(--urgent); }

.cal-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; margin-bottom: 14px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.cal-week span { text-align: center; font-size: 12px; color: var(--text-3); }
.cal-week span.wk { color: #c26800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  position: relative; min-height: 54px; border-radius: 9px; padding: 4px 5px 3px;
  background: #f8fafd; cursor: pointer; overflow: hidden; transition: 0.12s;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-cell:hover { background: #eef4ff; }
.cal-cell.out { opacity: 0.4; }
.cal-cell.today { outline: 2px solid var(--brand); outline-offset: -2px; }
.cal-cell.sel { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.cal-cell.overdue { background: #fff3f3; }
.cal-day { font-size: 12.5px; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; }
.cal-cell.today .cal-day { color: var(--brand); font-weight: 700; }
.cal-cell.overdue .cal-day { color: var(--urgent); font-weight: 600; }
.cal-count { font-size: 10.5px; background: var(--brand); color: #fff; border-radius: 8px; padding: 0 5px; line-height: 15px; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 1px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--normal); display: block; }
.cal-cell .cal-item {
  font-size: 11px; line-height: 1.35; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: none; /* 手机端格子窄，只显示圆点；电脑端再显示标题 */
}
.cal-item.urgent { color: var(--urgent); }
.cal-item.high { color: #c26800; }
.cal-item.done { color: var(--ok); text-decoration: line-through; }
.cal-more { font-size: 10.5px; color: var(--text-3); display: none; }
.cal-legend { font-size: 12px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 20px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.lg-urgent { background: var(--urgent); }
.lg-high { background: var(--high); }
.lg-normal { background: var(--normal); }
.lg-done { background: var(--ok); }
.lg-overdue { background: #ffd6d8; box-shadow: inset 0 0 0 1px var(--urgent); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat-card b { display: block; font-size: 25px; font-weight: 600; line-height: 1.2; }
.stat-card span { font-size: 12.5px; color: var(--text-3); }
.stat-card.warn b { color: var(--high); }
.stat-card.danger b { color: var(--urgent); }
.stat-card.ok b { color: var(--ok); }

.rank { display: grid; gap: 11px; }
.rank-row { display: grid; grid-template-columns: 96px 1fr 38px; align-items: center; gap: 10px; font-size: 13.5px; }
.rank-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.rank-bar { height: 8px; border-radius: 5px; background: #eef1f7; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #4b82ff, #1e5eff); }
.rank-row b { text-align: right; font-weight: 600; }

.mini-list { display: grid; gap: 9px; }
.mini-item {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border-radius: 11px; background: #f8fafd; cursor: pointer; font-size: 14px;
}
.mini-item:hover { background: var(--brand-soft); }
.mini-item .mi-main { flex: 1; min-width: 0; }
.mini-item .mi-title { font-weight: 500; word-break: break-word; }
.mini-item .mi-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.mini-item.unread { background: #f2f6ff; }
.mini-item.unread .mi-title::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--urgent); margin-right: 7px; vertical-align: middle; }

/* ---------------------------- 语音记录 ---------------------------- */

.import-panel { border: 1px solid #dce6ff; }
.drop-zone {
  border: 2px dashed #b9cdfd; border-radius: 14px; background: #f8fbff;
  padding: 18px 14px; text-align: center; transition: 0.15s; cursor: pointer;
}
.drop-zone.over { border-color: var(--brand); background: #eef4ff; transform: scale(1.005); }
.drop-zone.busy { opacity: 0.7; pointer-events: none; }
.dz-emoji { font-size: 22px; line-height: 1; margin-bottom: 8px; letter-spacing: 4px; }
.dz-main { margin: 0 0 4px; font-size: 14px; }
.dz-sub { margin: 0 0 12px; font-size: 12px; color: var(--text-3); line-height: 1.6; }
.paste-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.paste-row textarea { flex: 1; min-height: 44px; }

.import-head {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 12px; background: #f4f8ff; border-radius: 11px; font-size: 13px; margin-bottom: 10px;
}
.import-head b { font-weight: 600; }
.import-warn { background: #fff7e8; color: #a35c00; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 10px; }
.cand-list { display: grid; gap: 9px; max-height: 60vh; overflow-y: auto; padding-right: 2px; }
.cand-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.cand-card.on { border-color: var(--brand); background: #f7faff; }
.cand-top { display: flex; gap: 9px; align-items: flex-start; }
.cand-top input[type="checkbox"] { width: 19px; height: 19px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.cand-title { flex: 1; min-width: 0; border: none; padding: 2px 0; font-size: 14.5px; font-weight: 500; background: transparent; resize: none; overflow: hidden; font-family: inherit; color: inherit; line-height: 1.45; display: block; min-height: 21px; }
.cand-title:focus { box-shadow: none; border-bottom: 1px solid var(--brand); border-radius: 0; }
.cand-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 9px 0 0 28px; }
.cand-fields select, .cand-fields input { padding: 6px 9px; font-size: 13px; }
.cand-fields .full { grid-column: 1 / -1; }
.cand-meta { margin: 7px 0 0 28px; font-size: 11.5px; color: var(--text-3); }

/* ---------- 导入候选中的截图/附件 ---------- */
.cand-atts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 0 28px; }
.cand-atts img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.cand-atts-text { font-size: 12px; color: var(--text-2); }

/* ---------- 详情页截图与附件 ---------- */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.attach-img { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.attach-img img { width: 100%; height: 88px; object-fit: cover; display: block; }
.attach-files { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.attach-file { font-size: 13px; color: var(--brand-dark); text-decoration: none; }
.attach-file:hover { text-decoration: underline; }
.import-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.import-actions .count { font-size: 13px; color: var(--text-2); margin-right: auto; }
.raw-preview { margin: 10px 0; }
.raw-preview summary { cursor: pointer; font-size: 13px; color: var(--brand); }
.raw-preview pre {
  max-height: 220px; overflow: auto; background: #f8fafd; border-radius: 10px;
  padding: 10px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  font-family: inherit; margin: 8px 0 0;
}

.capture-intro {
  background: linear-gradient(165deg, #eff4ff, #f8fbff);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px; text-align: center;
  box-shadow: var(--shadow);
}
.mic-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mic-btn {
  width: 92px; height: 92px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(160deg, #4b86ff, #1e5eff); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(30, 94, 255, 0.38);
  transition: 0.2s;
}
.mic-btn svg { width: 40px; height: 40px; stroke-width: 1.7; }
.mic-btn.recording { background: linear-gradient(160deg, #ff6b6b, #f4333c); box-shadow: 0 10px 26px rgba(244, 51, 60, 0.4); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.mic-state { font-size: 13px; color: var(--text-2); max-width: 420px; }
.mic-wave { display: flex; gap: 4px; align-items: flex-end; height: 22px; }
.mic-wave i { width: 4px; border-radius: 2px; background: var(--urgent); animation: wave 0.9s infinite ease-in-out; }
.mic-wave i:nth-child(1) { height: 8px; animation-delay: 0s; }
.mic-wave i:nth-child(2) { height: 16px; animation-delay: 0.12s; }
.mic-wave i:nth-child(3) { height: 22px; animation-delay: 0.24s; }
.mic-wave i:nth-child(4) { height: 14px; animation-delay: 0.36s; }
.mic-wave i:nth-child(5) { height: 9px; animation-delay: 0.48s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1.2); } }
.capture-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 12px; }
.capture-hint { font-size: 12px; color: var(--text-3); width: 100%; }

/* ---------------------------- 我的 ---------------------------- */

.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.profile-top b { font-size: 17px; display: block; }
.profile-top small { color: var(--text-3); font-size: 12.5px; }
.profile-info { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13.5px; }
.profile-info dt { color: var(--text-3); }
.profile-info dd { margin: 0; color: var(--text); }

/* ---------------------------- 表格 ---------------------------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--text-3); font-weight: 500; font-size: 12.5px; }
tbody tr:hover { background: #f8fafd; }
td .btn { padding: 4px 9px; font-size: 12.5px; }
.role-tag { font-size: 11.5px; padding: 2px 7px; border-radius: 6px; background: #f1f4f9; color: var(--text-2); }
.role-tag.admin { background: #ffe9ea; color: var(--urgent); }
.role-tag.manager { background: var(--brand-soft); color: var(--brand); }

/* ---------------------------- 抽屉 / 弹窗 ---------------------------- */

.mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 30, 48, 0.42);
  display: flex; align-items: flex-end; justify-content: center;
  animation: maskIn 0.18s ease;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  background: var(--bg); width: 100%; max-width: 640px;
  border-radius: 18px 18px 0 0; max-height: 92vh;
  display: flex; flex-direction: column;
  animation: sheetIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes sheetIn { from { transform: translateY(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff;
  border-radius: 18px 18px 0 0; flex: none;
}
.sheet-title { font-weight: 600; font-size: 15px; }
.sheet-body { padding: 14px 12px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; }

.modal {
  background: #fff; border-radius: 16px; width: calc(100% - 40px); max-width: 420px;
  margin: auto; padding: 20px; box-shadow: var(--shadow-lg);
  animation: sheetIn 0.2s ease;
  max-height: 88vh; display: flex; flex-direction: column;
}
.mask.center { align-items: center; }
.modal h3 { font-size: 16px; margin-bottom: 12px; }
.modal-body { overflow-y: auto; }
.modal-body .field:last-child { margin-bottom: 0; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.detail-title { font-size: 19px; font-weight: 600; line-height: 1.45; margin-bottom: 10px; }
.detail-flags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 74px 1fr; gap: 9px 12px; font-size: 14px; align-items: center; }
.kv dt { color: var(--text-3); font-size: 13px; }
.kv dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv dd .select, .kv dd input { max-width: 220px; padding: 7px 10px; font-size: 13.5px; }
.detail-content { background: #fff; border-radius: 12px; padding: 12px 14px; margin: 14px 0; white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.timeline { display: grid; gap: 12px; }
.tl-item { display: flex; gap: 10px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: none; }
.tl-dot.status { background: var(--ok); }
.tl-main { flex: 1; font-size: 13.5px; }
.tl-main .tl-head { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.tl-main .tl-text { white-space: pre-wrap; word-break: break-word; }
.comment-box { display: flex; gap: 8px; margin-top: 14px; }
.comment-box input { flex: 1; }

/* ---------------------------- 提示条 ---------------------------- */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 30px); transform: translateX(-50%);
  z-index: 90; background: rgba(27, 35, 48, 0.94); color: #fff;
  padding: 10px 18px; border-radius: 22px; font-size: 13.5px; max-width: 84vw; text-align: center;
  animation: maskIn 0.2s ease;
}

/* ---------------------------- 电脑端 ---------------------------- */

@media (min-width: 900px) {
  .app { display: flex; }
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; flex: none;
    width: var(--side-w); min-height: 100vh; position: sticky; top: 0;
    background: #fff; border-right: 1px solid var(--line);
  }
  .sidebar-brand {
    display: flex; align-items: center; gap: 10px; padding: 18px 16px;
    font-weight: 600; font-size: 15.5px; border-bottom: 1px solid var(--line);
  }
  .sidebar-brand img { width: 30px; height: 30px; border-radius: 8px; }
  .side-nav { padding: 12px 10px; display: grid; gap: 3px; flex: 1; align-content: start; }
  .side-item {
    position: relative;
    display: flex; align-items: center; gap: 11px; width: 100%;
    border: none; background: none; cursor: pointer; font-family: inherit;
    padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-size: 14.5px; text-align: left;
  }
  .side-item:hover { background: #f5f8fe; color: var(--brand); }
  .side-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
  .side-item .badge { position: static; margin-left: auto; }
  .sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .who { min-width: 0; }
  .who b { display: block; font-size: 14px; }
  .who small { color: var(--text-3); font-size: 12px; }

  .content { padding: 18px 22px 40px; }
  .topbar { padding: 14px 22px; }
  .topbar h2 { font-size: 19px; }
  .fab { right: 28px; bottom: 28px; }

  .todo-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .cal-cell { min-height: 84px; padding: 6px 7px 5px; }
  .cal-dots { display: none; }
  .cal-cell .cal-item { display: block; }
  .cal-more { display: block; }
  .cal-week span { font-size: 13px; }

  .mask { align-items: center; }
  .sheet { border-radius: 18px; max-width: 620px; max-height: 86vh; }
  .sheet-head { border-radius: 18px 18px 0 0; }
  .toast { bottom: 40px; }
}

@media (min-width: 1400px) {
  .todo-list { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
}
