/* ==========================================================================
   序 · 待办与记事 —— 样式表
   设计基调：米白纸面、暖棕线条、衬线标题、克制的留白
   ========================================================================== */

:root {
  --bg: #f6f3ed;
  --bg-deep: #efeae1;
  --surface: #fffdf8;
  --surface-2: #f2ede4;
  --surface-3: #eae3d7;
  --ink: #211e18;
  --ink-2: #4b453c;
  --muted: #8a8172;
  --line: #e6dfd3;
  --line-2: #d5cab8;
  --accent: #7d4f2a;
  --accent-2: #a4703f;
  --accent-soft: #f3e9dc;
  --accent-ink: #68401f;
  --danger: #a8442f;
  --danger-soft: #f8e9e4;
  --ok: #4f6b5d;
  --ok-soft: #e9f0ea;
  --warn: #b07a34;
  --shadow-sm: 0 1px 2px rgba(48, 36, 22, .04);
  --shadow: 0 1px 2px rgba(48, 36, 22, .04), 0 10px 30px rgba(48, 36, 22, .055);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 262px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia,
    "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #15130f;
  --bg-deep: #100e0b;
  --surface: #1d1a15;
  --surface-2: #242019;
  --surface-3: #2c271f;
  --ink: #efe8dc;
  --ink-2: #cdc3b3;
  --muted: #978d7c;
  --line: #322c23;
  --line-2: #443b2e;
  --accent: #c69a6a;
  --accent-2: #d9b184;
  --accent-soft: #2a2219;
  --accent-ink: #e4bd92;
  --danger: #d4705a;
  --danger-soft: #33211c;
  --ok: #86a795;
  --ok-soft: #1e2a24;
  --warn: #cfa05c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul { list-style: none; padding: 0; }
svg.i { width: 18px; height: 18px; flex: 0 0 auto; }
img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hint { color: var(--muted); font-size: 12px; }
.text-danger { color: var(--danger); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot.is-square { border-radius: 2px; }

/* ------------------------------------------------------------------ 布局 */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 21px; line-height: 1;
  letter-spacing: 0; padding-bottom: 2px;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-serif); font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: 11px; letter-spacing: 1.6px; }

.nav-main { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  color: var(--ink-2); font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.nav-item svg { color: var(--muted); transition: color .15s ease; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.is-active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.nav-item.is-active svg { color: var(--accent); }
.nav-count {
  margin-left: auto; font-style: normal; font-size: 11.5px;
  color: var(--muted); background: var(--surface-2);
  padding: 1px 7px; border-radius: 20px; min-width: 22px; text-align: center;
}
.nav-item.is-active .nav-count { background: var(--accent-soft); color: var(--accent-ink); }

.side-block { display: flex; flex-direction: column; gap: 1px; }
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 6px; font-size: 11.5px; letter-spacing: 1.4px;
  color: var(--muted); text-transform: uppercase;
}
.side-more { font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.side-more:hover { color: var(--accent); }
.nav-sub {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2);
  transition: background .15s ease;
}
.nav-sub span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub:hover { background: var(--surface-2); }
.nav-sub.is-active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.side-empty { padding: 2px 10px 4px; font-size: 12px; color: var(--muted); line-height: 1.6; }

.side-user {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px;
}
.user-chip { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; padding: 5px; border-radius: 10px; }
.user-chip:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar-btn { cursor: pointer; border: none; }
.user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-text strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 32px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand-mini { display: none; }
.top-search {
  display: flex; align-items: center; gap: 9px;
  width: min(380px, 42vw); padding: 7px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); transition: border-color .15s ease, box-shadow .15s ease;
}
.top-search:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.top-search input {
  border: none; background: none; outline: none; width: 100%;
  font-size: 13.5px; color: var(--ink);
}
.top-search input::placeholder { color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: none; background: none;
  display: inline-grid; place-items: center; color: var(--ink-2); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 7px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.bell { position: relative; }
.bell-dot {
  position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 600;
  border-radius: 9px; display: grid; place-items: center; padding: 0 3px;
  border: 2px solid var(--bg);
}

.content { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 30px 32px 40px; }

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--line-2); color: var(--ink); background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-danger-ghost { background: transparent; border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 3px 8px; font-size: 11.5px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-icon-text span { display: inline; }

/* ------------------------------------------------------------------ 卡片/面板 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px 0;
}
.card-head h2 { font-size: 15px; letter-spacing: .3px; font-weight: 600; }
.card-head a { color: var(--muted); font-size: 12.5px; }
.card-head a:hover { color: var(--accent); }
.card-head-note { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 22px 10px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 0 8px;
}
.panel-head h2 { font-size: 14.5px; font-weight: 600; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.panel-head h2 em {
  font-style: normal; font-size: 11.5px; color: var(--muted); background: var(--surface-2);
  padding: 1px 7px; border-radius: 20px; font-weight: 500;
}
.panel-more { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 2px; }
.panel-more svg { width: 14px; height: 14px; }
.panel-more:hover { color: var(--accent); }
.panel-note { color: var(--muted); font-size: 12px; }
.panel-alert { border-left: 3px solid var(--danger); }
.panel-alert .panel-head h2 { color: var(--danger); }
.panel-soft { background: var(--bg-deep); }
.panel-soft .panel-head h2 { font-size: 14px; }

/* ------------------------------------------------------------------ 任务行 */
.task-list { display: flex; flex-direction: column; }
.task {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 6px; border-bottom: 1px solid var(--line);
  border-radius: 8px; transition: background .12s ease;
  position: relative;
}
.task.is-prio-3::before, .task.is-prio-4::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 2px; border-radius: 2px; background: var(--warn);
}
.task.is-prio-4::before { width: 3px; background: var(--danger); }
.task.is-done.is-prio-3::before, .task.is-done.is-prio-4::before { opacity: .35; }
.task.is-prio-4 .task-title { font-weight: 600; }
.task:last-child { border-bottom: none; }
.task:hover { background: var(--surface-2); }
.tick-form { padding-top: 1px; }
.tick {
  position: relative;
  width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--line-2);
  background: transparent; cursor: pointer; display: grid; place-items: center;
  padding: 0; color: transparent; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.tick::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.tick svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tick:hover { border-color: var(--accent); color: var(--accent); }
.task.is-done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.tick-sm { width: 17px; height: 17px; }
.tick-sm svg { width: 15px; height: 15px; stroke-width: 1.6; }

.task-main { min-width: 0; flex: 1; }
.task-title { display: inline-block; font-size: 14px; color: var(--ink); line-height: 1.5; word-break: break-word; }
.task-title:hover { color: var(--accent); }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px; }
.due { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.due.is-overdue { color: var(--danger); font-weight: 500; }
.due.is-today { color: var(--accent); font-weight: 600; }
.due.is-soon { color: var(--ink-2); }
.due.is-none { color: var(--muted); }

.prio {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; line-height: 1.7; font-weight: 500;
  padding: 0 7px; border-radius: 5px; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.prio.p1 { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.prio.p2 { color: var(--ink-2); background: var(--surface-2); }
.prio.p3 { color: #8a5a1c; background: rgba(176, 122, 52, .15); }
.prio.p4 { color: #fff; background: var(--danger); }
[data-theme="dark"] .prio.p3 { color: #e2b77c; background: rgba(207, 160, 92, .18); }
.prio-lg { font-size: 11.5px; padding: 2px 10px; border-radius: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 1px 7px; border-radius: 6px;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip-group { background: var(--accent-soft); color: var(--accent-ink); }
.chip-check { font-variant-numeric: tabular-nums; }
.chip-project .dot { width: 6px; height: 6px; }
.tag { font-size: 11.5px; color: var(--muted); }
.tag:hover { color: var(--accent); }

.task-side { display: flex; align-items: center; gap: 2px; padding-top: 0; }
.row-link { color: var(--line-2); opacity: 0; transition: opacity .15s ease; }
.row-link svg { width: 15px; height: 15px; }
.task:hover .row-link { opacity: 1; }
.row-link:hover { color: var(--accent); }

.mini-avatar {
  width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 10.5px; color: #fff; font-weight: 600; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.mini-avatar.is-empty { background: var(--surface-3); color: var(--muted); box-shadow: none; }
.mini-avatar.is-more { background: var(--surface-2); color: var(--muted); box-shadow: none; font-size: 10px; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .mini-avatar { margin-right: -6px; border: 2px solid var(--surface); }
.task-list.is-quiet .task-title { color: var(--muted); }
.card-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px; box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ 页头 / 筛选 */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-serif); font-size: 27px; font-weight: 600;
  letter-spacing: .8px; line-height: 1.3;
}
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 2px; gap: 2px; }
.seg-item, .seg label span {
  display: inline-block; padding: 5px 12px; border-radius: 7px;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.seg-item:hover, .seg label span:hover { color: var(--ink); }
.seg-item.is-on, .seg input:checked + span {
  background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg label { display: inline-flex; }
.seg-tabs { background: transparent; border: 1px solid var(--line); }
.seg-tabs .seg-item { padding: 5px 14px; }
.seg-tabs .seg-item.is-on { background: var(--ink); color: var(--bg); }

.filters { padding: 12px 14px; margin-bottom: 20px; }
.filter-row { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.filter-field { display: flex; flex-direction: column; gap: 3px; }
.filter-field > span { font-size: 11px; color: var(--muted); padding-left: 2px; letter-spacing: .4px; }
.filter-search {
  display: flex; align-items: center; gap: 6px; flex: 1 1 180px; min-width: 150px;
  border: 1px solid var(--line); border-radius: 8px; padding: 0 9px;
  background: var(--bg); color: var(--muted);
}
.filter-search svg { width: 15px; height: 15px; }
.filter-search input { border: none; background: none; outline: none; width: 100%; padding: 7px 0; font-size: 13px; color: var(--ink); }
.filter-search:focus-within { border-color: var(--line-2); }
.tag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.tag-row-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); margin-right: 2px; }
.tag-row-label svg { width: 13px; height: 13px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px; font-size: 11.5px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid transparent;
}
.tag-chip em { font-style: normal; color: var(--muted); font-size: 10.5px; }
.tag-chip:hover { border-color: var(--line-2); }
.tag-chip.is-on { background: var(--accent-soft); color: var(--accent-ink); }
.filter-more { display: contents; }
.filter-toggle {
  display: none; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.filter-toggle svg { width: 15px; height: 15px; }
.filter-toggle:hover { border-color: var(--line-2); color: var(--ink); }
.board-filters { margin-bottom: 18px; }
.board-filters .filter-field { min-width: 108px; }
.board-list-link { margin-left: auto; }

.group-block { margin-bottom: 22px; }
.group-head {
  display: flex; align-items: baseline; gap: 8px; padding: 0 4px 8px;
}
.group-head h2 { font-size: 13px; font-weight: 600; letter-spacing: 1px; color: var(--ink-2); }
.group-head span { font-size: 11.5px; color: var(--muted); }
.list-note { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0; }

/* ------------------------------------------------------------------ 欢迎卡 */
.welcome {
  padding: 46px 32px 40px; text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-deep) 100%);
}
.welcome-mark {
  display: inline-grid; place-items: center; width: 46px; height: 46px;
  border-radius: 13px; background: var(--ink); color: var(--bg);
  font-family: var(--font-serif); font-size: 24px; padding-bottom: 2px;
  margin-bottom: 14px;
}
.welcome h2 { font-family: var(--font-serif); font-size: 22px; font-weight: 600; letter-spacing: .8px; }
.welcome-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.welcome-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.welcome-tips {
  display: flex; justify-content: center; gap: 28px; flex-wrap: wrap;
  margin-top: 30px; padding-top: 20px; border-top: 1px dashed var(--line);
}
.welcome-tips li { display: flex; flex-direction: column; gap: 1px; font-size: 11.5px; color: var(--muted); }
.welcome-tips strong { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

/* ------------------------------------------------------------------ 空状态 */
.empty { padding: 36px 20px 40px; text-align: center; }
.empty-icon {
  width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); display: grid; place-items: center;
}
.empty-icon svg { width: 21px; height: 21px; }
.empty-title { font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.empty-hint { font-size: 12.5px; color: var(--muted); max-width: 360px; margin: 0 auto; line-height: 1.7; }

/* ------------------------------------------------------------------ 今日 */
.hero {
  display: flex; align-items: stretch; justify-content: space-between; gap: 20px;
  margin-bottom: 24px;
}
.hero-main { flex: 1; min-width: 0; padding-top: 4px; }
.eyebrow { font-size: 12px; letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; }
.hero h1 {
  font-family: var(--font-serif); font-size: 34px; font-weight: 600;
  letter-spacing: 1px; margin: 8px 0 6px; line-height: 1.25;
}
.hero-sub { color: var(--ink-2); font-size: 13.5px; }
.hero-sub strong { color: var(--accent); font-weight: 600; }

.quick-add {
  display: flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 7px 9px 7px 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 13px; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.quick-add:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.qa-plus { color: var(--muted); display: grid; place-items: center; }
.qa-plus svg { width: 17px; height: 17px; }
.quick-add input[type="text"] {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-size: 14px; padding: 7px 0; color: var(--ink);
}
.quick-add input::placeholder { color: var(--muted); }
.qa-select, .qa-date {
  border: 1px solid var(--line); background: var(--bg); border-radius: 7px;
  font-size: 12px; color: var(--ink-2); padding: 5px 6px; outline: none;
}
.qa-date { color: var(--muted); }

.hero-side {
  flex: 0 0 290px; display: flex; align-items: center; gap: 18px;
  padding: 18px 20px; align-self: stretch;
}
.ring {
  width: 92px; height: 92px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0);
  display: grid; place-items: center;
  transition: background .3s ease;
}
.ring-inner {
  width: 74px; height: 74px; border-radius: 50%; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-inner strong { font-family: var(--font-serif); font-size: 22px; line-height: 1.1; font-weight: 600; }
.ring-inner strong small { font-size: 11px; margin-left: 1px; color: var(--muted); }
.ring-inner span { font-size: 10px; color: var(--muted); letter-spacing: .5px; }
.hero-side-text { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.hs-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted); }
.hs-row strong { font-size: 15px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.today-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.side-card { padding: 18px 20px; }
.side-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.side-card-head h3 { font-size: 13px; font-weight: 600; letter-spacing: .4px; }
.side-card-head a { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 1px; }
.side-card-head a svg { width: 13px; height: 13px; }
.side-card-head a:hover { color: var(--accent); }
.mini-stats { display: flex; gap: 8px; }
.mini-stats > div { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.mini-stats strong { font-family: var(--font-serif); font-size: 22px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 11px; color: var(--muted); }
.progress-line { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.progress-line span { font-size: 11px; color: var(--muted); }
.progress-track { height: 5px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.progress-track.slim { height: 4px; margin: 10px 0 4px; }
.progress-track i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width .3s ease; }

.note-mini-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.note-mini { display: flex; align-items: flex-start; gap: 9px; padding: 7px 6px; border-radius: 8px; }
.note-mini:hover { background: var(--surface-2); }
.note-mini-icon { color: var(--muted); padding-top: 1px; }
.note-mini-icon svg { width: 15px; height: 15px; }
.note-mini-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.note-mini-body strong { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-mini-body small { font-size: 11px; color: var(--muted); }
.side-card-tip { background: var(--bg-deep); border-style: dashed; box-shadow: none; }
.tip-quote { font-family: var(--font-serif); font-size: 16px; line-height: 1.7; letter-spacing: .5px; color: var(--ink-2); }
.tip-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.text-link { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: 12.5px; margin-top: 10px; }
.text-link svg { width: 14px; height: 14px; }
a.text-link:hover { text-decoration: underline; }
button.text-link { background: none; border: none; padding: 0; cursor: pointer; }

/* ------------------------------------------------------------------ 看板 */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.board-col {
  background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px;
  min-height: 220px;
}
.board-head { display: flex; align-items: center; gap: 7px; padding: 2px 6px 12px; }
.board-head h2 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.col-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.board-col.is-doing .col-dot { background: var(--warn); }
.board-col.is-done .col-dot { background: var(--ok); }
.board-count { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--surface); padding: 1px 7px; border-radius: 20px; }
.board-cards { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.board-cards.is-over { outline: 2px dashed var(--accent-2); outline-offset: 3px; border-radius: 10px; }
.kanban-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 12px 9px; box-shadow: var(--shadow-sm);
  cursor: grab; transition: box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.kanban-card:hover { box-shadow: var(--shadow); }
.kanban-card.is-prio-3 { border-left: 3px solid var(--warn); }
.kanban-card.is-prio-4 { border-left: 3px solid var(--danger); }
.kanban-card.is-prio-4 .kanban-title { font-weight: 600; }
.kanban-card.is-dragging { opacity: .45; transform: rotate(.6deg); }
.kanban-card.is-done .kanban-title { color: var(--muted); text-decoration: line-through; }
.kanban-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.kanban-title { display: block; font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.kanban-title:hover { color: var(--accent); }
.kanban-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.kanban-spacer { flex: 1; }
.move-form { margin-top: 7px; border-top: 1px dashed var(--line); padding-top: 6px; }
.move-select {
  width: 100%; border: none; background: transparent; font-size: 11.5px; color: var(--muted);
  padding: 2px 0; outline: none; cursor: pointer;
}
.board-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 22px 0; }
.board-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 14px; }
.board-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.board-filter .select { font-size: 12px; padding: 5px 8px; }

/* ------------------------------------------------------------------ 事项详情 */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.crumbs a:hover { color: var(--accent); }
.crumbs svg { width: 12px; height: 12px; }
.crumb-current { color: var(--ink-2); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 16px; }
.detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.detail-card { padding: 20px 22px 18px; }
.detail-status { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.status-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  font-size: 11.5px; padding: 3px 10px; border-radius: 20px; cursor: pointer;
  transition: all .15s ease;
}
.status-btn:hover { border-color: var(--line-2); color: var(--ink); }
.status-btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.status-btn.is-on.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.status-btn.is-on.is-doing { background: var(--warn); border-color: var(--warn); color: #fff; }
.detail-status-note { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.detail-edit { display: flex; flex-direction: column; gap: 8px; }
.detail-title {
  border: none; background: none; outline: none; padding: 0;
  font-family: var(--font-serif); font-size: 23px; font-weight: 600;
  line-height: 1.4; color: var(--ink); width: 100%; letter-spacing: .3px;
}
.detail-title-static {
  font-family: var(--font-serif); font-size: 23px; font-weight: 600;
  line-height: 1.4; letter-spacing: .3px;
}
.detail-note {
  border: 1px solid transparent; background: var(--bg); border-radius: 9px;
  padding: 10px 12px; font-size: 13.5px; line-height: 1.75; color: var(--ink-2);
  resize: vertical; outline: none; width: 100%; font-family: inherit;
}
.detail-note:focus { border-color: var(--line-2); background: var(--surface); }
.detail-note-static { white-space: pre-wrap; color: var(--ink-2); font-size: 14px; line-height: 1.85; margin-top: 12px; }
.detail-save-row { display: flex; align-items: center; justify-content: space-between; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }

.checklist { display: flex; flex-direction: column; padding: 4px 22px 0; }
.check-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 0;
  border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.check-item:last-child { border-bottom: none; }
.check-item span { flex: 1; min-width: 0; word-break: break-word; }
.check-item.is-done span { color: var(--muted); text-decoration: line-through; }
.check-del { opacity: 0; transition: opacity .15s ease; }
.check-item:hover .check-del { opacity: 1; }
.check-add { display: flex; gap: 8px; padding: 12px 22px 18px; }
.check-add .input { flex: 1; }
.progress-head { align-items: flex-start; }
.progress-head > div { min-width: 0; }
.card-head-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.timeline { padding: 14px 22px 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 37px; top: 26px; bottom: 10px;
  width: 1px; background: var(--line); 
}
.timeline-item { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.timeline-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex: 0 0 auto; margin: 7px 0 0 12px; position: relative; z-index: 1;
  box-shadow: 0 0 0 3px var(--surface);
}
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.timeline-head strong { font-size: 12.5px; font-weight: 600; }
.timeline-time { font-size: 11px; color: var(--muted); }
.timeline-del { margin-left: auto; opacity: 0; transition: opacity .15s ease; }
.timeline-item:hover .timeline-del { opacity: 1; }
.timeline-body p { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline-empty { padding: 16px 22px 4px; }
.timeline-empty p { font-size: 13px; color: var(--ink-2); }
.timeline-empty .hint { margin-top: 3px; }
.progress-add {
  display: flex; gap: 8px; padding: 14px 22px 20px; margin-top: 4px;
  border-top: 1px dashed var(--line);
}
.progress-add .input { flex: 1; min-width: 0; }

.props-card { padding: 18px 20px; }
.props-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.prop { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.prop-label { width: 56px; flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.prop-form { flex: 1; min-width: 0; display: flex; gap: 6px; }
.prop-form .select, .prop-form .input { flex: 1; min-width: 0; }
.prop-tags .btn { flex: 0 0 auto; }
.prop-meta { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.prop-meta > div { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.prop-meta span { color: var(--muted); }
.prop-meta strong { font-weight: 500; color: var(--ink-2); text-align: right; }
.action-card { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.action-card form { margin: 0; }

/* ------------------------------------------------------------------ 表单 */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--ink-2); }
.field-hint { color: var(--muted); font-size: 11.5px; }
.input, .select, .textarea {
  width: 100%; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13.5px; font-family: inherit; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--line-2); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface);
}
.input:disabled, .select:disabled { color: var(--muted); background: var(--surface-2); cursor: not-allowed; }
.input.slim, .select.slim { padding: 5px 8px; font-size: 12.5px; border-radius: 7px; }
.textarea { resize: vertical; line-height: 1.7; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
.input-color { width: 46px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }
.form-hint { font-size: 11.5px; color: var(--muted); }
.form-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.narrow { max-width: 520px; margin: 0 auto; }
.notice-card { display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.notice-card svg { flex: 0 0 auto; margin-top: 2px; }
.notice-card p { font-size: 13px; line-height: 1.7; }

/* ------------------------------------------------------------------ 对话框 */
.dialog {
  border: none; padding: 0; background: transparent;
  width: min(540px, calc(100vw - 32px)); max-height: 88vh;
  margin: auto;
}
.dialog::backdrop { background: rgba(24, 18, 12, .42); backdrop-filter: blur(2px); }
.dialog-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(30, 20, 10, .22);
  display: flex; flex-direction: column; max-height: 88vh; overflow: hidden;
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.dialog-head h2 { font-family: var(--font-serif); font-size: 19px; font-weight: 600; letter-spacing: .5px; }
.dialog-body { padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.dialog-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg);
}
.dialog-foot .hint { margin-right: auto; }
.dialog-text { font-size: 13px; color: var(--ink-2); }
.input-title {
  border: none; background: none; outline: none; padding: 2px 0 8px;
  font-family: var(--font-serif); font-size: 20px; font-weight: 600;
  border-bottom: 1px solid var(--line); color: var(--ink); width: 100%;
}
.input-title::placeholder { color: var(--muted); font-weight: 400; }
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -4px; }
.chip-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  font-size: 11.5px; padding: 3px 10px; border-radius: 20px; cursor: pointer;
}
.chip-btn:hover { border-color: var(--line-2); color: var(--accent); }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 196px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.menu-panel a, .menu-logout {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--ink-2);
  background: none; border: none; text-align: left; cursor: pointer;
}
.menu-panel a:hover, .menu-logout:hover { background: var(--surface-2); color: var(--ink); }
.menu-panel a svg, .menu-logout svg { width: 15px; height: 15px; color: var(--muted); }
.menu-head { padding: 8px 10px 10px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head strong { font-size: 13px; }
.menu-head small { font-size: 11px; color: var(--muted); }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-panel-sm { padding: 10px; min-width: 240px; gap: 8px; }
.menu-form { display: flex; flex-direction: column; gap: 8px; }
.menu-danger {
  display: flex; align-items: center; gap: 7px; width: 100%; padding: 7px 8px;
  border: none; background: none; border-radius: 7px; color: var(--danger);
  font-size: 12.5px; cursor: pointer; text-align: left;
}
.menu-danger:hover { background: var(--danger-soft); }
.menu-danger svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ 清单页 */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.project-card { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .18s ease, transform .18s ease; }
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.project-top { display: flex; align-items: center; gap: 9px; }
.project-color { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.project-top h3 { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-top h3 a:hover { color: var(--accent); }
.project-desc { font-size: 12px; color: var(--muted); }
.project-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.project-foot .progress-track { flex: 1; }
.project-link { display: inline-flex; align-items: center; gap: 1px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.project-link svg { width: 13px; height: 13px; }
.project-card:hover .project-link { color: var(--accent); }
.project-new, .group-new {
  border-style: dashed; background: transparent; box-shadow: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 26px 18px; color: var(--muted); cursor: pointer;
  min-height: 132px; font-family: inherit;
}
.project-new:hover, .group-new:hover { border-color: var(--line-2); color: var(--accent); background: var(--surface); }
.project-new-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; margin-bottom: 2px; }
.project-new-icon svg { width: 17px; height: 17px; }
.project-new strong, .group-new strong { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.project-new small, .group-new small { font-size: 11.5px; }
.project-new:hover strong, .group-new:hover strong { color: var(--accent); }

/* ------------------------------------------------------------------ 小组 */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.group-card { padding: 18px; display: flex; flex-direction: column; gap: 16px; transition: box-shadow .18s ease, transform .18s ease; }
a.group-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.group-card-top { display: flex; align-items: flex-start; gap: 12px; }
.group-badge {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; font-family: var(--font-serif); font-size: 19px;
}
.group-badge.lg { width: 56px; height: 56px; font-size: 25px; border-radius: 15px; }
.group-card-title { min-width: 0; }
.group-card-title h3 { font-size: 15px; font-weight: 600; }
.group-card-title p { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-card-foot { display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.group-stat { font-size: 11.5px; color: var(--muted); }
.group-stat strong { color: var(--ink-2); font-weight: 600; }
.badge { display: inline-flex; align-items: center; font-size: 10.5px; padding: 1px 7px; border-radius: 20px; background: var(--surface-2); color: var(--muted); font-weight: 500; white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.group-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; margin-bottom: 20px; flex-wrap: wrap; }
.group-hero-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.group-hero h1 { font-family: var(--font-serif); font-size: 24px; font-weight: 600; letter-spacing: .6px; }
.group-hero-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--muted); }
.group-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.group-layout > *, .group-side > *, .member-list, .member, .note-mini-list, .note-mini, .side-card { min-width: 0; }
.group-hero-main, .group-hero-main > div { min-width: 0; }
.group-hero h1 { overflow-wrap: anywhere; }
.member-body strong, .member-body small { overflow-wrap: anywhere; }
.note-mini { overflow: hidden; }
.member-add, .note-quick { flex-wrap: wrap; }
.member-add .input, .note-quick .input { min-width: 0; }
.group-main { display: flex; flex-direction: column; gap: 0; }
.group-side { display: flex; flex-direction: column; gap: 16px; }
.quick-card { padding: 16px 18px; margin-bottom: 18px; }
.group-add-main { display: flex; gap: 8px; }
.group-add-main .input { flex: 1; }
.group-add-opts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.inline-field .select, .inline-field .input { width: auto; }
.member-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.member { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 8px; }
.member:hover { background: var(--surface-2); }
.member-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.member-body strong { font-size: 13px; font-weight: 500; }
.member-body small { font-size: 11px; color: var(--muted); }
.member-add { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.member-add .input { flex: 1; }
.note-quick { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.note-quick .input { flex: 1; min-width: 0; }
.note-quick .select { width: auto; }

/* ------------------------------------------------------------------ 记事本 */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }
.note-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 164px; transition: box-shadow .18s ease, transform .18s ease; }
a.note-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.note-card.is-pinned { border-color: var(--line-2); }
.note-card-head { display: flex; align-items: center; gap: 7px; }
.note-icon { color: var(--accent); display: inline-grid; place-items: center; }
.note-icon svg { width: 17px; height: 17px; }
.note-icon.lg svg { width: 22px; height: 22px; }
.pin-mark { color: var(--accent-2); }
.pin-mark svg { width: 14px; height: 14px; }
.note-card h3 { font-size: 14.5px; font-weight: 600; line-height: 1.45; word-break: break-word; }
.note-excerpt { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-preview { display: flex; flex-direction: column; gap: 3px; }
.note-preview li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.note-preview li i { width: 11px; height: 11px; border: 1px solid var(--line-2); border-radius: 3px; flex: 0 0 auto; }
.note-preview li.is-done { color: var(--muted); text-decoration: line-through; }
.note-preview li.is-done i { background: var(--ok); border-color: var(--ok); }
.note-preview li.is-more { color: var(--muted); font-size: 11px; }
.note-progress { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.note-progress .progress-track { flex: 1; margin: 0; }
.note-progress span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.note-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.note-new {
  border-style: dashed; background: transparent; box-shadow: none;
  align-items: center; justify-content: center; text-align: center;
  color: var(--muted); cursor: pointer; font-family: inherit; gap: 4px;
}
.note-new:hover { border-color: var(--line-2); background: var(--surface); color: var(--accent); }
.note-new strong { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.note-new small { font-size: 11.5px; }

.note-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.note-main { display: flex; flex-direction: column; gap: 16px; }
.note-side { display: flex; flex-direction: column; gap: 16px; }
.note-editor { padding: 20px 24px 14px; }
.note-editor-head { display: flex; align-items: center; gap: 10px; }
.note-title-input {
  flex: 1; border: none; background: none; outline: none; padding: 2px 0;
  font-family: var(--font-serif); font-size: 23px; font-weight: 600; letter-spacing: .3px;
  color: var(--ink); min-width: 0;
}
.note-title-static { font-family: var(--font-serif); font-size: 23px; font-weight: 600; }
.note-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px 32px; font-size: 11.5px; color: var(--muted); }
.note-body-input {
  width: 100%; border: 1px solid transparent; background: var(--bg); border-radius: 9px;
  padding: 11px 13px; font-size: 14px; line-height: 1.85; color: var(--ink-2);
  font-family: inherit; resize: vertical; outline: none;
}
.note-body-input:focus { border-color: var(--line-2); background: var(--surface); }
.note-body-static { white-space: pre-wrap; font-size: 14px; line-height: 1.9; color: var(--ink-2); padding: 6px 0 4px 32px; }
.editor-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 0; }
.note-actions { padding: 0 22px 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.note-tip { padding: 18px 20px; }
.note-tip h3 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.note-tip p { font-size: 12px; color: var(--muted); line-height: 1.75; margin-top: 6px; }
.seg-kind { align-self: flex-start; }

/* ------------------------------------------------------------------ 设置 */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.settings-card { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.settings-card .card-head { padding: 0; }
.profile-row { display: flex; align-items: center; gap: 14px; }
.profile-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.profile-meta strong { font-size: 15px; }
.profile-meta span { font-size: 12px; color: var(--muted); }
.settings-form { display: flex; align-items: flex-end; gap: 10px; }
.settings-form .field { flex: 1; }
.meta-list { display: flex; flex-direction: column; gap: 6px; }
.meta-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.meta-list span { color: var(--muted); }
.meta-list strong { font-weight: 500; color: var(--ink-2); text-align: right; }
.theme-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-choice {
  flex: 1; min-width: 88px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink-2); font-size: 12px; cursor: pointer;
}
.theme-choice:hover { border-color: var(--line-2); color: var(--ink); }
.theme-choice.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.theme-choice svg { width: 17px; height: 17px; }
.settings-groups { display: flex; flex-direction: column; gap: 2px; }
.settings-groups a { display: flex; flex-direction: column; padding: 7px 8px; border-radius: 8px; }
.settings-groups a:hover { background: var(--surface-2); }
.settings-groups strong { font-size: 13px; font-weight: 500; }
.settings-groups small { font-size: 11.5px; color: var(--muted); }
.settings-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ 通知 */
.inbox-card { padding: 6px 20px; }
.notify-list { display: flex; flex-direction: column; }
.notify { display: flex; gap: 11px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.notify:last-child { border-bottom: none; }
.notify-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; margin-top: 8px; flex: 0 0 auto; }
.notify.is-unread .notify-dot { background: var(--accent); }
.notify-body { flex: 1; min-width: 0; }
.notify-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.notify-head strong { font-size: 13.5px; font-weight: 500; }
.notify.is-unread .notify-head strong { font-weight: 600; }
.notify-head span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.notify-body p { font-size: 12.5px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.notify-actions { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.notify-actions .text-link { margin-top: 0; }

/* ------------------------------------------------------------------ 管理 */
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; flex-wrap: wrap; }
.admin-card.is-disabled { opacity: .72; background: var(--surface-2); }
.admin-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-id { min-width: 0; }
.admin-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-name strong { font-size: 14px; }
.admin-name .muted { font-size: 12px; }
.admin-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.admin-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-note { margin-top: 18px; padding: 18px 22px; }
.admin-note h3 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.admin-note ul { list-style: disc; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.admin-note li { font-size: 12.5px; color: var(--muted); }

.result-wrap { max-width: 460px; margin: 40px auto; }
.result-card { padding: 30px 28px 24px; text-align: center; }
.result-icon {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center;
}
.result-card h1 { font-family: var(--font-serif); font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.result-card .muted { font-size: 12.5px; }
.cred-box { margin: 18px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 4px 14px; }
.cred-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); text-align: left; }
.cred-row:last-child { border-bottom: none; }
.cred-row > span { font-size: 12px; color: var(--muted); width: 64px; flex: 0 0 auto; }
.cred-row strong { flex: 1; font-size: 14px; font-weight: 600; word-break: break-all; }
.cred-row .icon-btn { color: var(--muted); }
.notice { font-size: 12px; color: var(--muted); margin-bottom: 18px; line-height: 1.7; }

.table-card { padding: 4px 16px; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px;
  padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .badge { white-space: nowrap; }

/* ------------------------------------------------------------------ 登录 / 注册 */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; }
.login-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.login-art {
  background: linear-gradient(160deg, var(--bg-deep) 0%, var(--bg) 60%, #f0e8db 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 48px;
}
[data-theme="dark"] .login-art { background: linear-gradient(160deg, #191612 0%, #15130f 60%, #1c1712 100%); }
.login-art::after {
  content: ""; position: absolute; right: -120px; bottom: -140px;
  width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid var(--line); opacity: .7;
}
.login-art::before {
  content: ""; position: absolute; right: -40px; top: -100px;
  width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid var(--line); opacity: .55;
}
.login-art-inner { position: relative; z-index: 1; width: min(440px, 100%); display: flex; flex-direction: column; gap: 22px; }
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.login-brand-text strong { font-family: var(--font-serif); font-size: 16px; letter-spacing: 1px; }
.login-brand-text small { font-size: 10.5px; letter-spacing: 1.5px; color: var(--muted); }
.login-art h1 {
  font-family: var(--font-serif); font-size: 40px; line-height: 1.42;
  font-weight: 600; letter-spacing: 2px; margin-top: 6px;
}
.login-tag { color: var(--ink-2); font-size: 13.5px; line-height: 1.9; }
.art-sheet {
  margin-top: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 18px 20px;
  width: 100%; max-width: 350px; transform: rotate(-1.2deg);
}
.art-sheet-head { display: flex; gap: 5px; margin-bottom: 14px; }
.art-sheet-head span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.art-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.art-row.is-faded { opacity: .5; }
.art-tick { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: 0 0 auto; }
.art-tick.is-on { background: var(--accent); border-color: var(--accent); }
.art-line { height: 6px; border-radius: 3px; background: var(--surface-3); flex: 0 0 auto; }
.art-line.w70 { width: 70%; }
.art-line.w62 { width: 62%; }
.art-line.w52 { width: 52%; }
.art-line.w44 { width: 44%; }
.art-pill { width: 26px; height: 10px; border-radius: 6px; background: var(--surface-2); margin-left: auto; flex: 0 0 auto; }
.art-pill.is-warm { background: var(--accent-soft); }
.art-rule { height: 1px; background: var(--line); margin: 14px 0 12px; }
.art-note { display: flex; flex-direction: column; gap: 7px; }
.art-note span { height: 5px; border-radius: 3px; background: var(--surface-2); }
.art-note span:nth-child(1) { width: 88%; }
.art-note span:nth-child(2) { width: 72%; }
.art-note span.short { width: 40%; }
.login-help { color: var(--muted); font-size: 12px; text-align: center; line-height: 1.8; margin-top: 4px; }
.login-help a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.login-legal {
  color: var(--muted); font-size: 11px; letter-spacing: .2px;
  margin-top: 40px; display: flex; align-items: center; gap: 7px;
}
.login-legal a { color: var(--muted); }
.login-legal a:hover { color: var(--accent); }

.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px; }
.login-form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-form h2 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; letter-spacing: 1px; }
.login-sub { color: var(--muted); font-size: 12.5px; margin-top: -6px; margin-bottom: 6px; }
.login-form .btn-block { margin-top: 6px; padding: 10px; }
.login-note { color: var(--muted); font-size: 11.5px; text-align: center; line-height: 1.7; margin-top: 2px; }
.login-mobile-foot { display: none; color: var(--muted); font-size: 11px; margin-top: 28px; }

/* ------------------------------------------------------------------ 错误页 */
.error-wrap { max-width: 480px; margin: 60px auto; text-align: center; }
.error-wrap.is-public { margin-top: 14vh; }
.error-code { font-family: var(--font-serif); font-size: 56px; color: var(--line-2); line-height: 1; letter-spacing: 2px; }
.error-wrap h1 { font-family: var(--font-serif); font-size: 24px; font-weight: 600; margin: 12px 0 6px; }
.error-wrap .muted { font-size: 13px; }
.error-actions { display: flex; gap: 8px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.error-wrap .btn { margin-top: 20px; }
.error-actions .btn { margin-top: 0; }

/* ------------------------------------------------------------------ 页脚 / 提示 */
.site-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 34px 0 8px; font-size: 11px; color: var(--muted);
}
.site-foot a:hover { color: var(--accent); }
.foot-dot { opacity: .6; }
.toasts {
  position: fixed; top: 74px; right: 22px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; max-width: 340px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; box-shadow: var(--shadow);
  animation: toast-in .22s ease both;
}
.toast-error { border-left-color: var(--danger); }
.toast-ok { border-left-color: var(--ok); }
.toast-info { border-left-color: var(--accent-2); }
.toast span { flex: 1; line-height: 1.6; }
.toast-x { border: none; background: none; color: var(--muted); cursor: pointer; padding: 0; display: grid; place-items: center; }
.toast-x svg { width: 14px; height: 14px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ 底部导航（移动） */
.tabbar { display: none; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1180px) {
  .today-grid { grid-template-columns: minmax(0, 1fr) 268px; gap: 18px; }
  .hero h1 { font-size: 30px; }
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 232px; }
  .content { padding: 24px 22px 36px; }
  .topbar { padding: 11px 22px; }
  .today-grid, .detail-grid, .group-layout, .note-layout { grid-template-columns: minmax(0, 1fr); }
  .today-side, .detail-side, .group-side, .note-side {
    position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .today-side > *, .detail-side > *, .group-side > *, .note-side > * { min-width: 0; }
  .hero { flex-direction: column; }
  .hero-side { flex: none; align-self: stretch; }
  .board { gap: 12px; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 2px; border-radius: 9px; color: var(--muted); font-size: 10.5px;
  }
  .tab svg { width: 20px; height: 20px; }
  .tab.is-active { color: var(--accent); }
  .tab.is-active svg { stroke-width: 1.9; }
  .brand-mini {
    display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto;
    background: var(--ink); color: var(--bg); border-radius: 9px;
    font-family: var(--font-serif); font-size: 17px; padding-bottom: 2px;
  }
  .topbar { gap: 10px; padding: 9px 14px; }
  .top-search { display: none; }
  .content { padding: 18px 14px calc(78px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 23px; }
  .hero h1 { font-size: 26px; }
  .hero-sub { font-size: 13px; }
  .quick-add { flex-wrap: wrap; padding: 9px 10px; }
  .quick-add input[type="text"] { flex: 1 1 100%; order: -1; padding: 6px 2px; border-bottom: 1px solid var(--line); }
  .qa-select, .qa-date { flex: 1; }
  .qa-submit { flex: 0 0 auto; }
  .qa-plus { display: none; }
  .hero-side { flex-direction: row; padding: 14px 16px; gap: 14px; }
  .ring { width: 78px; height: 78px; }
  .ring-inner { width: 62px; height: 62px; }
  .ring-inner strong { font-size: 18px; }
  .today-side, .detail-side, .group-side, .note-side { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: 1fr; }
  .board-col { min-height: 0; }
  .board-cards { min-height: 0; flex-direction: column; }
  .kanban-card { cursor: default; }
  .panel { padding: 4px 14px 8px; }
  .task { padding: 12px 4px; }
  .task-meta { gap: 5px 8px; }
  .row-link { display: none; }
  .filter-row { gap: 8px; }
  .filter-field { flex: 1 1 42%; }
  .filter-field .select { width: 100%; }
  .filter-search { flex: 1 1 100%; order: 1; }
  .filter-row > a.btn { order: 2; }
  .filter-toggle { display: inline-flex; order: 3; }
  .board-filters .filter-toggle, .board-filters .board-list-link { flex: 1; justify-content: center; }
  .board-filters .board-list-link { margin-left: 0; }
  .filter-more { display: none; order: 5; flex: 1 1 100%; flex-wrap: wrap; gap: 8px; }
  .filters.is-open .filter-more { display: flex; }
  .filter-more .filter-field { flex: 1 1 42%; }
  .filter-more .filter-field .select { width: 100%; }
  .filters:not(.is-open) .tag-row { display: none; }
  .seg-scope { flex: 1 1 100%; }
  .seg-scope label { flex: 1; }
  .seg-scope label span { display: block; text-align: center; }
  .notes-grid, .project-grid, .group-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
  .filters { padding: 10px 12px; }
  .detail-title, .note-title-input { font-size: 20px; }
  .detail-status-note { width: 100%; margin-left: 0; }
  .settings-form { flex-direction: column; align-items: stretch; }
  .admin-card { align-items: flex-start; }
  .admin-actions { width: 100%; }
  .dialog {
    width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0;
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
  }
  .dialog-form { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .dialog::backdrop { background: rgba(24, 18, 12, .5); }
  .toasts { top: auto; bottom: 82px; left: 12px; right: 12px; max-width: none; }
  .site-foot { padding-bottom: 4px; }
  .login-wrap { grid-template-columns: 1fr; min-height: 100vh; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; padding: 32px 24px; }
  .login-form { width: min(380px, 100%); }
  .login-mobile-foot { display: block; }
  .group-hero { padding: 16px; }
  .group-hero-main { gap: 12px; }
  .group-hero h1 { font-size: 20px; }
  .member-add, .note-quick { flex-wrap: wrap; }
  .note-quick .input { flex: 1 1 100%; }
}

@media (max-width: 520px) {
  .dialog-foot .hint { display: none; }
  .content { padding: 14px 12px calc(76px + env(safe-area-inset-bottom)); }
  .page-head { gap: 10px; }
  .page-head h1 { font-size: 21px; }
  .page-actions { width: 100%; }
  .seg-tabs { flex: 1; }
  .seg-tabs .seg-item { flex: 1; text-align: center; }
  .field-row { flex-direction: column; gap: 10px; }
  .task-title { font-size: 13.5px; }
  .prio, .due, .chip, .tag { font-size: 10.5px; }
  .mini-stats strong { font-size: 19px; }
  .hero h1 { font-size: 23px; }
  .eyebrow { font-size: 11px; letter-spacing: 1.2px; }
  .panel-head h2 { font-size: 13.5px; }
  .note-editor { padding: 16px 16px 12px; }
  .note-sub, .note-body-static { margin-left: 0; padding-left: 0; }
  .note-body-static { padding: 6px 0; }
  .checklist, .comments, .check-add, .comment-add, .note-actions { padding-left: 16px; padding-right: 16px; }
  .card-head { padding: 16px 16px 0; }
  .cred-row > span { width: 52px; }
  .toast { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .sidebar, .topbar, .tabbar, .toasts, .site-foot { display: none !important; }
  .content { padding: 0; }
}
