/* ========================= 团队工作台 · 样式 ========================= */

:root {
  /* 看板那几处一直在用 var(--card, #fff)，但这个变量从来没定义过 ——
     所以不管什么主题都回退成白色，一进暗色整个看板就是张白纸。
     这里补上定义，并把顺手漏掉的 --bg-2 / --warning 一起补齐。 */
  --card: var(--surface);
  --bg-2: var(--surface-2);
  --warning: var(--warn);
  --accent: #0a6cff;
  --accent-soft: #eef4ff;
  --bg: #f7f7f9;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --hover: #fafafa;
  --text: #1c1c1e;
  --text-2: #6b6b70;
  --text-3: #9a9aa0;
  --line: #e5e5ea;
  --line-2: #ececef;
  --line-3: #c9c9cf;
  --danger: #ff3b30;
  --danger-soft: #ffeceb;
  --warn: #ff9500;
  --ok: #34c759;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .16);
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 12px;
  --sidebar-w: 236px;
  --topbar-h: 54px;
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

html[data-theme="dark"] {
  --accent: #0a84ff;
  --accent-soft: #14243c;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --hover: #232325;
  --text: #f2f2f7;
  --text-2: #aeaeb2;
  --text-3: #8e8e93;
  --line: #38383a;
  --line-2: #2c2c2e;
  --line-3: #48484a;
  --danger: #ff453a;
  --danger-soft: #3a1c1a;
  --warn: #ff9f0a;
  --ok: #30d158;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
        "Segoe UI", "Microsoft YaHei", "Hiragino Sans GB", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.spacer { flex: 1; }

/* ================================ 按钮 ================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .08s, opacity .14s;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn:active { transform: scale(.975); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: transparent; background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--line-2); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font-size: 17px;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.icon-btn.on { background: var(--accent-soft); color: var(--accent); }

.avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;      /* 图片不能溢出圆 */
  flex: none;            /* 顶栏里不许被压扁 */
}
/* 头像必须是正圆：宽高写死 + cover 裁切，否则 flex 会把它压成椭圆 */
.avatar-btn .avatar-img,
.avatar-btn img {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 任务行上的次要信息：灰色小字，不做彩色胶囊（苹果提醒事项的做法） */
.t-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--text-3); font-weight: 400;
}
.t-tag.danger { color: var(--danger); }
.t-tag .mini-avatar { width: 15px; height: 15px; font-size: 9px; }
.t-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* 可见范围选择：无底色分段文字，不用彩色胶囊 */
.scope-picker { display: inline-flex; gap: 2px; }
.scope-opt {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 11px; border-radius: 7px;
  font-size: 13px; color: var(--text-3); font-weight: 450;
  transition: background .14s, color .14s;
}
.scope-opt:hover { color: var(--text); }
.scope-opt.active { background: var(--surface-2); color: var(--text); font-weight: 550; }
.scope-label { font-size: 13px; color: var(--text-3); margin-right: 8px; }
.scope-field { margin-top: 4px; }
.scope-hint { margin-top: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.ok { background: rgba(34, 184, 166, .14); color: var(--ok); }
.chip.warn { background: rgba(245, 165, 36, .16); color: #b26f00; }
html[data-theme="dark"] .chip.warn { color: var(--warn); }

/* ============================= 登录界面 ============================= */

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px calc(24px + var(--safe-b));
  background:
    radial-gradient(1000px 500px at 15% -10%, rgba(79, 124, 255, .16), transparent 60%),
    radial-gradient(800px 420px at 95% 100%, rgba(34, 184, 166, .14), transparent 55%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 22px;
}
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-logo {
  width: 116px; height: auto;
  margin: 0 auto 14px;
  display: block;
}
.auth-brand h1 { font-size: 21px; margin-bottom: 5px; }
.auth-form { display: flex; flex-direction: column; gap: 13px; margin-top: 18px; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 12.5px; }
.auth-foot.warn { color: var(--warn); }

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--line-2);
  border-radius: 11px;
}
.tab {
  flex: 1;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea,
.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  outline: none;
  transition: border-color .14s, box-shadow .14s, background .14s;
  font-size: 15px; /* 防止 iOS 聚焦时自动放大 */
}
.field input:focus, .field textarea:focus, .input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea.input { resize: vertical; min-height: 90px; line-height: 1.6; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* ================================ 布局 ================================ */

.app { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  display: none;
  width: var(--sidebar-w);
  flex-shrink: 0;
  flex-direction: column;
  gap: 6px;
  padding: 18px 12px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.brand-name { font-size: 14px; font-weight: 650; white-space: nowrap; letter-spacing: -.2px; }
.brand-sub { font-size: 12px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--text-2);
  font-size: 14.5px; font-weight: 550;
  cursor: pointer; text-align: left;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--line-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 620; }
.nav-item .ni { width: 20px; text-align: center; font-size: 16px; }
.nav-item .badge {
  margin-left: auto; padding: 1px 7px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
}
.sidebar-foot { padding: 8px; border-top: 1px solid var(--line-2); }
.online-dot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(34, 184, 166, .18); }
.dot.off { background: var(--text-3); box-shadow: none; }

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

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar-h);
  padding: var(--safe-t) 14px 0;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; flex-direction: column; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.topbar-left h1 { font-size: 18px; line-height: 1.25; }

/* 整页视图（开发者模式）标题前面那个 ‹ */
.topbar-back {
  flex: none;
  display: grid; place-items: center;
  width: 34px; height: 34px; margin: 0 4px 0 -8px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.topbar-back:hover { background: var(--hover); }
.topbar-back:active { background: var(--accent-soft); }
.topbar-back[hidden] { display: none; }
.title-row { display: flex; align-items: center; min-width: 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: none; }

.content {
  flex: 1;
  padding: 12px 16px calc(var(--tabbar-h) + var(--safe-b) + 104px);
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.tab-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: transparent; color: var(--text-3);
  font-size: 10.5px; font-weight: 600; cursor: pointer;
  transition: color .14s; position: relative;
}
.tab-item .ti { font-size: 19px; line-height: 1; }
.tab-item.active { color: var(--accent); }
.tab-item .tbad {
  position: absolute; top: 5px; left: 50%; margin-left: 6px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; line-height: 15px; font-weight: 700;
}

.fab {
  position: fixed; right: 16px;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  z-index: 45;
  width: 52px; height: 52px;
  border: 0; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 28px; font-weight: 300; line-height: 1;
  box-shadow: 0 8px 24px rgba(79, 124, 255, .45);
  cursor: pointer; display: grid; place-items: center;
  transition: transform .12s;
}
.fab:active { transform: scale(.92); }

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .tabbar { display: none; }
  .content { padding: 22px 26px 60px; }
  .fab { bottom: 28px; right: 28px; }
  .topbar { padding: var(--safe-t) 26px 0; }
}

/* ================================ 卡片 ================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card + .card, .section + .section { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}
/* 卡片标题：图标 + 文字。h3 要 flex，否则 SVG 会把文字挤掉 */
.card-head h3 {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  min-width: 0;
}
.card-head h3 .ic { color: var(--text-2); flex: none; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); }
.card-body { padding: 14px 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line-2); background: var(--surface-2); }

.section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 2px 10px;
  font-size: 13px; font-weight: 650; color: var(--text-2);
  text-transform: none;
}
.section-title:first-child { margin-top: 4px; }
.section-title .count { color: var(--text-3); font-weight: 500; }

.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1050px) { .grid.main-side { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); } }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat {
  padding: 11px 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  text-align: left;
}
.stat .n { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.stat .l { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.stat.danger .n { color: var(--danger); }
.stat.accent .n { color: var(--accent); }
.stat.ok .n { color: var(--ok); }
@media (max-width: 420px) { .stat .n { font-size: 18px; } .stat { padding: 9px 10px; } }

/* ================================ 待办 ================================ */

/* 一行任务：勾选框、正文、头像、铃铛、垃圾桶**全部垂直居中**。
   以前是 flex-start（顶对齐），而各个图标又各自带 margin-top 偏移，
   结果头像/铃铛/垃圾桶都不在一条线上 —— 看着就是没对齐。 */
.task {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.task:last-child { border-bottom: 0; }
.task:hover { background: var(--surface-2); }
.task.done .t-title { color: var(--text-3); text-decoration: line-through; }
.task .check {
  flex-shrink: 0;
  width: 21px; height: 21px;
  border: 1.8px solid var(--line); border-radius: 7px;
  background: var(--surface);
  cursor: pointer; display: grid; place-items: center;
  color: transparent; font-size: 12px; font-weight: 800;
  transition: all .14s;
}
.task .check:hover { border-color: var(--accent); }
/* 完成态：空心圆变灰 + 打勾，不用绿底方块 */
.task.done .check { background: transparent; border-color: var(--line-3); color: var(--text-3); }
.task .t-main { flex: 1; min-width: 0; }
.t-title { font-size: 14.5px; font-weight: 550; word-break: break-word; line-height: 1.45; }
.t-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.t-notes { font-size: 12.5px; color: var(--text-3); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 行尾的操作按钮：鼠标移上去才现身，触屏上常态半透明 */
.t-del, .t-postpone { opacity: 0; transition: opacity .14s, color .14s; }
.task:hover .t-del, .task:hover .t-postpone { opacity: 1; }
.t-postpone { color: var(--accent); }
@media (max-width: 700px) { .t-del, .t-postpone { opacity: .55; } }

/* 菜单项里带一行小字（往后推的日期用） */
.mi-text { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.25; }
.mi-text i { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--text-3); }

.prio-0 { border-left: 0; }
.prio-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.prio-3 .t-title::before,
.prio-badge-3 { }
/* 优先级不再用左侧色条 —— 信息行已经用红字「紧急」表达，避免双重上色 */
.t-prio-3, .t-prio-2 { box-shadow: none; }

.mini-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-size: 10px; font-weight: 700; flex-shrink: 0;
}

/* 头像用图片时的统一表现：裁成圆、保持比例、别被拉伸 */
.avatar-img {
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: var(--surface-2, #eef0f4);
  flex-shrink: 0;
  display: block;
}

/* 右上角那颗头像填满按钮 */
.avatar-btn .avatar-img { width: 100%; height: 100%; }

/* --------------------------- 线条图标 --------------------------- */

.ic { display: block; flex-shrink: 0; }

/* 侧边栏 */
.sidebar-nav .nav-item { display: flex; align-items: center; gap: 11px; }
.sidebar-nav .ni { display: grid; place-items: center; color: var(--text-2); }
.sidebar-nav .nav-item.active .ni { color: var(--accent); }

/* 底部标签栏 */
.tabbar .tab-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tabbar .ti { display: grid; place-items: center; color: var(--text-3); }
.tabbar .tab-item.active .ti { color: var(--accent); }

/* 顶栏图标按钮 */
.topbar .icon-btn { display: grid; place-items: center; color: var(--text-2); }
.topbar .icon-btn:hover { color: var(--text); }

/* 菜单里的图标 */
#menu button { display: flex; align-items: center; gap: 10px; }
#menu button .ic { color: var(--text-3); flex-shrink: 0; }

/* 打卡项里的状态文字：不用彩色胶囊，就是灰色小字 */
.tm-warn { color: var(--warn); }
.tm-ok { color: var(--ok); }
.tm-photo { color: var(--text-3); }
.tm-exempt { color: var(--warn); }

/* 空状态图标 */
.empty .e-icon { display: grid; place-items: center; color: var(--line-3); }

/* ---------------------- 免打卡（报备） ---------------------- */

.tick-item.exempt { background: var(--surface-2); }
.tick-item.exempt .tick-box { border-color: var(--line-3); color: var(--text-3); }
.tick-item.exempt .tick-title { color: var(--text-2); }

.exempt-chip {
  background: rgba(255, 149, 0, .14) !important;
  color: #b26f00 !important;
  font-weight: 600;
}
html[data-theme="dark"] .exempt-chip { color: var(--warn) !important; }

.tick-exempt-reason {
  margin-top: 6px; padding: 7px 10px;
  background: var(--surface); border-left: 2px solid var(--warn);
  border-radius: 0 6px 6px 0;
  font-size: 13px; color: var(--text-2); line-height: 1.6;
}

.tick-exempt { opacity: 0; transition: opacity .14s; }
.tick-item:hover .tick-exempt { opacity: 1; }
@media (hover: none) { .tick-exempt { opacity: .6; } }

/* 报备弹窗 */
.exempt-head { margin-bottom: 14px; }
.exempt-title { font-size: 16px; font-weight: 600; line-height: 1.5; }
.exempt-note {
  padding: 11px 13px; margin-bottom: 16px;
  background: var(--surface-2); border-radius: var(--r);
  font-size: 13px; color: var(--text-2); line-height: 1.7;
}
.exempt-note b { color: var(--danger); }
.exempt-detail { font-size: 13.5px; color: var(--text); line-height: 1.8; margin-bottom: 14px; }
.exempt-quick { display: flex; flex-wrap: wrap; gap: 7px; margin: -4px 0 16px; }
.exempt-quick-btn { cursor: pointer; border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--text-2) !important; }
.exempt-quick-btn:hover { border-color: var(--accent) !important; color: var(--accent) !important; }

/* 「我的账号」里的头像编辑区 */
.avatar-edit {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 16px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.avatar-preview .avatar-img {
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.avatar-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.add-row {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}
.add-row input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font-size: 14.5px; padding: 3px 0;
}
.add-row input::placeholder { color: var(--text-3); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.segmented { display: flex; gap: 3px; padding: 3px; background: var(--line-2); border-radius: 10px; }
.segmented button {
  padding: 6px 12px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-2);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .14s, color .14s;
}
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.search-box { position: relative; flex: 1; min-width: 150px; max-width: 260px; }
.search-box input { padding-left: 32px; }
.search-box::before { content: "🔍"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: .55; pointer-events: none; }

.empty { padding: 34px 18px; text-align: center; color: var(--text-3); }
.empty .e-icon { font-size: 30px; opacity: .5; display: block; margin-bottom: 8px; }
.empty .e-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; }
.empty .e-sub { font-size: 12.5px; }

/* ================================ 日历 ================================ */

.cal-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.cal-month { font-size: 16.5px; font-weight: 680; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow {
  padding: 7px 0; text-align: center;
  font-size: 11.5px; font-weight: 650; color: var(--text-3);
}
.cal-cell {
  min-height: 62px;
  padding: 5px 4px 4px;
  border-top: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  cursor: pointer;
  position: relative;
  transition: background .12s;
  overflow: hidden;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.out { opacity: .38; }
.cal-cell.today .cal-daynum { background: var(--accent); color: #fff; }
.cal-cell.sel { background: var(--accent-soft); }
.cal-cell.sel .cal-daynum { color: var(--accent); font-weight: 800; }
.cal-daynum {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 12.5px; font-weight: 600;
}
.cal-items { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.cal-pill {
  font-size: 10.5px; line-height: 1.5;
  padding: 1px 5px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 550;
}
.cal-pill.ev { background: var(--accent-soft); color: var(--accent); }
.cal-pill.tk { background: var(--line-2); color: var(--text-2); }
.cal-pill.tk.over { background: var(--danger-soft); color: var(--danger); }
.cal-pill.tk.done { opacity: .5; text-decoration: line-through; }
.cal-more { font-size: 10px; color: var(--text-3); padding-left: 4px; }
@media (max-width: 899px) {
  .cal-cell { min-height: 52px; }
  .cal-pill { font-size: 9.5px; padding: 1px 3px; }
}
.cal-dots { display: flex; gap: 3px; margin-top: 4px; padding-left: 3px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }

.day-panel { }
.day-item {
  display: flex; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--line-2); align-items: flex-start;
}
.day-item:last-child { border-bottom: 0; }
.day-time {
  flex-shrink: 0; width: 52px;
  font-size: 12px; font-weight: 650; color: var(--text-3);
  padding-top: 2px; font-variant-numeric: tabular-nums;
}
.day-bar { width: 3px; border-radius: 2px; background: var(--accent); align-self: stretch; flex-shrink: 0; }

/* ================================ 笔记 ================================ */

.notes-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .notes-layout.split { grid-template-columns: 300px minmax(0, 1fr); } }
.note-item {
  padding: 12px 14px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background .12s;
}
.note-item:hover { background: var(--surface-2); }
.note-item.active { background: var(--accent-soft); }
.note-item .nt { font-size: 14px; font-weight: 600; margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item .np { font-size: 12.5px; color: var(--text-3); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-item .nm { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 11.5px; color: var(--text-3); }

.md { font-size: 14.5px; line-height: 1.72; word-wrap: break-word; }
.md h1 { font-size: 20px; margin: 16px 0 8px; }
.md h2 { font-size: 17px; margin: 14px 0 7px; }
.md h3 { font-size: 15.5px; margin: 12px 0 6px; }
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 8px 0; padding-left: 22px; }
.md li { margin: 3px 0; }
.md code {
  background: var(--line-2); padding: 1.5px 5px; border-radius: 5px;
  font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.md pre {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 12px 14px; border-radius: 10px; overflow-x: auto; margin: 10px 0;
}
.md pre code { background: none; padding: 0; font-size: 13px; }
.md blockquote {
  margin: 10px 0; padding: 4px 0 4px 14px;
  border-left: 3px solid var(--line); color: var(--text-2);
}
.md a { text-decoration: underline; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.md table { border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; }

/* ================================ 文件 ================================ */

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 26px 18px;
  text-align: center;
  color: var(--text-3);
  transition: border-color .14s, background .14s;
  cursor: pointer;
  background: var(--surface);
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone .dz-icon { font-size: 28px; display: block; margin-bottom: 6px; }

.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-2);
  transition: background .12s;
}
.file-item:last-child { border-bottom: 0; }
.file-item:hover { background: var(--surface-2); }
.file-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; display: grid; place-items: center;
  font-size: 17px; background: var(--line-2);
}
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 12px; color: var(--text-3); margin-top: 2px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.file-actions { display: flex; gap: 2px; }
@media (max-width: 700px) { .file-actions .btn-label { display: none; } }

.progress {
  height: 4px; border-radius: 2px; background: var(--line-2);
  overflow: hidden; margin-top: 8px;
}
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ================================ AI ================================ */

.chat { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.me { flex-direction: row-reverse; }
.msg-avatar {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 9px; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.msg-body { max-width: min(680px, 82%); min-width: 0; }
.msg.me .msg-body { align-items: flex-end; }
.msg-who { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.msg.me .msg-who { justify-content: flex-end; }
.bubble {
  padding: 10px 13px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.65;
  word-break: break-word; overflow-wrap: anywhere;
}
.msg.me .bubble { background: var(--accent); border-color: var(--accent); color: #fff; }
.msg.me .bubble a { color: #fff; text-decoration: underline; }
.bubble .md > :first-child { margin-top: 0; }
.bubble .md > :last-child { margin-bottom: 0; }

.tool-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px 0 0; padding: 5px 10px;
  border-radius: 8px; font-size: 12.5px; font-weight: 550;
  background: rgba(34, 184, 166, .12); color: #128b7c;
  border: 1px solid rgba(34, 184, 166, .3);
}
html[data-theme="dark"] .tool-chip { color: #4fd8c6; }
.tool-chip.err { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

.composer {
  position: sticky; bottom: 0;
  padding: 12px 14px calc(12px + var(--safe-b));
  background: var(--surface); border-top: 1px solid var(--line);
  display: flex; gap: 9px; align-items: flex-end;
}
.composer textarea {
  flex: 1; min-height: 42px; max-height: 160px; resize: none;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); outline: none; font-size: 15px; line-height: 1.5;
}
.composer textarea:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.send-btn {
  width: 42px; height: 42px; flex-shrink: 0;
  border: 0; border-radius: 12px; background: var(--accent); color: #fff;
  font-size: 17px; cursor: pointer; display: grid; place-items: center;
}
.send-btn:disabled { opacity: .45; cursor: not-allowed; }

.suggest { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 12px; }
.suggest button {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-size: 12.5px; cursor: pointer;
  transition: all .14s;
}
.suggest button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.typing { display: inline-flex; gap: 3px; align-items: center; height: 18px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .28; } 30% { opacity: 1; } }

.banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r);
  background: rgba(245, 165, 36, .12);
  border: 1px solid rgba(245, 165, 36, .35);
  font-size: 13.5px; line-height: 1.6;
}
.banner.info { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* ============================== 抽屉/菜单 ============================== */

.sheet-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 12, 20, .42);
  backdrop-filter: blur(2px);
  animation: fade .16s;
}
@keyframes fade { from { opacity: 0; } }

.sheet {
  position: fixed; z-index: 61;
  background: var(--surface);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  left: 0; right: 0; bottom: 0;
  max-height: 88vh; max-height: 88dvh;
  border-radius: 18px 18px 0 0;
  animation: slideUp .22s cubic-bezier(.2, .9, .3, 1);
}
@keyframes slideUp { from { transform: translateY(16px); opacity: .6; } }
@media (min-width: 900px) {
  .sheet { left: auto; right: 0; top: 0; bottom: 0; width: 440px; max-height: none; border-radius: 18px 0 0 18px;
    animation: slideLeft .22s cubic-bezier(.2, .9, .3, 1); }
  @keyframes slideLeft { from { transform: translateX(20px); opacity: .6; } }
}
.sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
  padding-top: calc(15px + var(--safe-t));
}
.sheet-head h2 { font-size: 16.5px; flex: 1; }
.sheet-body { padding: 16px 18px calc(20px + var(--safe-b)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-body .field + .field { margin-top: 13px; }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; min-width: 0; }
.sheet-actions { display: flex; gap: 9px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; }

.menu {
  position: fixed; z-index: 62;
  min-width: 200px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-md);
  animation: fade .12s;
}
.menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 11px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text);
  font-size: 14px; text-align: left; cursor: pointer;
}
.menu button:hover { background: var(--line-2); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 2px; }
.menu .menu-label { padding: 6px 11px 3px; font-size: 11.5px; font-weight: 650; color: var(--text-3); }

/* ============================== 用户/成员 ============================== */

.member-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.member-row .mini-avatar { width: 32px; height: 32px; font-size: 13px; }
.member-name { font-size: 14px; font-weight: 600; }
.member-sub { font-size: 12px; color: var(--text-3); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-2); }
.kv .v { font-weight: 600; text-align: right; word-break: break-all; }

.code-box {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 13px;
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: 10px; margin-top: 8px;
}
.code-box code { flex: 1; font-size: 15px; font-weight: 700; letter-spacing: .12em; }

/* ================================ Toast ================================ */

.toast-wrap {
  position: fixed; z-index: 90;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 20px);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
@media (min-width: 900px) { .toast-wrap { bottom: 28px; } }
.toast {
  padding: 10px 16px; border-radius: 11px;
  background: #1c1f27; color: #fff;
  font-size: 13.5px; font-weight: 550;
  box-shadow: var(--shadow-md);
  animation: toastIn .2s cubic-bezier(.2, .9, .3, 1);
  max-width: 88vw; text-align: center;
}
.toast.err { background: var(--danger); }
.toast.ok { background: #12876f; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

/* ============================== 滚动条 ============================== */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.overdue { color: var(--danger); }
.now-line { height: 2px; background: var(--danger); border-radius: 1px; }
.loading { padding: 40px; text-align: center; color: var(--text-3); font-size: 13.5px; }

/* ======================= 可见范围 / 权限相关样式 ======================= */

.scope-picker {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--line-2);
  border-radius: 10px;
  flex-wrap: wrap;
}
.scope-picker .scope-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s, color .14s;
  white-space: nowrap;
}
.scope-picker .scope-opt:hover { background: var(--surface-2); }
.scope-picker .scope-opt.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.scope-picker .scope-opt.active[data-scope="private"] { color: #a855f7; }
.scope-picker .scope-opt.active[data-scope="team"] { color: var(--accent); }
.scope-picker.sm { padding: 2px; }
.scope-picker.sm .scope-opt { padding: 4px 7px; font-size: 13px; }
.scope-picker.sm .so-label { display: none; }

.scope-field { margin-top: 16px; }
.scope-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.scope-hint { margin-top: 6px; }

/* 外观三选一 */
.theme-opt {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; border: 0; background: transparent; cursor: pointer;
  padding: 13px 14px; border-radius: var(--r);
  font-size: 15px; color: var(--text); text-align: left;
}
.theme-opt:hover { background: var(--surface-2); }
.theme-opt.active { background: var(--accent-soft); color: var(--accent); font-weight: 550; }
.theme-opt + .theme-opt { margin-top: 2px; }

.add-row { flex-wrap: wrap; }
.add-foot { padding: 0 14px 10px; }

.chip.scope-private { background: rgba(168, 85, 247, .14); color: #9333ea; }
.chip.scope-admin { background: var(--accent-soft); color: var(--accent); }
.chip.owner-chip { background: linear-gradient(135deg, #f5a524, #f2545b); color: #fff; }

.shielded-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: repeating-linear-gradient(45deg, rgba(168,85,247,.16), rgba(168,85,247,.16) 6px, rgba(168,85,247,.28) 6px, rgba(168,85,247,.28) 12px);
  color: #7c3aed;
  border: 1px solid rgba(168, 85, 247, .45);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
html[data-theme="dark"] .shielded-badge { color: #c4a5ff; }

.task.is-shielded { background: rgba(168, 85, 247, .05); }
.task.is-shielded:hover { background: rgba(168, 85, 247, .1); }

.banner.owner-banner {
  background: rgba(168, 85, 247, .1);
  border-color: rgba(168, 85, 247, .4);
  align-items: flex-start;
  line-height: 1.65;
}

.scope-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.scope-tip { flex: 1; min-width: 160px; }

/* ------------------------------ 记录页签 ------------------------------ */

.record-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.record-tabs .tiny { flex: 1; min-width: 180px; }

/* ------------------------------ 工作日志 ------------------------------ */

.log-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.date-nav { display: flex; align-items: center; gap: 6px; }
.date-label { display: flex; align-items: center; gap: 7px; font-size: 15px; min-width: 150px; }
.date-label b { font-weight: 650; }

.digest {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
}
.digest-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line-2);
}
.digest-stats .ds {
  padding: 10px 6px;
  text-align: center;
  border-right: 1px solid var(--line-2);
  /* 格子现在是按钮：点开看这一天具体的任务 */
  border-top: 0; border-bottom: 0; border-left: 0;
  background: transparent; font-family: inherit;
  cursor: pointer; transition: background .12s;
}
.digest-stats .ds:hover { background: var(--hover); }
.digest-stats .ds:disabled { cursor: default; }
.digest-stats .ds:disabled:hover { background: transparent; }
.digest-stats .ds:last-child { border-right: 0; }
.digest-stats .ds .n { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.digest-stats .ds .l { font-size: 11px; color: var(--text-3); font-weight: 600; }
.digest-stats .ds.danger .n { color: var(--danger); }

.digest-block { border-bottom: 1px solid var(--line-2); }
.digest-block:last-child { border-bottom: 0; }
.digest-block summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  list-style: none;
  user-select: none;
}
.digest-block summary::-webkit-details-marker { display: none; }
.digest-block summary::after { content: '▸'; margin-left: auto; color: var(--text-3); transition: transform .15s; }
.digest-block[open] summary::after { transform: rotate(90deg); }
.digest-block .db-icon { font-size: 14px; }
.digest-block .db-count {
  padding: 1px 7px; border-radius: 999px;
  background: var(--line-2); color: var(--text-2);
  font-size: 11.5px; font-weight: 700;
}
.digest-block .db-count.danger { background: var(--danger-soft); color: var(--danger); }
.db-list { padding: 0 13px 10px; }
.db-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13.5px;
}
.db-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.db-title { flex: 1; min-width: 0; }

.log-input { min-height: 58px; resize: vertical; }
.log-text {
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  min-height: 52px;
  font-size: 14px;
}
.log-text > :first-child { margin-top: 0; }
.log-text > :last-child { margin-bottom: 0; }

@media (max-width: 560px) {
  .digest-stats { grid-template-columns: repeat(3, 1fr); }
  .digest-stats .ds:nth-child(3) { border-right: 0; }
  .digest-stats .ds:nth-child(n+4) { border-top: 1px solid var(--line-2); }
}

/* 6 个底部标签在窄屏上稍微收紧 */
@media (max-width: 380px) {
  .tab-item { font-size: 9.5px; }
  .tab-item .ti { font-size: 18px; }
}

/* ============================== 每日打卡 ==============================
 * 苹果风：分组之间用留白断开，项与项之间用发丝线；
 * 不套卡片、不用彩色标签，状态靠字色和图标表达。
 * ==================================================================== */

.cl-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}

/* 顶部进度：轻，不抢内容 */
.cl-hero { margin-bottom: 22px; }
.cl-hero-row { display: flex; align-items: center; gap: 18px; }
.cl-hero h2, .cl-hero h3 { font-size: 17px; font-weight: 600; margin: 0; }
.cl-hero .tiny, .cl-hero .muted { font-size: 13px; color: var(--text-3); }

.cl-ring {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--surface) 80%, transparent 81% 100%),
    conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--line-2) 0);
  transition: background .3s;
}
.cl-hero-done .cl-ring {
  background:
    radial-gradient(closest-side, var(--surface) 80%, transparent 81% 100%),
    conic-gradient(var(--ok) calc(var(--pct) * 1%), var(--line-2) 0);
}
.cl-ring span { font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.cl-ring span i { font-size: 9px; font-style: normal; font-weight: 500; color: var(--text-3); }

.cl-sections-bar { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.csb-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; color: var(--text-2); }
.csb-top b { font-weight: 550; }

/* 班次分组：一条标题 + 一排项，不套框 */
.tick-section { margin-bottom: 32px; }

.tick-section-head {
  display: flex; align-items: baseline; gap: 8px;
  width: 100%;
  padding: 0 0 12px;
  border: 0; border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 19px; font-weight: 680;
  cursor: pointer; text-align: left;
  letter-spacing: -.022em;
}
.tick-section.all-done .tick-section-head { border-bottom-color: var(--line-2); }
.ts-window { font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.ts-count {
  margin-left: auto;
  font-size: 12.5px; font-weight: 400;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  background: none; padding: 0;
}
.tick-section.all-done .ts-count { color: var(--ok); }
.ts-caret { color: var(--text-3); font-size: 11px; }

.tick-list { display: flex; flex-direction: column; }

/* 打卡项：一行一条，细线分隔（尺寸在下方统一覆盖，这里只管结构） */
.tick-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .12s;
  -webkit-user-select: none; user-select: none;
  position: relative;
}
.tick-item:last-child { border-bottom: 0; }
.tick-item:active { background: var(--hover); }
.tick-item.pending { opacity: .55; }

.tick-box {
  width: 23px; height: 23px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--line-3);
  border-radius: 50%;
  background: transparent;
  display: grid; place-items: center;
  color: transparent; font-size: 12px; font-weight: 700;
  transition: all .16s cubic-bezier(.2,.9,.3,1);
}
.tick-item.done .tick-box {
  background: var(--ok); border-color: var(--ok); color: #fff;
}
.tick-item.done .tick-title { color: var(--text-3); }
.tick-item.need-photo .tick-box { border-color: var(--warn); }

.tick-main { flex: 1; min-width: 0; }
.tick-title { font-size: 16px; font-weight: 450; line-height: 1.42; word-break: break-word; }
.tick-item.done .tick-title { text-decoration: line-through; text-decoration-color: var(--text-3); }

/* 元信息：灰色小字，不用胶囊 */
.tick-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 3px; font-size: 12.5px; color: var(--text-3); font-weight: 400;
}
.tick-meta .mini-avatar { width: 16px; height: 16px; font-size: 9px; }
.tick-meta .chip { background: none !important; padding: 0 !important; font-size: 12.5px !important; }
.tick-meta .chip.ok { color: var(--ok) !important; }
.tick-meta .chip.warn { color: var(--warn) !important; }
.tick-meta .chip.photo-chip { color: var(--text-3) !important; }

.tick-note {
  margin-top: 7px;
  font-size: 13px; color: var(--text-2); line-height: 1.6;
  padding-left: 10px; border-left: 2px solid var(--line);
}
.tick-detail-toggle {
  margin-top: 6px; padding: 0;
  border: 0; background: transparent;
  color: var(--text-3); font-size: 12.5px; font-weight: 400;
  cursor: pointer;
}
.tick-detail-toggle:hover { color: var(--accent); }
.tick-detail {
  margin-top: 8px;
  font-size: 13px; line-height: 1.75; color: var(--text-3);
}
.tick-detail > div + div { margin-top: 3px; }

/* 行尾操作：三个按钮排成一行，收在标题右侧 */
.tick-acts {
  display: flex; align-items: center; gap: 2px; flex: none;
  margin-left: 6px;
}
.tick-act {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 8px;
  color: var(--text-3); cursor: pointer;
  opacity: 0; transition: opacity .14s, background .14s, color .14s;
}
.tick-act:hover { background: var(--surface-2); color: var(--accent); }
.tick-item:hover .tick-act { opacity: .75; }
.tick-item:hover .tick-act:hover { opacity: 1; }
@media (hover: none) {
  .tick-act { opacity: .5; width: 34px; height: 34px; }   /* 手机上留够点按面积 */
  .tick-item.need-photo .tick-act[data-act="cl-photo"] { opacity: 1; color: var(--warn); }
}

/* 打卡行：文字收小、行距收紧，一屏能看到更多 */
.tick-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .12s;
  -webkit-user-select: none; user-select: none;
  position: relative;
}
.tick-title { font-size: 15px; font-weight: 450; line-height: 1.38; word-break: break-word; }
.tick-meta { font-size: 12px; margin-top: 2px; }
.photo-what { font-size: 12px; padding: 6px 9px; margin-top: 5px; }

/* 拍照提示：一条淡黄提示条，不要彩色胶囊 */
.photo-what {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 6px; padding: 7px 10px;
  background: rgba(255,149,0,.08);
  border-radius: var(--r-sm);
  font-size: 12.5px; color: var(--text-2); line-height: 1.6;
}
.pw-label { flex-shrink: 0; color: var(--warn); font-weight: 550; }

.tick-photo {
  display: block; margin-top: 10px;
  width: 100%; max-width: 200px; max-height: 150px;
  object-fit: cover; border-radius: var(--r);
  cursor: pointer;
}

/* 今日页的迷你进度卡 */
.cl-mini { cursor: pointer; }

/* 完成情况：参与人明细 */
.cl-member { padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.cl-member:last-child { border-bottom: 0; }
.cl-member-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.cl-member-items { display: flex; flex-direction: column; gap: 5px; padding-left: 3px; }
.cl-mi { display: flex; gap: 8px; font-size: 13px; line-height: 1.5; }
.cl-mi-time {
  flex-shrink: 0; width: 44px;
  color: var(--text-3); font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* 7 天趋势 */
.cl-trend { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.cl-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.cl-trend-bar {
  flex: 1; width: 100%; max-width: 28px;
  display: flex; align-items: flex-end;
  background: var(--line-2); border-radius: 4px; overflow: hidden;
}
.cl-trend-bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px; transition: height .3s; }
.cl-trend-n { font-size: 12px; font-weight: 550; margin-top: 6px; }
.cl-trend-d { font-size: 11px; color: var(--text-3); }

/* ============================== 拍照留证 ============================== */

.tick-photo {
  display: block;
  margin-top: 10px;
  width: 100%;
  max-width: 200px;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--r);
  cursor: zoom-in;
  transition: opacity .14s;
}
.tick-photo:hover { opacity: .88; }

.tick-side { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.tick-cam { opacity: 0; transition: opacity .14s; }
.tick-item:hover .tick-cam { opacity: 1; }
@media (max-width: 700px) { .tick-cam { opacity: .55; } }
.tick-item.need-photo .tick-cam { opacity: 1; }

.ck-item-title { font-size: 15.5px; font-weight: 620; line-height: 1.5; margin-bottom: 6px; }
.ck-preview { position: relative; margin-bottom: 6px; }
.ck-preview img {
  width: 100%; max-height: 46vh; object-fit: contain;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
}
.ck-progress { margin-top: 10px; }
.ck-ok { color: var(--ok); margin-top: 6px; font-weight: 600; }
.ck-existing {
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px dashed var(--line);
  font-size: 13px; color: var(--text-2); text-align: center;
}
.switch-row {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 0; font-size: 14px; cursor: pointer;
}
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }

/* ============================== 未完成提醒 ============================== */

.badge.soft { background: var(--warn); color: #3a2600; }
.tbad.soft { background: var(--warn); color: #3a2600; }

.cl-remind {
  background: rgba(245,165,36,.13);
  border-color: rgba(245,165,36,.42);
  align-items: flex-start;
  line-height: 1.65;
}

.rm-rule {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
}
.rm-rule:last-child { border-bottom: 0; }
.rm-rule select, .rm-rule input[type="time"] { padding: 7px 10px; font-size: 13.5px; }

/* ============================ 拍照要求提示 ============================ */

.photo-what {
  display: flex; gap: 8px; align-items: baseline;
  margin-top: 7px; padding: 7px 10px;
  background: rgba(245,165,36,.10);
  border-left: 3px solid var(--warn);
  border-radius: 0 8px 8px 0;
  font-size: 12.5px; line-height: 1.55; color: var(--text-2);
}
.pw-label {
  flex-shrink: 0;
  font-weight: 700; color: #b26f00;
  font-size: 11.5px;
}
html[data-theme="dark"] .pw-label { color: var(--warn); }

/* 打卡弹层里的拍摄要求 */
.ck-what {
  margin: 12px 0 16px;
  padding: 13px 15px;
  background: rgba(245,165,36,.12);
  border: 1px solid rgba(245,165,36,.4);
  border-radius: var(--r);
}
.ck-what-head {
  font-size: 14.5px; font-weight: 680;
  margin-bottom: 8px;
  color: #a86600;
}
html[data-theme="dark"] .ck-what-head { color: var(--warn); }
.ck-what-list { margin: 0; padding-left: 20px; }
.ck-what-list li {
  font-size: 13.5px; line-height: 1.7; color: var(--text-2);
}
.ck-what-list li + li { margin-top: 5px; }
/* 示例照片：员工照着拍，省得来回返工 */
.ck-example-wrap { margin-top: 12px; }
.ck-example-tip { font-size: 12.5px; color: #a86600; margin-bottom: 6px; font-weight: 600; }
.ck-example {
  display: block; width: 100%; max-height: 300px;
  /* contain：门头、门把手这些边角不能被裁掉，员工照着拍才算数 */
  object-fit: contain; object-position: center;
  border-radius: 10px; border: 1px solid rgba(245,165,36,.4);
  background: #fff;
}
/* 一条打卡要拍多张时的槽位卡片 */
.ck-slots { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 4px; }
.ck-slot { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); }
.ck-slot.done { border-color: rgba(34,184,166,.45); }
.ck-slot-head { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin-bottom: 8px; }
.ck-slot-ok { margin-left: auto; font-size: 12px; color: var(--ok, #22b8a6); font-weight: 600; }
.ck-slot-need { margin-left: auto; font-size: 12px; color: #a86600; font-weight: 600; }
.ck-slot-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 8px; }
.ck-slot-btn { width: 100%; }
.ck-slot-err { color: var(--danger); margin-top: 6px; }
/* 列表里一张打卡的多张留证：缩略图一排 */
.tick-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tick-photos .tick-photo { width: 72px; height: 72px; max-width: none; max-height: none; margin: 0; object-fit: cover; border-radius: 10px; }

/* ============================ 今日任务工作台 ============================ */

.day-hero { margin-bottom: 16px; }
.dh-top { display: flex; align-items: center; gap: 16px; }
.dh-greet { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }

.dh-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; }
.dh-card {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-2);
  cursor: pointer; text-align: left;
  transition: border-color .14s, background .14s;
}
.dh-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.dhc-icon { font-size: 18px; flex-shrink: 0; }
.dhc-body { display: flex; flex-direction: column; min-width: 0; }
.dhc-title { font-size: 12.5px; font-weight: 650; }
.dhc-sub { font-size: 11.5px; color: var(--text-3); }
@media (max-width: 560px) {
  .dh-cards { grid-template-columns: 1fr; }
  .dh-card { padding: 9px 11px; }
  .dhc-body { flex-direction: row; gap: 8px; align-items: baseline; }
}

.work-card { }
.done-fold { border-top: 1px solid var(--line-2); }
.done-fold summary {
  padding: 10px 15px; font-size: 13px; font-weight: 600;
  color: var(--text-3); cursor: pointer; list-style: none;
}
.done-fold summary::-webkit-details-marker { display: none; }
.done-fold summary::before { content: '▸ '; }
.done-fold[open] summary::before { content: '▾ '; }

.chip.manager-chip { background: rgba(226,72,77,.14); color: var(--danger); }
.chip.kr-chip { background: rgba(123,92,255,.14); color: #7b5cff; }
html[data-theme="dark"] .chip.kr-chip { color: #b9a5ff; }

/* ============================== 计划与审核 ============================== */

.okr-card .okr-title { font-size: 16px; font-weight: 680; letter-spacing: -.01em; }
.okr-card .okr-pct {
  font-size: 24px; font-weight: 750; letter-spacing: -.03em;
  color: var(--accent); flex-shrink: 0;
}
.okr-pct i { font-size: 12px; font-style: normal; font-weight: 600; color: var(--text-3); }

.kr-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
}
.kr-row:last-of-type { border-bottom: 0; }
.kr-main { flex: 1; min-width: 0; }
.kr-title { font-size: 14px; font-weight: 600; line-height: 1.5; }
.kr-meta { margin-top: 4px; line-height: 1.6; }
.kr-side { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.kr-pct { font-size: 14px; font-weight: 700; color: var(--accent); }

.okr-mini { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.okr-mini:last-child { border-bottom: 0; }
.okr-mini-top {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 7px;
}
.okr-mini-top b { color: var(--accent); }
.okr-mini-kr {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--text-3); margin-top: 5px;
}
.okmk-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.okmk-val { flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* 7 个底部标签，窄屏收紧 */
@media (max-width: 430px) {
  .tab-item { font-size: 9px; }
  .tab-item .ti { font-size: 17px; }
  .tabbar { --tabbar-h: 58px; }
}

/* ================================ 排班 ================================ */

/* 排班表：手机上放不下 7 天，所以「班次」列固定、日期横滑，
   并在右侧加一层渐隐 + 提示，让人知道右边还有内容。 */
.roster-scroll {
  position: relative;
  margin: 0 -16px;                 /* 顶到屏幕边，滑动区域更大 */
  padding: 0 16px;
}
.roster-scroll::after {
  content: ''; position: absolute; top: 1px; bottom: 1px; right: 16px; width: 26px;
  pointer-events: none; border-radius: 0 var(--r-lg) var(--r-lg) 0;
  background: linear-gradient(90deg, transparent, var(--bg));
  opacity: .9; transition: opacity .2s;
}
.roster-scroll.at-end::after { opacity: 0; }

.roster-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.roster { border-collapse: separate; border-spacing: 0; background: var(--surface); }

/* 表头与班次列固定：横滑时始终看得见「早班 / 晚班」 */
.roster thead th:first-child,
.roster tbody th:first-child {
  position: sticky; left: 0; z-index: 2;
  background: var(--surface-2);
  box-shadow: 1px 0 0 var(--line-2);
}
.rs-corner, .rs-shift { width: 76px; }

.roster {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.roster th, .roster td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.roster tr:last-child th, .roster tr:last-child td { border-bottom: 0; }
.roster th:last-child, .roster td:last-child { border-right: 0; }

.rs-corner { width: 76px; padding: 9px 8px; font-size: 11.5px; color: var(--text-3); text-align: left; }
.roster thead th {
  padding: 8px 4px; text-align: center; cursor: pointer; background: var(--surface-2);
  transition: background .14s;
}
.roster thead th:hover { background: var(--accent-soft); }
.roster thead th.today { background: var(--accent-soft); }
.rs-dow { font-size: 11.5px; font-weight: 650; color: var(--text-2); }
.rs-date { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }

.rs-shift {
  width: 76px; padding: 9px 8px; text-align: left;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  background: var(--surface-2);
}
.rs-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rs-name { font-size: 13px; font-weight: 650; }
.rs-time { font-size: 10.5px; color: var(--text-3); }

.rs-cell {
  padding: 6px 4px; vertical-align: top; cursor: pointer;
  min-width: 62px; transition: background .12s;
}
.rs-cell:hover { background: var(--accent-soft); }
.rs-cell.today { background: rgba(79,124,255,.05); }
.rs-cell.empty .rs-empty { color: var(--text-3); opacity: .5; }
.rs-cell:hover .rs-empty { opacity: 1; color: var(--accent); }
.rs-empty { display: block; text-align: center; font-size: 15px; padding: 8px 0; }

.rs-person {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 5px; border-radius: 7px;
  font-size: 12px; margin-bottom: 3px;
}
.rs-person:last-child { margin-bottom: 0; }
.rs-person.lead { background: rgba(79,124,255,.13); font-weight: 650; }
.rs-person .mini-avatar { width: 16px; height: 16px; font-size: 9px; }
.rs-pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-star { color: var(--accent); font-size: 11px; margin-left: auto; }

.rs-picker { display: flex; flex-direction: column; gap: 2px; }
.rs-pick {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: background .12s;
  font-size: 14px;
}
.rs-pick:hover { background: var(--surface-2); }
.rs-pick.on { background: var(--accent-soft); border-color: var(--accent); }
.rs-pick input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }
.rs-pick input[type="radio"] { margin-left: auto; accent-color: var(--warn); width: 16px; height: 16px; }
.rs-pick input[type="radio"]:disabled { opacity: .25; }
.rs-lead-label { font-size: 11.5px; color: var(--text-3); }

.shift-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid var(--line-2);
}
.shift-row:last-child { border-bottom: 0; }

.chip.shift-chip { background: transparent; border: 1px solid currentColor; }

/* 打卡分组里的当班信息 */
.ts-duty {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 15px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  font-size: 12px;
}
.tsd-shift { font-weight: 700; }
.tsd-lead { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.tsd-lead b { color: var(--text); }
.tsd-lead .mini-avatar { width: 17px; height: 17px; font-size: 9px; }

@media (max-width: 700px) {
  .rs-person .rs-pname { max-width: 52px; }
}

/* ================================ 看板 ================================ */
/* 目标：一屏看清「今天要干什么」，其余信息一律收进详情 */

/* ------------------------------ 今日页 ------------------------------
 * 参考苹果「提醒事项 / 备忘录」：不套卡片、不用阴影，
 * 靠留白和发丝线分区；颜色只用来表达状态，不做装饰。
 * ------------------------------------------------------------------ */

.board { max-width: 640px; margin: 0 auto; }

.board-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 2px 0 18px;
}
.bh-left { flex: 1; min-width: 0; }
.bh-sub { font-size: 15px; color: var(--text-2); }
.bh-sub b { color: var(--text); font-weight: 640; }
.bh-done { color: var(--ok); font-weight: 600; }
.bh-shift {
  display: inline-block; margin-top: 10px;
  padding: 3px 10px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-2);
  font-size: 12px; font-weight: 550;
}
.bh-pct { text-align: center; flex-shrink: 0; }
.bh-pct .cl-ring { width: 48px; height: 48px; margin: 0 auto 6px; }
.bh-pct .cl-ring span { font-size: 13px; }
.bh-pct .tiny { font-variant-numeric: tabular-nums; }

/* 任务列表：整体收进一张卡片里（和团队页一致，看着稳） */
.board-list {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2px 14px;
  overflow: hidden;
}

.bd-row {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background .12s;
}
.board-list > .bd-row:last-child { border-bottom: 0; }
.bd-row:active { background: var(--line-2); }

/* 圆形勾选框：苹果的完成圈 */
.bd-check {
  width: 23px; height: 23px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--line-3); border-radius: 50%;
  background: transparent; color: transparent;
  font-size: 12px; font-weight: 800; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  transition: all .16s cubic-bezier(.2,.9,.3,1);
}
.bd-row:hover .bd-check { border-color: var(--text-3); }
.bd-row.done .bd-check { background: var(--ok); border-color: var(--ok); color: #fff; }

.bd-body { flex: 1; min-width: 0; }
.bd-title { font-size: 16px; font-weight: 450; line-height: 1.42; word-break: break-word; }
.bd-row.done .bd-title { color: var(--text-3); text-decoration: line-through; }

/* 标记：不用色块，直接小字，弱化 */
.bd-marks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.bd-mark {
  font-size: 12px; font-weight: 500;
  background: none; padding: 0; color: var(--text-3);
}
.bd-mark.mgr, .bd-mark.urgent { color: var(--danger); font-weight: 550; }
.bd-mark.over { color: var(--warn); font-weight: 550; }
.bd-mark.kr { color: var(--text-3); }

.bd-empty {
  padding: 56px 4px; text-align: center;
  font-size: 15px; color: var(--text-3); line-height: 2;
}

.bd-donefold { border-top: 1px solid var(--line-2); }
.bd-donefold summary {
  padding: 16px 2px; font-size: 14px; font-weight: 450;
  color: var(--text-3); cursor: pointer; list-style: none;
}
.bd-donefold summary::-webkit-details-marker { display: none; }

/* 逾期：只用一个细红边提示，不做整块卡片 */
.board-over {
  margin-top: 34px; padding-top: 4px;
  border-top: 1px solid rgba(255,59,48,.28);
}
.bo-head {
  padding: 12px 2px 4px; font-size: 13px; font-weight: 620;
  color: var(--danger);
}
.bo-tip { padding: 6px 2px 0; }

.board-undated { margin-top: 30px; }
.board-undated summary {
  padding: 12px 2px; font-size: 13.5px; font-weight: 500;
  color: var(--text-3); cursor: pointer; list-style: none;
  border-top: 1px solid var(--line-2);
}
.board-undated summary::-webkit-details-marker { display: none; }

/* 添加：一条淡淡的输入框，聚焦才显形 */
.board-add { display: flex; gap: 9px; align-items: center; margin-top: 30px; }
.board-add input {
  flex: 1; min-width: 0;
  padding: 11px 0;
  border: 0; border-bottom: 1px solid var(--line-2);
  border-radius: 0; background: transparent; outline: none;
  font-size: 15px; color: var(--text);
  transition: border-color .14s;
}
.board-add input::placeholder { color: var(--text-3); }
.board-add input:focus { border-bottom-color: var(--accent); }
.board-add .btn { border-radius: 8px; }

/* 日程 */
.board-events { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.be-head { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.be-row { display: flex; gap: 11px; padding: 6px 0; cursor: pointer; font-size: 14px; }
.be-row:hover .be-title { color: var(--accent); }
.be-time { flex-shrink: 0; width: 48px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.be-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.board-foot {
  display: block; width: 100%; margin-top: 14px;
  padding: 12px 16px; text-align: center;
  border: 0; background: transparent;
  color: var(--text-3); font-size: 13px; cursor: pointer;
  border-radius: var(--r);
}
.board-foot:hover { background: var(--surface-2); color: var(--text-2); }

/* ============================== 计划（精简后） ============================== */

.plan-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.plan-when { font-size: 16px; font-weight: 680; display: flex; align-items: baseline; gap: 8px; }
.plan-group {
  font-size: 13px; font-weight: 650; color: var(--text-2);
  margin: 18px 2px 9px;
}
.plan-group:first-of-type { margin-top: 0; }

.plan-note {
  margin-top: 16px; padding: 13px 15px;
  background: var(--accent-soft); border-radius: var(--r);
  font-size: 14px;
}
.plan-note.warn { background: rgba(245,165,36,.14); }
.pn-head { font-size: 12.5px; font-weight: 680; color: var(--text-2); margin-bottom: 7px; }
.plan-note .md > :first-child { margin-top: 0; }
.plan-note .md > :last-child { margin-bottom: 0; }

.plan-extra { margin-top: 16px; }
.plan-extra summary {
  font-size: 13px; color: var(--text-3); cursor: pointer;
  list-style: none; padding: 6px 0;
}
.plan-extra summary::-webkit-details-marker { display: none; }
.plan-extra summary::before { content: '▸ '; }
.plan-extra[open] summary::before { content: '▾ '; }

.plan-submitted {
  margin-top: 16px; padding: 14px 16px;
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: var(--r); font-size: 13.5px; color: var(--text-2);
  line-height: 1.7;
}
.plan-locked { text-align: center; padding: 18px 0 4px; }

/* 审核卡片 */
.rv-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 13px 15px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.rv-head { display: flex; align-items: center; gap: 9px; }
.rv-say {
  margin-top: 10px; padding: 9px 12px;
  background: var(--surface-2); border-radius: 9px;
  font-size: 13px; color: var(--text-2); line-height: 1.6;
}
.rv-actions { display: flex; align-items: center; gap: 7px; margin-top: 12px; }
.rv-missing { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.rv-missing:last-child { border-bottom: 0; }

.kr-from { opacity: .75; }

/* ============================== 团队动态 ============================== */

.act-list { display: flex; flex-direction: column; }
.act-row {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line-2);
}
.act-row:last-child { border-bottom: 0; }
.act-body { flex: 1; min-width: 0; }
.act-text { font-size: 13.5px; line-height: 1.55; }
.act-row .mini-avatar { width: 26px; height: 26px; font-size: 11px; }

/* 折叠式卡片头（本月概览等次要信息） */
details.card > summary.card-head {
  cursor: pointer; list-style: none;
  border-bottom: 1px solid var(--line-2);
}
details.card > summary.card-head::-webkit-details-marker { display: none; }
details.card:not([open]) > summary.card-head { border-bottom: 0; }
details.card:not([open]) .ts-caret { transform: rotate(-90deg); }
details.card .ts-caret { transition: transform .15s; }

/* =========================== @ 派活给同事 =========================== */

.board-add { position: relative; align-items: stretch; }

.ba-field { flex: 1; min-width: 0; position: relative; display: flex; }
.ba-field input { width: 100%; }

/* 成员下拉 */
.ba-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  padding: 5px;
  max-height: 240px; overflow-y: auto;
}
.ba-sug {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text);
  font-size: 14px; text-align: left; cursor: pointer;
}
.ba-sug:hover, .ba-sug.on { background: var(--accent-soft); }
.ba-sug .mini-avatar { width: 24px; height: 24px; font-size: 11px; }
.ba-sug .tiny { margin-left: auto; }

/* 紧急程度二选一 */
.ba-assign { margin-top: 10px; }
.ba-target {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 9px 13px; margin-bottom: 9px;
  background: var(--accent-soft); border-radius: var(--r);
  font-size: 13.5px; color: var(--accent);
}
.ba-target .mini-avatar { width: 20px; height: 20px; font-size: 10px; }
.ba-target b { font-weight: 700; }
.ba-target.warn { background: rgba(245,165,36,.14); color: #b26f00; }
html[data-theme="dark"] .ba-target.warn { color: var(--warn); }

.ba-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ba-btns .btn {
  flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 11px 14px; height: auto; text-align: left; line-height: 1.35;
}
.bab-main { font-size: 14px; font-weight: 680; }
.bab-sub { font-size: 11px; font-weight: 500; opacity: .75; }
.ba-urgent { border-color: rgba(226,72,77,.45); color: var(--danger); }
.ba-urgent:hover { background: rgba(226,72,77,.09); border-color: var(--danger); }
.ba-later { border-color: var(--line); color: var(--text-2); }
.ba-later:hover { background: var(--surface-2); }

@media (max-width: 480px) {
  .ba-btns { grid-template-columns: 1fr; }
  .ba-btns .btn { flex-direction: row; align-items: center; gap: 8px; }
  .bab-sub { margin-left: auto; }
}

/* ============================== 通知中心 ============================== */

.bell-btn { position: relative; }
.bell-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
  border: 2px solid var(--bg);
  box-sizing: content-box;
}

.nt-list { display: flex; flex-direction: column; gap: 8px; }

/* 通知列表顶部工具条：显示未读数 + 「全部标为已读」 */
/* 之前只有一条条点才能消掉未读，被 @ 多了很烦 —— 这里给一个一键清空的入口 */
.nt-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 2px; padding: 0 2px;
  font-size: 12.5px; color: var(--text-3);
}
.nt-toolbar b { color: var(--accent); font-weight: 640; }
.nt-clear {
  border: 0; background: transparent; color: var(--accent);
  font-size: 12.5px; font-weight: 600; padding: 6px 8px;
  border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.nt-clear:hover { background: var(--accent-soft); }
.nt-clear:disabled { opacity: .5; cursor: default; }

.nt-row {
  display: block; width: 100%; text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  cursor: pointer; transition: border-color .14s, background .14s;
}
.nt-row:hover { border-color: var(--accent); }
.nt-row.unread { background: var(--accent-soft); border-color: transparent; }
.nt-row.unread .nt-title::after {
  content: ''; display: inline-block;
  width: 7px; height: 7px; margin-left: 7px;
  border-radius: 50%; background: var(--accent); vertical-align: middle;
}
.nt-title { font-size: 14px; font-weight: 620; line-height: 1.45; }
.nt-body { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-top: 5px; }
.nt-foot {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--text-3); margin-top: 8px;
}
.nt-foot .mini-avatar { width: 16px; height: 16px; font-size: 9px; }

/* ------------------- 成员工作面板（点成员看他的待办） ------------------- */

/* 团队成员列表里，整行可点 */
.board-row { cursor: pointer; transition: background .14s; }
.board-row:hover { background: var(--accent-soft); }
.board-peek {
  font-size: 12px; color: var(--accent); font-weight: 560;
  white-space: nowrap; opacity: 0; transition: opacity .14s;
}
.board-row:hover .board-peek { opacity: 1; }
@media (hover: none) { .board-peek { opacity: .75; } }

.bd-head { display: flex; align-items: center; gap: 12px; }

.bd-tabs {
  display: flex; gap: 6px; margin: 14px 0 10px;
  border-bottom: 1px solid var(--line); padding-bottom: 0;
}
.bd-tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 12px; font-size: 13px; font-weight: 560;
  color: var(--text-3); border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
}
.bd-tab:hover { color: var(--text); }
.bd-tab.on { color: var(--accent); border-bottom-color: var(--accent); }

.bd-list { display: flex; flex-direction: column; gap: 8px; }

.bd-task {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface);
}
.bd-task.done { opacity: .6; }
.bd-task.done .bd-title { text-decoration: line-through; }
.bd-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 6px; flex: none;
}
.bd-title { font-size: 13.5px; font-weight: 560; line-height: 1.5; word-break: break-word; }
.bd-meta { font-size: 11.5px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }

/* ============================== 每日业绩 ============================== */

.sales { max-width: 640px; margin: 0 auto; }

.sales-goal {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 20px;
}
.sales-goal.empty { padding: 16px 0 18px; }
.sg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sg-label { font-size: 13px; color: var(--text-3); }
.sg-amount { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sg-amount i { font-size: 13px; font-style: normal; font-weight: 500; color: var(--text-3); }
.sg-bar { height: 6px; margin-top: 12px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.sg-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.sg-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.sg-foot b { color: var(--text); font-weight: 600; }
.sg-done { color: var(--ok); font-weight: 550; }
.sg-kr { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }

.sv-amount { font-size: 30px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sv-note { margin-top: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.sv-photo { display: block; margin-top: 12px; max-width: 200px; max-height: 150px; width: 100%; object-fit: cover; border-radius: var(--r); cursor: zoom-in; }
.sv-photo-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.sv-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.sv-row:last-child { border-bottom: 0; }
.sv-date { flex: none; width: 46px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sv-amt { flex: none; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sv-note2 { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-thumb { flex: none; border: 0; background: transparent; cursor: pointer; color: var(--text-3); padding: 4px; }
.sv-thumb:hover { color: var(--accent); }

/* ------------------------- 今日页的「明天计划」 ------------------------- */
.tomorrow { margin-top: 30px; border-top: 1px solid var(--line-2); }
.tomorrow > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 0; cursor: pointer; list-style: none;
}
.tomorrow > summary::-webkit-details-marker { display: none; }
.tp-title { font-size: 15px; font-weight: 600; }
.tp-sub { font-size: 12.5px; color: var(--text-3); }
.tp-status { font-size: 12.5px; color: var(--text-3); }
.tp-status.ok { color: var(--ok); }
.tp-status.wait { color: var(--accent); }
.tp-status.warn { color: var(--warn); }
.tp-body { padding-bottom: 4px; }

.plan-group { font-size: 12.5px; color: var(--text-3); margin: 16px 0 8px; }
.plan-note { margin-top: 14px; padding: 11px 13px; background: var(--surface-2); border-radius: var(--r); font-size: 13px; }
.plan-note.warn { background: rgba(255,149,0,.1); }
.pn-head { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.plan-submitted { margin-top: 12px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.plan-locked { margin-top: 10px; }
.plan-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.plan-when { font-size: 15px; font-weight: 600; }
/* 打卡里绑定页面的项：看起来像"去办理"，不是"打勾" */
.tick-item.linked .tick-box { border-style: dashed; }
.tm-link { color: var(--accent); font-weight: 550; }

/* 业绩页的小票照片框（必传，所以给个明确的块） */
.sv-photo-box {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 14px;
  border: 1px dashed var(--line-3); border-radius: var(--r);
  background: var(--surface-2);
}
.sv-photo-box.ok { border-style: solid; border-color: var(--ok); background: rgba(52,199,89,.07); }
.svp-icon { flex: none; color: var(--text-3); }
.sv-photo-box.ok .svp-icon { color: var(--ok); }
.svp-title { font-size: 14px; font-weight: 600; }
/* ------------------- 今日小结：一条一条的输入 ------------------- */

/* 标签里有个 SVG 图标，必须让图标和字排成一行 ——
   .field 本身是纵向 flex，不处理的话图标和文字会各占一行。 */
.log-field > span {
  display: inline-flex; align-items: center; gap: 6px;
}
.log-field > span svg { flex: none; }

/* 自动汇总和第一块内容之间要留出气口，之前贴在一起 */
.digest { margin-bottom: 4px; }
.log-field:first-of-type { margin-top: 30px; }
.log-field + .log-field { margin-top: 26px; }

/* 只读视图的三个小标题，同样处理图标对齐 */
.log-view-title {
  display: flex; align-items: center; gap: 6px;
  margin: 20px 0 8px;
  font-size: 13px; font-weight: 650; color: var(--text-2);
}
.log-view-title svg { flex: none; }

/* ------------------- 写小结：只有一条线，没有框 -------------------
   这是在写小结，不是填表。输入框的边框、底色、圆角全部去掉，
   只留底下一道细线 —— 视线落在字上，不落在控件上。

   注意选择器要写 `.field .log-input`：全局的 `.field input` 权重更高
   （标签+标签 vs 单个类），单写 `.log-input` 会被它压过去，
   结果还是灰底圆角框 —— 这个坑踩过一次。 */
.log-list { display: flex; flex-direction: column; gap: 2px; }
.log-line { display: flex; align-items: center; gap: 6px; }
.field .log-input,
.log-input {
  flex: 1; min-width: 0;
  width: 100%;
  padding: 9px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: inherit; font-size: 14.5px; line-height: 1.5;
  color: var(--text);
  transition: border-color .14s;
  -webkit-appearance: none; appearance: none;
}
.field .log-input:focus,
.log-input:focus {
  outline: none;
  border-color: transparent;
  border-bottom-color: var(--accent);
  background: transparent;
  box-shadow: none;
}
.log-input::placeholder { color: var(--text-3); }
.log-line-del {
  flex: none; width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; background: transparent; cursor: pointer;
  color: var(--text-3); border-radius: 7px;
  opacity: 0; transition: opacity .14s, background .14s, color .14s;
}
.log-line:hover .log-line-del,
.log-line:focus-within .log-line-del { opacity: .5; }
.log-line-del:hover { opacity: 1; background: var(--surface-2); color: var(--danger); }
.log-line-add {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 2px; font-size: 13px; color: var(--accent);
  border-radius: 8px; font-weight: 550;
}
.log-line-add:hover { background: var(--accent-soft); }
.log-line-add svg { flex: none; }
/* 今日小结的只读展示（一条一条） */
.log-view { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.log-view li { font-size: 13.5px; line-height: 1.65; color: var(--text-2); }
.log-view li::marker { color: var(--text-3); }
/* 小结卡头：不要大标题，一行小字就够 */
.card-head.plain { padding: 13px 16px; }
.ch-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
/* ------------------- 顶部日期条（打卡 / 小结共用） -------------------
   这两页不再单独显示大标题：顶栏就是「‹ 10月3日 今天 ›」这个控件，
   日期只出现这一处。 */
/* 顶栏的日期导航（打卡/业绩/小结页当标题用）。
   窄屏上它和右边的图标会挤到一起，所以要能被压缩：
   它自己是 flex 子项，允许收缩；里面的日期文字用省略号让位，
   而「今天」按钮设成不可压缩 —— 按钮被压扁就点不着了。 */
.topbar-datenav {
  display: flex; align-items: center; gap: 2px;
  margin-left: -6px;
  min-width: 0; flex: 0 1 auto; overflow: hidden;
}
.topbar-datenav .icon-btn.sm { width: 28px; height: 28px; }
.topbar-datenav .icon-btn.sm:disabled { opacity: .3; cursor: default; }
.tdn-date {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 17px; font-weight: 650; color: var(--text);
  letter-spacing: -.01em;
  padding: 0 4px; white-space: nowrap; font-variant-numeric: tabular-nums;
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
/* 日期条当标题时，原来的 h1 和副标题藏掉，免得一屏两个标题 */
body.has-datenav #viewTitle,
body.has-datenav #viewSub { display: none; }
.tdn-date i {
  font-style: normal; font-size: 11.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 1px 6px; border-radius: 6px;
}
.tdn-today {
  border: 0; background: transparent; cursor: pointer;
  font-size: 12.5px; color: var(--accent); font-weight: 550;
  padding: 4px 8px; border-radius: 8px; white-space: nowrap;
}
.tdn-today:hover { background: var(--accent-soft); }

/* 窄屏：日期条自己会缩，不需要换行 */
@media (max-width: 620px) {
  .topbar-left { flex-wrap: nowrap; }
  .topbar-datenav { margin-left: -8px; }
}
/* 逾期行尾的「往后推」按钮：像微信长按消息那样弹日期菜单 */
.bd-postpone {
  flex: none; align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 0; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--accent);
  transition: background .14s;
}
.bd-postpone:hover { background: var(--accent-soft); }
.bd-row.overdue .bd-body { padding-right: 2px; }
/* 统计格子弹出的任务清单 */
.digest-item {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 0; border-bottom: 1px solid var(--line-2);
}
.digest-item:last-child { border-bottom: 0; }
.di-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.di-title { font-size: 14px; line-height: 1.5; }
.digest-item.done .di-title { color: var(--text-3); }
.di-mark { font-size: 11.5px; flex: none; }
.di-mark.ok { color: var(--ok); }
.di-mark.danger { color: var(--danger); }
/* ------------------- 业绩台账 ------------------- */
.led-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.led-head .icon-btn.sm { width: 30px; height: 30px; }
.led-head .icon-btn.sm:disabled { opacity: .3; }
.led-month { font-size: 16px; font-weight: 650; }
.led-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-2); overflow: hidden;
}
.led-stats > div {
  padding: 12px 8px; text-align: center;
  border-right: 1px solid var(--line-2);
}
.led-stats > div:last-child { border-right: 0; }
.led-stats b { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.led-stats span { font-size: 11px; color: var(--text-3); font-weight: 600; }
.led-missing {
  margin-top: 12px; padding: 11px 13px; border-radius: var(--r);
  background: rgba(255,59,48,.08); font-size: 13px; line-height: 1.6;
}
.led-missing b { color: var(--danger); }
.led-missing span { color: var(--text-2); }
.led-ok { margin-top: 12px; font-size: 13px; color: var(--ok); }

/* 业绩页的「这天没报」提示 */
.sv-miss {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 14px; padding: 11px 13px;
  border-radius: var(--r); background: rgba(255,149,0,.1);
  font-size: 13px; line-height: 1.55; color: var(--text-2);
}
.svm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; }
/* 设置弹层里的小节标题 */
.sheet-sec-title {
  margin: 20px 0 8px;
  font-size: 12.5px; font-weight: 650; color: var(--text-3);
  letter-spacing: .02em;
}
.sheet-sec-title:first-child { margin-top: 2px; }
/* ------------------- 逾期提醒条（可点，直达逾期列表） ------------------- */
/* 逾期提示条：压成一行、不加解释文字。
   以前是 12px 内边距 + 一句灰色小字 + 关闭按钮，每次进页面都弹一遍，太吵。 */
.overdue-notice {
  display: flex; align-items: center; gap: 8px;
  width: 100%; box-sizing: border-box;
  margin-bottom: 12px; padding: 8px 12px;
  border: 1px solid rgba(255,59,48,.22); border-radius: var(--r);
  background: rgba(255,59,48,.06);
  font-family: inherit; font-size: 13px; color: var(--text);
  text-align: left; cursor: pointer; line-height: 1.3;
  transition: background .14s;
}
.overdue-notice:hover { background: rgba(255,59,48,.11); }
.on-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); flex: none; }
.on-text { flex: 1; min-width: 0; }
.on-text b { color: var(--danger); font-weight: 650; }
.on-go { flex: none; color: var(--danger); font-weight: 600; font-size: 12.5px; opacity: .9; }

/* 可点的 toast */
.toast { display: flex; align-items: center; gap: 10px; }
.toast-act {
  flex: none; border: 0; cursor: pointer;
  background: rgba(255,255,255,.22); color: inherit;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 7px;
}
.toast-act:hover { background: rgba(255,255,255,.34); }
.toast.warn { background: #b7791f; }

/* 「最近小结」里今天那条给个标记 */
.note-item.today { background: var(--accent-soft); }

/* 今日页底部：小结已写 */
.board-foot.done { color: var(--text-3); }
/* ------------------- 任务行的「负责人」 -------------------
   固定在右侧，一眼看出这活归谁。窄屏只留头像（名字进 title）。 */
.asg {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px; color: var(--text-2);
  max-width: 96px;
}
.asg.me { background: transparent; color: var(--text-3); padding-right: 4px; }
.asg.none {
  padding: 3px 8px; background: transparent;
  border: 1px dashed var(--line-3); color: var(--text-3); font-size: 11.5px;
}
.asg .mini-avatar {
  flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-weight: 700; color: #fff;
  object-fit: cover;
}
.asg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 今日页的看板行：负责人居中在行尾，和推迟按钮并排 */
.bd-row .asg { align-self: center; margin-top: 0; }

/* 极窄屏：只留头像，省出标题宽度 */
@media (max-width: 430px) {
  .asg { max-width: 40px; padding-right: 4px; }
  .asg-name { display: none; }
  .asg.none { display: none; }   /* 「未指派」在窄屏不占位，点进去能看到 */
}
.asg .mini-avatar { flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; color: #fff; object-fit: cover; }
.asg img.mini-avatar { display: block; }

/* ------------------- 收集箱入口（今日页右上角） -------------------
   低调的文字按钮：不描边、不填色，别跟问好抢视线。有东西时数字才亮。 */
.ih-btn {
  flex: none; display: inline-flex; align-items: baseline; gap: 5px;
  padding: 4px 8px; margin: -4px -8px 0 0;
  border: 0; background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 550;
  color: var(--text-3); cursor: pointer;
  border-radius: 8px; transition: color .14s, background .14s;
}
.ih-btn:hover { color: var(--text); background: var(--hover); }
.ih-btn.has { color: var(--text-2); }
.ih-n {
  font-size: 12.5px; font-weight: 650;
  color: var(--accent); font-variant-numeric: tabular-nums;
}

/* 收集箱里的「安排」按钮 */
.ib-when {
  flex: none; align-self: center;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: transparent;
  font-family: inherit; font-size: 12.5px; font-weight: 550; color: var(--accent);
  cursor: pointer;
}
.ib-when:hover { background: var(--accent-soft); border-color: transparent; }
@media (max-width: 430px) { .ib-when span { display: none; } }

/* ------------------- 我的小结：条目可点 + 看那一天的弹层 ------------------- */
.note-item { position: relative; padding-right: 34px; }
.note-item .nt-go {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: inline-flex; color: var(--text-3);
}
.note-item:hover .nt-go { color: var(--accent); }

.lv-who {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-3); margin-bottom: 6px;
}
.lv-who .mini-avatar { width: 20px; height: 20px; }
.lv-sec { margin-top: 4px; }
.lv-sec + .lv-sec { margin-top: 18px; }
/* ------------------- 提醒按钮 + 确认提醒弹层 ------------------- */
.t-remind { opacity: 0; transition: opacity .14s, color .14s; color: var(--warn); }
.task:hover .t-remind, .bd-row:hover .t-remind { opacity: 1; }
@media (max-width: 700px) { .t-remind { opacity: .55; } }

.rm-to { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.rm-to .mini-avatar { flex: none; }
.rm-name { font-size: 15px; font-weight: 650; }
.rm-task {
  padding: 13px 14px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line);
}
.rm-title { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
/* ------------------- 任务拖拽改期 ------------------- */
.drag-wrap[draggable="true"] { cursor: grab; }
.drag-wrap.dragging { opacity: .4; }
.drag-wrap.dragging .bd-row { background: var(--accent-soft); }

/* 可投放区域：拖动时才显形，平时别打扰 */
[data-drop].drag-over {
  background: var(--accent-soft);
  border-radius: var(--r);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}
.tp-hint { font-size: 12px; color: var(--text-3); }
body.dragging .tp-hint { color: var(--accent); font-weight: 550; }
/* ------------------- 个人业绩 ------------------- */
.sv-personal {
  display: inline-block; margin-top: 6px; padding: 3px 9px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 600;
}
.pb-row {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; border-top: 1px solid var(--line-3);
}
.pb-row:first-child { border-top: 0; }
.pb-row.me { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.pb-row .mini-avatar { flex: none; width: 30px; height: 30px; font-size: 12px; }
.pb-mid { flex: 1; min-width: 0; }
.pb-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pb-you {
  font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.pb-bar {
  height: 4px; border-radius: 999px; margin-top: 7px; overflow: hidden;
  background: var(--line-2);
}
.pb-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pb-right { flex: none; text-align: right; }
.pb-amt { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
/* ------------------- 每人每天一条：台账与必填标记 ------------------- */
.log-field > span .req, .field > span .req {
  margin-left: 6px; font-style: normal; font-size: 11px; font-weight: 600;
  padding: 1px 5px; border-radius: 4px;
  background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger);
}
.sv-who { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-row-day { border-bottom: 0; padding-bottom: 4px; }
.led-who-line { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px 52px; }
.led-who {
  font-size: 11.5px; color: var(--text-2);
  padding: 2px 7px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line-3);
}
/* ------------------- 阿策助理入口 ------------------- */
.ai-btn { color: var(--accent); }

/* 今日页的问好下面一条：独立一行，点一下就去对话 */
.ai-entry {
  display: flex; align-items: center; gap: 9px; width: 100%;
  margin: 12px 0 14px; padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--r);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  font-family: inherit; text-align: left; cursor: pointer;
  transition: background .14s, border-color .14s;
}
.ai-entry:hover { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.ai-entry .ae-ic { display: inline-flex; color: var(--accent); flex: none; }
.ai-entry .ae-t { font-size: 13.5px; font-weight: 650; color: var(--text); flex: none; }
.ai-entry .ae-s {
  font-size: 12px; color: var(--text-3); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 390px) { .ai-entry .ae-s { display: none; } }
/* 拖拽排序：落点插入线（3px 蓝线 + 小圆点，看得清但不吵） */
.drag-wrap.drop-before { box-shadow: inset 0 3px 0 -1px var(--accent); }
.drag-wrap.drop-after  { box-shadow: inset 0 -3px 0 -1px var(--accent); }
.drag-wrap.drop-before::before,
.drag-wrap.drop-after::after {
  content: ''; position: absolute; left: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
}
.drag-wrap.drop-before::before { top: -3.5px; }
.drag-wrap.drop-after::after   { bottom: -3.5px; }
.drag-wrap { position: relative; }
/* ------------------- 任务行右侧图标对齐 -------------------
   铃铛、垃圾桶、往后推三个图标必须同宽同高、同一条线。
   以前它们各自受 .icon-btn 的 36px 尺寸影响，宽窄不一，排起来参差。 */
.task > .icon-btn,
.task > .t-remind,
.task > .t-del,
.task > .t-postpone {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.task > .t-remind { color: var(--warn); }
.task > .t-del { color: var(--text-3); }
.task > .t-postpone { color: var(--accent); }
.task:hover > .t-del { color: var(--danger); }
/* 右侧一组图标贴在一起，别被 gap 撑散 */
.task .t-actions { display: inline-flex; align-items: center; gap: 2px; flex: none; }

/* 逾期条右侧的「去提醒 ›」：文字 + 箭头，整体可点 */
.on-go { display: inline-flex; align-items: center; gap: 2px; }
.on-go .ic { display: block; }
/* 「全员」概览上方的说明行 */
.ov-head { margin: 0 0 8px 2px; }
/* 「全员」按人分组的折叠条目：默认收起，避免和下面的清单重复列出同一批任务 */
.ov-person {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); margin-bottom: 10px; overflow: hidden;
}
.ov-person > summary {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; cursor: pointer; list-style: none;
  font-size: 14px;
}
.ov-person > summary::-webkit-details-marker { display: none; }
.ov-person > summary::after {
  content: ''; flex: none; width: 7px; height: 7px; margin-left: 4px;
  border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3);
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .16s;
}
.ov-person[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.ov-person[open] > summary { border-bottom: 1px solid var(--line-3); }
.ov-person > summary .mini-avatar { flex: none; }
.ov-person > summary:hover { background: var(--hover); }
/* 「今天」按钮：绝不被压缩（压扁就点不准），字号收一点省空间 */
.tdn-today { flex: none; }
/* ------------------- 窄屏顶栏：给日期腾地方 -------------------
   iPhone 的触控目标是 44px，但顶栏塞了 5 个元素（日期、阿策、通知、搜索、⋯、头像），
   412px 宽根本放不下 —— 日期被挤成「周…」。
   所以窄屏把图标按钮收到 32px、间距收到 0，
   省下来的 ~30px 正好让日期完整显示。手感上 32px 仍然够点。 */
@media (max-width: 480px) {
  .topbar { gap: 4px; padding-left: 10px; padding-right: 8px; }
  .topbar-right { gap: 0; }
  .topbar-right .icon-btn,
  .topbar-right .avatar-btn { width: 32px; height: 32px; border-radius: 9px; }
  .topbar-right .icon-btn .ic { width: 18px; height: 18px; }
  .topbar-datenav { margin-left: -8px; overflow: visible; }
  .topbar-datenav .icon-btn.sm { width: 26px; height: 26px; }
  .tdn-date { font-size: 15px; gap: 4px; padding: 0; flex: none; }
  .tdn-today { padding: 3px 6px; font-size: 11.5px; }
}
/* ------------------- Quick Add 实时预览 -------------------
   打一句话，下面立刻告诉你：标题会是什么、哪天、几点、什么优先级。
   每个标签都能点开手改 —— 这就是「解析」和「猜」的区别。 */
.qa-preview { padding: 2px 0 2px; }
.qa-tip { font-size: 12.5px; color: var(--text-3); padding: 2px 2px 0; line-height: 1.5; }
.qa-tip b { color: var(--text-2); font-weight: 600; }
.qa-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qa-title {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qa-chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background: var(--accent-soft); color: var(--accent);
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .14s;
}
.qa-chip:hover { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.qa-chip i { font-style: normal; font-weight: 500; opacity: .8; }
.qa-chip.dim { border-color: var(--line); background: var(--surface-2); color: var(--text-3); font-weight: 500; }
.qa-chip.warn { border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--warn); }
.qa-chip.danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.qa-clear {
  flex: none; width: 20px; height: 20px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-3); cursor: pointer; font-size: 11px;
}
.qa-clear:hover { background: var(--hover); color: var(--text); }
.qa-why { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
/* 「我的账号」里的 App 下载块 */
.acc-app {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.aa-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; margin-bottom: 5px; }
.aa-title .ic { color: var(--accent); }
.aa-sub { font-size: 12.5px; color: var(--text-3); line-height: 1.55; margin-bottom: 11px; }
.aa-tip { font-size: 11.5px; color: var(--text-3); line-height: 1.55; margin-top: 8px; }
/* ------------------- 任务上的「几点」 -------------------
   有明确时间的任务，时间必须一眼看到 ——
   以前 dueTime 压根没渲染，「13:00 把方案发群里」在页面上看不出时间。 */
.bd-mark.time {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--accent); font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.bd-mark.time .ic { flex: none; }
.t-time {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 4px; color: var(--accent); font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.t-tag.danger .t-time { color: inherit; }

/* =============== 提交成功的仪式感 ===============

   小结和业绩提交完，只是数字变了一下 —— 人不知道到底交上去没有，
   也没有「这件事完成了」的那一下确认感。

   这里给一个短促的反馈：打勾弹一下、数字亮一下、横幅滑进来。
   全程 0.3-0.6 秒，不挡住接下来的操作，也不长时间占地方。 */
.submit-flash {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px; margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line));
  border-radius: var(--r);
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
  animation: sf-in .34s cubic-bezier(.22,1.2,.36,1) both;
}
@keyframes sf-in {
  from { opacity: 0; transform: translateY(-7px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.sf-check {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok); color: #fff;
  animation: sf-pop .42s cubic-bezier(.2,1.5,.4,1) .06s both;
}
@keyframes sf-pop {
  0%   { transform: scale(.2); opacity: 0; }
  60%  { transform: scale(1.16); opacity: 1; }
  100% { transform: scale(1); }
}
.sf-body { flex: 1; min-width: 0; }
.sf-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.sf-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.sf-close {
  flex: none; width: 26px; height: 26px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-3); cursor: pointer;
  display: grid; place-items: center;
}
.sf-close:hover { background: var(--hover); color: var(--text); }

/* 刚提交的金额：亮一下再落回原位 */
.sv-amount.just {
  animation: amt-pop .6s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes amt-pop {
  0%   { transform: scale(.9); color: var(--ok); }
  45%  { transform: scale(1.07); color: var(--ok); }
  100% { transform: scale(1); color: var(--text); }
}

/* 小结的条目也轻轻亮一下，让人看到「这就是我刚交的」 */
.log-view li.just { animation: li-flash 1.1s ease-out both; }
@keyframes li-flash {
  0%   { background: color-mix(in srgb, var(--ok) 16%, transparent); }
  100% { background: transparent; }
}
/* 业绩卡：全店总数下面列「谁报的、各报多少」 */
.sv-totalnote {
  font-size: 12.5px; color: var(--text-3); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.sv-people {
  margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px;
}
.svp-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 0; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.svp-row:last-child { border-bottom: 0; }
.svp-row.me { font-weight: 600; }
.svp-name { color: var(--text); flex: none; }
.svp-amt { color: var(--text-2); font-variant-numeric: tabular-nums; }
.svp-note {
  color: var(--text-3); font-size: 12px; flex: 1 1 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 我自己还没报时，那个小填写框 */
.sv-mine-box {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.smb-title { font-size: 13px; font-weight: 650; color: var(--text-2); }
/* =============== 小结「已提交」的状态面板 ===============

   提交完这块就顶在最上面，占一整块 —— 交没交一眼有答案。
   下面是提交的内容，输入栏一个不留。 */
.log-done {
  margin: 16px 0 20px;
  padding: 22px 18px 18px;
  border-radius: var(--r);
  border: 1px solid color-mix(in srgb, var(--ok) 26%, var(--line));
  background: color-mix(in srgb, var(--ok) 6%, var(--surface));
  text-align: center;
}
/* 刚提交那一次：面板轻轻亮一下再落定 */
.log-done.just { animation: ld-glow 1.4s ease-out both; }
@keyframes ld-glow {
  0%   { background: color-mix(in srgb, var(--ok) 22%, var(--surface)); transform: scale(1.012); }
  100% { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); transform: none; }
}
.ld-ring {
  width: 50px; height: 50px; margin: 0 auto 12px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--ok); color: #fff;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--ok) 34%, transparent);
}
.log-done.just .ld-ring { animation: sf-pop .5s cubic-bezier(.2,1.5,.4,1) .05s both; }
.ld-title { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.ld-sub { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.ld-acts { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
/* =============== 小结里「自动带出的已完成待办」===============

   今天在「今天」页勾掉的待办，自动出现在这里 —— 不用重打一遍。
   样式上做成**只读的列表**（没有输入框、没有删除按钮），
   好跟下面「另外还做了什么」那些可编辑的行区分开。 */
.log-auto {
  margin: 2px 0 12px;
  padding: 10px 13px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--ok) 7%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--ok) 18%, var(--line));
}
.log-auto.view { margin: 4px 0 14px; }
.log-auto.just { animation: li-flash 1.4s ease-out both; }
.la-head {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 12px; font-weight: 650; color: var(--ok);
  margin-bottom: 7px;
}
.la-head .ic { flex: none; }
.la-tip { font-weight: 500; color: var(--text-3); margin-left: auto; }
.la-item {
  position: relative;
  padding: 4px 0 4px 16px;
  font-size: 14px; line-height: 1.5; color: var(--text);
}
.la-item::before {
  content: ''; position: absolute; left: 2px; top: 12px;
  width: 5px; height: 5px; border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 60%, var(--text-3));
}
.log-subtip {
  font-style: normal; font-weight: 500; font-size: 12px;
  color: var(--text-3); margin-left: 7px;
}
/* =============== 完成待办的确认弹窗 ===============

   勾选前停一下。备注和照片都不必填 ——
   大多数人就是打个勾，不该逼他们写东西。 */
.done-task {
  font-size: 16px; font-weight: 650; line-height: 1.45; color: var(--text);
  padding-bottom: 2px;
}
.done-meta { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.field > span .opt {
  font-style: normal; font-weight: 500; font-size: 11.5px;
  color: var(--text-3); margin-left: 7px;
  padding: 1px 6px; border-radius: 999px; background: var(--surface-2);
}
.done-photo-box {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; margin-top: 2px;
  border: 1px dashed var(--line-2); border-radius: var(--r);
  background: var(--surface-2);
}
.done-photo-box.ok {
  border-style: solid;
  border-color: color-mix(in srgb, var(--ok) 34%, var(--line));
  background: color-mix(in srgb, var(--ok) 7%, var(--surface));
}
.dpb-icon {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--text-3);
}
.done-photo-box.ok .dpb-icon { background: var(--ok); color: #fff; }
.dpb-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
/* 待办详情里「完成时的留证」 */
.task-evidence {
  padding: 11px 13px; border-radius: var(--r);
  background: color-mix(in srgb, var(--ok) 6%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--ok) 20%, var(--line));
}
.te-note { font-size: 13.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.te-photo {
  display: block; width: 100%; max-height: 260px; object-fit: cover;
  border-radius: 9px; margin-top: 9px; cursor: zoom-in;
  background: var(--surface);
}
.te-time { font-size: 11.5px; color: var(--text-3); margin-top: 7px; }
/* =============== 系统提醒诊断 =============== */
.kv .v.good { color: var(--ok); font-weight: 600; }
.kv .v.bad  { color: var(--danger); font-weight: 600; }
.nd-empty {
  padding: 14px 13px; font-size: 13px; color: var(--text-3); text-align: center;
}
.aa-ver {
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  margin-left: 7px; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2);
}
/* 诊断页：未开电池白名单时的提醒点 */
.warn-dot { color: var(--warning, #F5A524); display: grid; place-items: center; }
/* =============== 派活确认弹窗 ===============

   @ 提到人之后，急不急和哪天都得选，点「确定指派」才真正派出去。
   以前点一下「加急」就直接建了任务、日期是空的 → 掉进收集箱。 */
.ap-task {
  font-size: 16px; font-weight: 650; line-height: 1.45;
  padding: 11px 13px; border-radius: var(--r);
  background: var(--surface-2); margin-bottom: 4px;
}
.field > span .req {
  font-style: normal; font-weight: 500; font-size: 11.5px;
  color: var(--danger); margin-left: 7px;
}
.ap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ap-opt {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 8px; border-radius: var(--r); cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--surface);
  color: var(--text); font-size: 14px; font-weight: 600;
  transition: border-color .12s, background .12s;
}
.ap-opt em { font-style: normal; font-size: 11px; font-weight: 400; color: var(--text-3); }
.ap-opt.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}
.ap-opt.on.urgent {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
}
.ap-opt.on.urgent em { color: color-mix(in srgb, var(--danger) 70%, var(--text-3)); }
.ap-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ap-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); font-size: 13.5px; font-weight: 550;
}
.ap-chip.on {
  border-color: var(--accent); background: var(--accent); color: #fff;
}
.ap-date-line {
  display: flex; align-items: center; gap: 6px;
  margin-top: 9px; font-size: 12.5px; color: var(--text-2);
}
.ap-link {
  margin-left: auto; background: none; border: none; padding: 2px 4px;
  color: var(--accent); font-size: 12.5px; cursor: pointer; font-weight: 550;
}

/* V1.8: calmer hierarchy, readable responsibility, accessible mobile controls. */
:root { --accent:#2463d5; --accent-soft:#edf3ff; --bg:#f5f6f8; --text:#20252b; --text-2:#626a75; --text-3:#727982; --danger:#bf3933; --danger-soft:#fff1ef; --ok:#247448; --r:12px; --r-lg:16px; --topbar-h:100px; --tabbar-h:68px; }
html[data-theme="dark"] { --accent:#78a9ff; --accent-soft:#1b2b46; --bg:#111315; --surface:#1b1e22; --surface-2:#25292e; --text:#f2f4f6; --text-2:#bac1c9; --text-3:#a0a9b4; --line:#363c44; --line-2:#30363d; --danger:#ff958e; --danger-soft:#382221; --ok:#83cf9f; }
body { line-height:1.6; }
button { touch-action:manipulation; }
button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--accent);outline-offset:3px; }
.btn,.btn.sm,.icon-btn,.scope-opt,.menu button { min-height:44px; }
.icon-btn { width:44px;height:44px;min-width:44px;flex:none; }
.btn { font-size:14px;border-radius:12px;padding:10px 15px; }
.btn.primary { color:#fff;background:#2463d5;border-color:#2463d5; }
.field input,.field select,.field textarea,.input,select.input,textarea.input { font-size:16px;min-height:46px; }
.field > span { font-size:14px; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.topbar { min-height:100px;height:auto;flex-wrap:wrap;align-content:center;gap:2px 8px;padding:calc(8px + var(--safe-t)) 20px 9px;background:color-mix(in srgb,var(--bg) 96%,transparent); }
.topbar-left h1 { font-size:23px;letter-spacing:-.025em;line-height:1.3; }
.topbar-left #viewSub { font-size:12px;line-height:1.5; }
.topbar-right { gap:0; }
.content { padding:20px 20px calc(var(--tabbar-h) + var(--safe-b) + 32px);max-width:1100px; }
.sidebar { background:var(--surface);padding:24px 14px; }
.sidebar-brand { padding-bottom:24px; }
.nav-item { min-height:44px;margin:1px 0;font-size:14px; }
.card { border:1px solid var(--line);box-shadow:none; }
.card-head { padding:16px;flex-wrap:wrap;gap:8px; }
.card-body { padding:16px; }
.card-body.flush { padding:0; }
.card-head h3 { font-size:16px; }
.tabbar { padding:5px 10px var(--safe-b);box-shadow:0 -2px 12px #00000003; }
.tab-item { font-size:11px;gap:3px;color:var(--text-2); }
.tab-item.active .ti { background:var(--accent-soft);border-radius:10px;padding:4px 14px; }
.tab-item .ti { display:grid;place-items:center;min-height:30px; }
.fab { box-shadow:0 4px 14px #2463d52b; }
.board { max-width:820px;margin:auto; }
.board-head { margin:0 0 18px;gap:12px;align-items:flex-start; }
.board .bh-sub { font-size:17px;line-height:1.55;color:var(--text); }
.board .bh-sub b { font-weight:700;color:var(--text); }
.board .ih-btn { min-height:44px;font-size:13px;white-space:nowrap; }
.today-shortcuts { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:20px; }
.today-shortcuts button { display:flex;align-items:center;gap:9px;text-align:left;min-height:76px;padding:14px 12px;background:var(--surface);border:1px solid var(--line);border-radius:14px;color:var(--accent); }
.today-shortcuts button>span { display:flex;flex-direction:column;gap:1px;flex:1;min-width:0;color:var(--text-2);font-size:11px; }
.today-shortcuts b { color:var(--text);font-size:14px;font-weight:600; }
.board-add { margin:0 0 8px;gap:8px;align-items:stretch; }
.board-add .ba-field { border:1px solid var(--line);border-radius:12px;background:var(--surface);min-width:0; }
.board-add input { font-size:15px;padding:13px 12px;min-height:48px; }
.board-add .btn { flex:none;font-size:13px; }
.board-section-heading { display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:22px 0 12px; }
.board-section-heading h2 { font-size:18px;font-weight:650; }
.board-section-heading>span { font-size:12px;color:var(--text-2); }
.board-list { border:1px solid var(--line);border-radius:16px;box-shadow:none;background:var(--surface);overflow:hidden; }
.board .bd-row { padding:14px 12px 12px 4px;gap:8px;align-items:flex-start;border-bottom:1px solid var(--line-2); }
.board .bd-row:last-child { border-bottom:0; }
.board .bd-title { font-size:16px;line-height:1.55;font-weight:570;letter-spacing:0;overflow-wrap:anywhere; }
.bd-check,.task .check { width:44px;height:44px;min-width:44px;min-height:44px;flex:none;position:relative;border:0;background:transparent;color:transparent;box-shadow:none;margin:0; }
.bd-check::before,.task .check::before { content:'';position:absolute;inset:11px;border:1.7px solid var(--line-3);border-radius:50%;background:var(--surface); }
.bd-row.done .bd-check::before,.task.done .check::before { background:var(--accent);border-color:var(--accent); }
.bd-row.done .bd-check::after,.task.done .check::after { content:'✓';position:absolute;inset:8px;color:#fff;text-align:center;font-size:16px;line-height:28px; }
.bd-body { padding-top:8px;min-width:0; }
.bd-marks { gap:8px;flex-wrap:wrap;margin:4px 0 0; }
.bd-mark.mgr { color:var(--text-2);background:transparent;font-weight:450; }
.bd-mark.urgent { color:var(--danger);background:var(--danger-soft); }
.bd-responsibility { display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:3px; }
.bd-responsibility .asg,.t-meta .asg { max-width:none;padding:0;background:transparent;border:0;font-size:12px;color:var(--text-2); }
.asg-name { display:inline;max-width:110px; }
.asg.none { display:inline-flex; }
.task-discuss-link { display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:6px 3px;background:none;border:0;color:var(--accent);font-size:12px;white-space:normal; }
.discussion-badge { color:var(--accent);font-size:11px;font-weight:650;margin-left:4px; }
.bd-postpone { width:44px;height:44px;min-width:44px;align-self:center; }
.board .t-remind { align-self:center; }
.board-over { border:1px solid var(--line);background:var(--surface);border-radius:16px;margin-top:18px;overflow:hidden; }
.bo-head { font-size:14px;font-weight:650;color:var(--danger);background:var(--danger-soft);padding:13px 16px; }
.bo-tip { padding:12px 16px;font-size:12px; }
.bd-donefold summary { padding:14px 16px;font-size:13px;min-height:48px; }
.bd-empty { padding:28px 18px;font-size:15px;line-height:1.7; }
.today-checklist-link { display:flex;align-items:center;gap:10px;width:100%;min-height:56px;padding:12px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);margin:16px 0;color:var(--text);text-align:left; }
.today-checklist-link b { margin-left:auto;font-size:13px;font-weight:500;color:var(--text-2); }
.board-foot { min-height:52px;font-size:14px;text-align:left;width:100%;padding:12px 16px;margin:16px 0;border-radius:14px;background:var(--surface);border:1px solid var(--line); }
.task { padding:13px 12px 13px 4px;gap:8px; }
.task .t-main { padding-top:8px; }
.task .t-title { font-size:16px;line-height:1.55;overflow-wrap:anywhere; }
.task .t-notes { font-size:13px;line-height:1.6; }
.t-meta { gap:8px; }
.team-collaboration-intro { padding:4px 0 22px; }
.team-collaboration-intro h2 { font-size:22px;line-height:1.4; }
.team-collaboration-intro p { color:var(--text-2);font-size:14px;margin:6px 0 15px; }
.team-collaboration-intro .btn { white-space:normal;text-align:left; }
#discussionInboxCount { font-size:12px;color:var(--text-2);font-weight:450; }
.member-row { min-height:70px; }
.member-name { font-size:15px; }
.member-sub { font-size:12px; }
.board-peek { font-size:12px; }
.sheet { bottom:var(--keyboard-inset,0px);max-height:calc(var(--visual-vh,100dvh) - 12px);border-radius:22px 22px 0 0; }
.sheet-head { padding:12px 18px;min-height:66px;flex:none; }
.sheet-head h2 { font-size:18px; }
.sheet-body { min-height:0;padding:20px 20px calc(24px + var(--safe-b));scroll-padding-bottom:90px;overscroll-behavior:contain; }
.sheet-actions { flex-wrap:wrap;padding-bottom:4px; }
.sheet-actions .btn { min-width:90px; }
.task-detail-summary h3 { font-size:21px;line-height:1.5;margin:8px 0 12px;overflow-wrap:anywhere; }
.task-detail-status { display:flex;gap:8px;color:var(--text-2);font-size:12px; }
.task-detail-status span { background:var(--surface-2);padding:3px 8px;border-radius:7px; }
.task-detail-status .danger { color:var(--danger);background:var(--danger-soft); }
.task-detail-people { display:flex;flex-wrap:wrap;gap:6px 16px;color:var(--text-2);font-size:13px;margin-bottom:7px; }
.task-detail-people span,.task-detail-date { display:flex;align-items:center;gap:5px; }
.task-detail-date { font-size:13px;color:var(--text-2); }
.task-detail-notes { white-space:pre-wrap;font-size:15px;line-height:1.7;margin:16px 0;padding:14px;border-radius:12px;background:var(--surface-2);overflow-wrap:anywhere; }
.task-detail-actions { display:flex;gap:10px;margin:18px 0 24px; }
.task-detail-actions .btn { flex:1; }
.task-discussion { padding-top:22px;border-top:1px solid var(--line); }
.discussion-heading { display:flex;align-items:baseline;justify-content:space-between;gap:10px; }
.discussion-heading h3 { font-size:18px; }
.discussion-heading span,.discussion-intro { font-size:12px;color:var(--text-2); }
.discussion-intro { margin:6px 0 18px;line-height:1.7; }
.discussion-empty { padding:24px 16px;background:var(--surface-2);border-radius:12px;font-size:14px;color:var(--text-2); }
.discussion-message { margin:0 0 14px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface); }
.discussion-message.mine { background:var(--accent-soft);border-color:transparent; }
.discussion-message-meta { display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:8px; }
.discussion-message-meta strong { font-weight:600; }
.discussion-message-meta time { color:var(--text-2);font-size:11px;white-space:nowrap; }
.discussion-message p { white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.7; }
.discussion-quote { padding:8px 10px;margin-bottom:10px;border-left:2px solid var(--line-3);color:var(--text-2);font-size:12px;background:color-mix(in srgb,var(--surface) 65%,transparent);border-radius:0 7px 7px 0; }
.discussion-reply-btn { border:0;background:none;color:var(--accent);padding:8px 0;min-height:44px;font-size:12px; }
.discussion-message-images { display:flex;gap:8px;flex-wrap:wrap;margin-top:8px; }
.discussion-message-images a { display:block;max-width:100%; }
.discussion-message-images img { width:100%;max-width:220px;max-height:260px;object-fit:contain;border-radius:9px;background:var(--surface-2); }
.discussion-compose { margin-top:22px;padding-top:16px;border-top:1px solid var(--line); }
.discussion-compose textarea { min-height:104px;max-height:240px;resize:vertical; }
.discussion-compose-actions { display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:8px 0; }
.discussion-compose-actions>span { margin-left:auto;font-size:11px; }
.discussion-previews { display:flex;gap:10px;margin-top:10px; }
.discussion-previews>div { position:relative;width:80px;height:80px; }
.discussion-previews img { width:80px;height:80px;object-fit:cover;border-radius:9px; }
.discussion-previews button { position:absolute;right:-7px;top:-7px;background:var(--surface);border:1px solid var(--line);width:32px;height:32px;min-height:32px; }
.discussion-replying { display:flex;align-items:center;justify-content:space-between;font-size:13px;color:var(--text-2);padding:4px 8px;background:var(--surface-2);border-radius:9px;margin-bottom:8px; }
.discussion-history { width:100%;margin-bottom:12px; }
.inline-error { color:var(--danger);font-size:13px;padding:12px;border:1px solid var(--danger);border-radius:12px;margin:12px 0; }
.notes-layout textarea#noteBody { font-family:inherit!important;font-size:16px!important;line-height:1.8!important;min-height:300px!important; }
#menu.app-launcher { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(420px,calc(100vw - 24px));max-height:calc(var(--visual-vh,100dvh) - 124px);overflow-y:auto;padding:12px;gap:4px;left:auto!important;right:12px;top:110px!important;border-radius:18px; }
#menu.app-launcher .menu-label,#menu.app-launcher hr { grid-column:1 / -1; }
#menu.app-launcher .menu-label { padding-top:12px;font-size:12px; }
#menu.app-launcher button { align-items:center;font-size:13px;padding:10px;min-height:50px; }
#menu.app-launcher .mi-text i { display:block;font-size:11px;line-height:1.5; }
.keyboard-open .tabbar,.keyboard-open .fab { visibility:hidden; }
@media(max-width:899px) { .topbar .ai-btn,.topbar #btnMe { display:none!important; } .topbar-right .icon-btn { width:44px;height:44px; } .topbar-left { flex:1; } .notes-layout.split { grid-template-columns:1fr; } .board-peek { max-width:72px;text-align:right; } }
@media(max-width:430px) { .asg { max-width:none; } .asg-name,.asg.none { display:inline-flex; } .content { padding-left:16px;padding-right:16px; } .topbar { padding-left:16px;padding-right:12px; } .today-shortcuts { gap:8px; } .today-shortcuts button { padding:12px 10px; } .today-shortcuts button>.ic:last-child { display:none; } .board .bd-title { font-size:16px; } .card-head .sub { flex-basis:100%;margin:0; } .member-row .icon-btn { width:36px; } }
@media(max-width:350px) { .topbar-left h1 { font-size:21px; } .today-shortcuts b { font-size:13px; } .board-add .btn { padding:8px; } .board-add input { font-size:14px; } .task-detail-actions { flex-wrap:wrap; } .discussion-compose-actions>span { order:3;flex-basis:100%;margin-left:0; } }
@media(min-width:900px) { .topbar { min-height:90px;padding-left:30px;padding-right:30px; } .content { padding:28px 30px 64px; } .sheet { width:min(600px,calc(100vw - 260px));top:12px;right:12px;bottom:12px;border-radius:20px;max-height:calc(100dvh - 24px); } .board { max-width:800px; } .today-shortcuts { max-width:600px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important; } }

.bd-row.done .bd-check,.task.done .check{color:transparent}.ap-chip,.ap-opt,.segmented button,.tabs .tab{min-height:44px}.discussion-previews button{width:44px;height:44px;min-height:44px;background:transparent;border:0}.discussion-previews button::before{content:"";position:absolute;inset:8px;background:var(--surface);border-radius:50%;box-shadow:0 1px 4px #0003}.discussion-previews button .ic{position:relative}@media(max-width:899px){.task .t-del{display:none}}

/* Scoped personal memo UI; append after app.css. */
.memo-workspace { --memo-border: var(--line, #e5e5ea); font-size: 16px; line-height: 1.55; width: 100%; min-width: 0; }
.memo-privacy { display: flex; align-items: flex-start; gap: 7px; color: var(--text-2); font-size: 16px; margin: 2px 0 14px; }
.memo-privacy .ic { margin-top: 5px; }
.memo-layout { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; background: var(--surface); border: 1px solid var(--memo-border); border-radius: 16px; overflow: clip; }
.memo-list-pane, .memo-editor, .memo-editor-placeholder { min-width: 0; }
.memo-list-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 20px 16px 12px; }
.memo-list-heading h2 { font-size: 20px; font-weight: 650; }
.memo-count { font-size: 16px; color: var(--text-2); white-space: nowrap; }
.memo-list-tools { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; }
.memo-search { display: flex; flex: 1; min-width: 0; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid transparent; border-radius: 11px; padding: 0 10px; color: var(--text-2); }
.memo-search:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.memo-search input { width: 100%; min-width: 0; min-height: 46px; border: 0; background: transparent; padding: 8px 0; outline: 0; color: var(--text); font-size: 16px; }
.memo-search input::placeholder { color: var(--text-2); opacity: 1; }
.memo-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--memo-border); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 550; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.memo-button:hover { background: var(--surface-2); }
.memo-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.memo-primary:hover { background: var(--accent); filter: brightness(1.04); }
.memo-button:disabled, .memo-folder-tabs button:disabled { opacity: .5; cursor: default; }
.memo-button:focus-visible, .memo-row:focus-visible, .memo-folder-tabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.memo-quiet, .memo-icon { background: transparent; border-color: transparent; color: var(--text-2); }
.memo-icon { padding: 10px; }
.memo-icon.is-on { color: var(--accent); background: var(--accent-soft); }
.memo-folder-tabs { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid var(--memo-border); }
.memo-folder-tabs button { min-height: 44px; border: 0; border-radius: 9px; padding: 8px 10px; background: transparent; color: var(--text-2); font-size: 16px; cursor: pointer; }
.memo-folder-tabs .is-active { color: var(--text); background: var(--surface-2); font-weight: 600; }
.memo-folder-tabs .memo-refresh { margin-left: auto; }
.memo-row { display: block; width: 100%; text-align: left; padding: 17px 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); cursor: pointer; color: var(--text); font-size: 16px; overflow-wrap: anywhere; }
.memo-row:hover { background: var(--hover); }
.memo-row.is-selected { background: var(--accent-soft); }
.memo-row-title { display: flex; align-items: flex-start; gap: 6px; font-size: 17px; font-weight: 650; line-height: 1.5; }
.memo-pin-mark { margin-top: 5px; color: var(--accent); }
.memo-row-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--text-2); margin: 5px 0 8px; font-size: 16px; }
.memo-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--text-2); font-size: 16px; }
.memo-local-mark { color: var(--accent); }
.memo-empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.memo-empty > .ic { margin: 0 auto 14px; color: var(--text-2); }
.memo-empty h3 { font-size: 19px; color: var(--text); margin-bottom: 7px; }
.memo-empty p { font-size: 16px; line-height: 1.65; }
.memo-empty .memo-button { margin-top: 20px; }
.memo-editor-placeholder { display: none; }
.memo-editor { display: none; flex-direction: column; background: var(--surface); }
.memo-workspace.has-editor .memo-list-pane { display: none; }
.memo-workspace.has-editor .memo-editor { display: flex; }
.memo-editor-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px; min-height: 62px; border-bottom: 1px solid var(--line-2); background: var(--surface); position: sticky; top: var(--topbar-h, 54px); z-index: 2; }
.memo-editor-label { margin-left: 3px; font-size: 16px; color: var(--text-2); white-space: nowrap; }
.memo-editor-options { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.memo-toolbar-save { padding-left: 12px; padding-right: 12px; }
.memo-writing { padding: 18px 20px 12px; display: flex; flex: 1; flex-direction: column; min-height: 250px; }
.memo-title-input { font-size: 23px; font-weight: 650; line-height: 1.4; width: 100%; min-height: 46px; background: transparent; border: 0; padding: 2px 0 12px; outline: none; border-radius: 0; }
.memo-body-input { display: block; flex: 1; width: 100%; min-height: 230px; padding: 8px 0; resize: vertical; border: 0; outline: 0; border-radius: 0; background: transparent; font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.memo-title-input::placeholder, .memo-body-input::placeholder { color: var(--text-2); opacity: .8; }
.memo-title-input:focus-visible { box-shadow: 0 1px 0 var(--accent); }
.memo-body-input:focus-visible { box-shadow: -2px 0 0 var(--accent-soft); }
.memo-title-input[readonly], .memo-body-input[readonly] { color: var(--text-2); }
.memo-editor-footer { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px max(16px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-2); background: var(--surface); }
.memo-footer-info { display: grid; gap: 4px; font-size: 16px; color: var(--text-2); }
.memo-footer-actions { display: flex; justify-content: flex-end; align-items: center; gap: 7px; }
.memo-footer-actions .memo-primary { min-width: 90px; }
.memo-loading, .memo-trash-hint, .memo-partial, .memo-deleted-notice { padding: 14px 16px; color: var(--text-2); font-size: 16px; }
.memo-trash-hint, .memo-deleted-notice { background: var(--surface-2); }
.memo-partial { border-top: 1px solid var(--line-2); }
.memo-alert { margin: 12px; padding: 14px; border: 1px solid var(--line-3); border-radius: 10px; background: var(--surface-2); font-size: 16px; overflow-wrap: anywhere; }
.memo-alert strong { display: block; margin-bottom: 5px; color: var(--text); }
.memo-alert p { margin: 4px 0; color: var(--text-2); }
.memo-alert > .memo-button { margin-top: 9px; }
.memo-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.memo-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 420px) {
  .memo-editor-label { display: none; }
  .memo-list-tools { gap: 7px; padding-left: 12px; padding-right: 12px; }
  .memo-list-tools .memo-primary { padding-left: 10px; padding-right: 10px; }
  .memo-writing { padding-left: 16px; padding-right: 16px; }
}
@media (min-width: 900px) {
  .memo-layout { grid-template-columns: minmax(260px, .82fr) minmax(0, 1.35fr); min-height: 560px; align-items: stretch; }
  .memo-list-pane, .memo-workspace.has-editor .memo-list-pane { display: block; border-right: 1px solid var(--memo-border); }
  .memo-list { max-height: 65vh; overflow-y: auto; overscroll-behavior: contain; }
  .memo-editor { display: flex; }
  .memo-editor-placeholder { display: grid; place-items: center; text-align: center; padding: 40px 26px; color: var(--text-2); }
  .memo-editor-placeholder .ic { margin: 0 auto 17px; }
  .memo-editor-placeholder h2 { color: var(--text); font-size: 22px; margin-bottom: 10px; }
  .memo-editor-placeholder p { font-size: 16px; }
  .memo-editor-placeholder .memo-button { margin-top: 24px; }
  .memo-editor-toolbar { position: static; }
  .memo-editor-label { display: none; }
  .memo-writing { padding: 24px 27px 18px; }
  .memo-body-input { min-height: 330px; }
  .memo-editor-footer { padding: 16px 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .memo-workspace *, .memo-workspace *::before, .memo-workspace *::after { scroll-behavior: auto; transition: none; }
}

/* Personal mode shares the workbench shell. Color reinforces, never replaces, labels. */
.pt-workspace { --pt-accent: #7150a4; --pt-soft: #f3eff9; --pt-line: var(--line, #e5e5ea); color: var(--text, #242327); font-size: 16px; line-height: 1.6; min-width: 0; padding-bottom: max(24px, env(safe-area-inset-bottom, 0px)); }
.pt-workspace * { box-sizing: border-box; }
.pt-header { padding: 0 2px 14px; }
.pt-header p { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.pt-header strong { font-size: 20px; font-weight: 650; }
.pt-header span { font-size: 15px; color: var(--text-2, #68636f); }
.pt-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.pt-layout > *, .pt-editor, .pt-list-pane { min-width: 0; }
.pt-editor, .pt-list-pane, .pt-reminder-inbox { background: var(--surface, #fff); border: 1px solid var(--pt-line, #e5e5ea); border-radius: 16px; overflow: clip; }
.pt-editor { border-top: 3px solid var(--pt-accent); padding: 16px; }
.pt-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pt-section-heading h2 { margin: 0; font-size: 17px; font-weight: 650; }
.pt-button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; min-width: 44px; padding: 9px 13px; border: 1px solid var(--pt-line, #e5e5ea); border-radius: 10px; background: var(--surface, #fff); font: inherit; font-size: 15px; line-height: 1.45; color: inherit; cursor: pointer; flex-shrink: 0; }
.pt-primary { background: var(--pt-accent); border-color: var(--pt-accent); color: #fff; font-weight: 600; }
.pt-quiet { background: transparent; border-color: transparent; color: var(--text-2, #68636f); }
.pt-button:disabled, .pt-check:disabled, .pt-presets button:disabled { opacity: .45; cursor: default; }
.pt-workspace button:focus-visible, .pt-workspace input:focus-visible, .pt-workspace textarea:focus-visible, .pt-reminder-banner:focus-visible { outline: 3px solid var(--pt-accent, #7150a4); outline-offset: 2px; }
.pt-title-input { display: block; width: 100%; min-height: 50px; padding: 12px 0 8px; background: transparent; color: inherit; border: 0; border-bottom: 1px solid var(--pt-line); border-radius: 0; font: inherit; font-size: 18px; line-height: 1.5; }
.pt-title-input::placeholder { color: var(--text-2, #777); opacity: 1; font-size: 16px; }
.pt-quick-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin: 3px -8px; }
.pt-quick-options > .pt-hint { margin-right: 8px; }
.pt-hint, .pt-timezone, .pt-draft-status, .pt-footer-note { color: var(--text-2, #68636f); font-size: 15px; line-height: 1.6; }
.pt-timezone { margin: 4px 0 12px; }
.pt-editor-details[hidden] { display: none; }
.pt-time-field { padding: 0; border: 0; min-width: 0; margin: 12px 0 16px; }
.pt-time-field legend, .pt-notes-label { display: block; font-size: 16px; font-weight: 550; margin-bottom: 7px; }
.pt-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.pt-presets button { min-height: 44px; padding: 8px 11px; border: 1px solid var(--pt-line); border-radius: 9px; color: inherit; background: var(--surface-2, #f7f7f9); font: inherit; font-size: 15px; cursor: pointer; }
.pt-time-field input { display: block; width: 100%; min-height: 46px; min-width: 0; padding: 10px 11px; font: inherit; font-size: 16px; color: inherit; background: var(--surface, #fff); border: 1px solid var(--pt-line); border-radius: 9px; }
.pt-editor textarea { display: block; width: 100%; min-width: 0; min-height: 94px; resize: vertical; border: 1px solid var(--pt-line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: var(--surface, #fff); color: inherit; }
.pt-draft-status { min-height: 24px; margin: 10px 0; overflow-wrap: anywhere; }
.pt-editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pt-editor-actions .pt-primary { min-width: 112px; }
.pt-tabs { display: flex; padding: 7px; gap: 3px; background: var(--surface-2, #f7f7f9); border-bottom: 1px solid var(--pt-line); }
.pt-tabs button { display: flex; flex: 1; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 46px; min-width: 0; border: 0; border-radius: 9px; padding: 8px 4px; background: transparent; color: var(--text-2, #68636f); font: inherit; font-size: 15px; cursor: pointer; }
.pt-tabs button span { font-variant-numeric: tabular-nums; }
.pt-tabs button.is-active { background: var(--surface, #fff); color: var(--pt-accent); font-weight: 600; box-shadow: 0 1px 4px #0000000d; }
.pt-list-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 12px; }
.pt-row { display: flex; align-items: flex-start; gap: 7px; padding: 12px 10px; border-top: 1px solid var(--pt-line); }
.pt-row-content { display: block; flex: 1; min-width: 0; padding: 6px 0; text-align: left; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; }
.pt-row-content strong { display: block; font-size: 17px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.pt-row-meta { display: block; color: var(--text-2, #68636f); font-size: 15px; line-height: 1.7; margin-top: 5px; overflow-wrap: anywhere; }
.pt-row-meta em { color: var(--pt-accent); font-style: normal; }
.pt-check { display: grid; place-items: center; padding: 0; width: 44px; height: 44px; flex: 0 0 44px; background: transparent; color: var(--pt-accent); border: 0; cursor: pointer; }
.pt-check > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid var(--pt-accent); border-radius: 50%; font-size: 17px; }
.pt-row.is-completed .pt-check > span { background: var(--pt-accent); color: #fff; }
.pt-row.is-completed .pt-row-content strong { color: var(--text-2, #68636f); text-decoration: line-through; text-decoration-thickness: 1px; }
.pt-row.is-overdue { border-left: 3px solid #ac4b31; padding-left: 7px; }
.pt-overdue { display: inline-block; color: #993b25; background: #fff1e9; border-radius: 4px; padding: 0 5px; font-weight: 600; }
.pt-empty { padding: 26px 18px; text-align: center; color: var(--text-2, #68636f); margin: 0; }
.pt-empty h3 { font-size: 17px; font-weight: 550; color: var(--text, #242327); margin: 0 0 6px; }
.pt-empty p { font-size: 15px; margin: 0; }
.pt-error { margin: 10px 0; padding: 12px; border-radius: 10px; background: #fff3e9; color: #813d24; overflow-wrap: anywhere; font-size: 16px; }
.pt-error .pt-button { margin-top: 8px; display: flex; width: fit-content; }
.pt-list-pane > .pt-error { margin: 8px 12px; }
.pt-pending, .pt-undo { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 14px; margin: 12px 0; background: var(--pt-soft); border-radius: 12px; font-size: 15px; }
.pt-undo { margin: 0 0 14px; }
.pt-more { padding: 10px 14px 16px; text-align: center; }
.pt-more p { margin: 0 0 8px; }
.pt-reminder-inbox { margin-top: 18px; padding: 14px 16px; }
.pt-reminder-inbox > .pt-hint { margin: 7px 0; }
.pt-reminder-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--pt-line); }
.pt-reminder-open { flex: 1; min-width: 0; border: 0; padding: 6px 0; background: transparent; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.pt-reminder-open strong, .pt-reminder-open span { display: block; overflow-wrap: anywhere; }
.pt-reminder-open span { font-size: 15px; color: var(--text-2, #68636f); }
.pt-footer-note { margin: 16px 2px 0; font-size: 14px; }
.pt-reminder-banner { width: 100%; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; margin-bottom: 12px; min-height: 48px; border: 1px solid #d9cbe9; border-radius: 12px; background: #f3eff9; color: #59367f; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.pt-reminder-banner span:last-child { font-size: 14px; }
.pt-today-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 60px; border: 1px solid #d9cbe9; border-radius: 12px; padding: 12px 16px; background: #f3eff9; color: #59367f; font: inherit; text-align: left; }
.pt-today-link strong, .pt-today-link small { display: block; }
.pt-today-link small { font-size: 14px; margin-top: 3px; }
.pt-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (min-width: 1050px) { .pt-layout { grid-template-columns: minmax(300px, .8fr) minmax(380px, 1.2fr); align-items: start; } }
@media (max-width: 400px) { .pt-editor { padding: 13px; } .pt-row { gap: 3px; padding-right: 6px; } .pt-row > .pt-button { padding-left: 7px; padding-right: 7px; } .pt-check { width: 40px; flex-basis: 40px; } .pt-tabs button { gap: 3px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .pt-workspace *, .pt-reminder-banner { scroll-behavior: auto !important; transition: none !important; } }

.today-mode-switch{display:flex;align-items:center;gap:4px;max-width:820px;margin:0 auto 18px;padding:4px;border:1px solid var(--line);border-radius:14px;background:var(--surface);}
.today-mode-switch button{min-height:44px;min-width:86px;border:0;border-radius:10px;color:var(--text-2);background:transparent;font-size:15px;font-weight:600;}
.today-mode-switch button[aria-pressed="true"]{color:var(--accent);background:var(--accent-soft);}
.today-mode-note{margin-left:auto;padding:0 12px;font-size:12px;color:var(--text-2);}
body.personal-mode{--accent:#7056a5;--accent-soft:#f0ebf8;--bg:#f7f5fa;}
body.personal-mode .btn.primary{background:var(--accent);border-color:var(--accent);}
html[data-theme="dark"] body.personal-mode{--accent:#bba2ee;--accent-soft:#30273e;--bg:#17131b;}
html[data-theme="dark"] body.personal-mode .btn.primary{background:#7657a9;border-color:#7657a9;color:#fff;}
#privateTodoReminderRegion:empty{display:none;}
#privateTodoReminderRegion{max-width:1100px;width:100%;margin:0 auto;padding:0 20px;}
@media(max-width:430px){.today-mode-switch button{min-width:78px;}.today-mode-note{padding:0 8px;}#privateTodoReminderRegion{padding:0 16px;}}

/* Expense surfaces. All selectors are scoped; account permissions stay server-owned. */
.expense-workspace { max-width: 980px; margin: 0 auto; padding-bottom: 24px; }
.expense-workspace *, .expense-sheet * { min-width: 0; }
.expense-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 12px 0 18px; }
.expense-eyebrow { display: block; color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: .08em; margin-bottom: 5px; }
.expense-hero h1 { font-size: clamp(24px, 5vw, 30px); line-height: 1.3; letter-spacing: -.03em; }
.expense-hero p { margin-top: 8px; color: var(--text-2); font-size: 14px; }
.expense-primary-actions { display: flex; gap: 8px; flex-shrink: 0; }
.expense-workspace .btn, .expense-sheet .btn { min-height: 44px; font-size: 16px; }
.expense-workspace button, .expense-sheet button, .expense-sheet input, .expense-sheet select { touch-action: manipulation; }
.expense-workspace button:focus-visible, .expense-workspace a:focus-visible, .expense-sheet button:focus-visible, .expense-sheet a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.expense-privacy { font-size: 12px; color: var(--text-2); line-height: 1.6; margin: 0 0 18px; }
.expense-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 13px; padding: 4px; margin: 20px 0; }
.expense-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px; font-size: 16px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer; }
.expense-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 650; }
.expense-tabs button span { background: var(--accent-soft); color: var(--accent); font-size: 11px; padding: 1px 6px; border-radius: 12px; }
.expense-filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.expense-filters::-webkit-scrollbar { display: none; }
.expense-filters button { min-height: 44px; flex: 0 0 auto; padding: 8px 13px; color: var(--text-2); background: transparent; border: 1px solid transparent; border-radius: 12px; font-size: 14px; cursor: pointer; }
.expense-filters button.active { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.expense-cards { display: grid; gap: 12px; }
.expense-card { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.expense-card:hover { border-color: var(--line-3); background: var(--hover); }
.expense-card-top, .expense-card-middle { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.expense-category { font-size: 12px; font-weight: 600; color: var(--text-2); }
.expense-status { flex-shrink: 0; display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 7px; font-size: 11px; font-weight: 650; line-height: 1.3; background: var(--surface-2); color: var(--text-2); }
.expense-status.submitted { background: var(--accent-soft); color: var(--accent); }
.expense-status.approved, .expense-status.booked { background: #e9f4ed; color: #267446; }
.expense-status.rejected { background: #fff0db; color: #865506; }
.expense-status.voided { background: var(--danger-soft); color: var(--danger); }
.expense-status.pending_payment { background: #fff3e0; color: #9a5b00; }
.expense-status.paid { background: #e6f6ef; color: #17704a; }

/* 管账员 */
.expense-accountant-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin: 10px 0 4px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; color: var(--text-2); }
.expense-accountant-row b { color: var(--text); }
.expense-member-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.expense-member-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; }

/* 按申请人分组：审批页和待付款页共用 */
.expense-group { margin-bottom: 18px; }
.expense-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 10px; flex-wrap: wrap; }
.expense-group-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.expense-group-who b { font-size: 15px; }
.expense-group-who span { font-size: 12px; color: var(--text-2); }
.expense-pay-items { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.expense-pay-items li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; font-size: 13.5px; }
.expense-pay-items li + li { border-top: 1px solid var(--line-2); }
.expense-pay-items li span { color: var(--text-2); overflow-wrap: anywhere; }
.expense-pay-items li b { flex: none; font-variant-numeric: tabular-nums; }

/* 批量审批：卡片勾选 + 底部合计条 */
.expense-selectable { flex-direction: row; align-items: flex-start; gap: 12px; }
.expense-selectable .expense-check {
  flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 7px;
  border: 2px solid var(--line); background: var(--surface); color: #fff; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.expense-select-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.expense-selectable.selected { border-color: var(--accent); background: var(--accent-soft); }
.expense-selectable.selected .expense-check { background: var(--accent); border-color: var(--accent); }
.expense-detail-mini { align-self: flex-end; }
.expense-batch-bar {
  position: sticky; bottom: 12px; margin-top: 16px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: space-between;
}
.expense-batch-sum { display: flex; flex-direction: column; gap: 2px; }
.expense-batch-sum span { font-size: 12.5px; color: var(--text-2); }
.expense-batch-sum strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.expense-batch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.expense-pay-card { cursor: default; }
@media (max-width: 899px) {
  .expense-batch-bar { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
.expense-pay-btn { margin-top: 2px; }
.expense-card-middle strong { font-size: 16px; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.expense-card-amount { flex-shrink: 0; font-size: 23px; line-height: 1.4; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.expense-card-amount small { font-size: 14px; font-weight: 500; margin-right: 3px; }
.expense-card-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--text-2); font-size: 12px; }
.expense-return-note { width: 100%; border-top: 1px solid var(--line-2); padding-top: 10px; font-size: 13px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
.expense-empty { padding: 44px 16px; display: flex; align-items: center; flex-direction: column; text-align: center; gap: 12px; color: var(--text-2); }
.expense-empty > svg { color: var(--text-3); }
.expense-empty h3 { color: var(--text); font-size: 17px; }
.expense-empty p { max-width: 340px; font-size: 14px; }
.expense-loading { padding: 48px 16px; color: var(--text-2); text-align: center; font-size: 15px; }
.expense-notice { padding: 13px 15px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; margin: 12px 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.expense-notice strong { display: block; font-size: 14px; margin-bottom: 4px; }
.expense-notice .btn { margin-top: 10px; }
.expense-warning { background: #fff8eb; border-color: #f1e1be; color: #765315; }
.expense-error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.expense-footnote { color: var(--text-2); font-size: 12px; line-height: 1.7; margin: 8px 0 12px; }
.expense-load-more { width: 100%; margin-top: 16px; }
.expense-drafts { display: grid; gap: 8px; margin: 12px 0 18px; }
.expense-drafts button { position: relative; display: flex; flex-direction: column; text-align: left; gap: 4px; width: 100%; min-height: 66px; border: 1px dashed var(--line-3); border-radius: 13px; padding: 11px 38px 11px 14px; background: var(--surface); cursor: pointer; }
.expense-drafts button span { color: var(--accent); font-size: 11px; }
.expense-drafts button strong { max-width: 100%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-drafts button svg { position: absolute; right: 13px; top: 25px; color: var(--text-3); }
.expense-month-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.expense-month-row label { display: flex; flex-direction: column; gap: 7px; color: var(--text-2); font-size: 12px; }
.expense-month-row input { max-width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 16px; background: var(--surface); color: var(--text); }
.expense-summary { padding: 23px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.expense-summary > span { font-size: 13px; color: var(--text-2); }
.expense-summary > strong { font-size: clamp(32px, 8vw, 40px); line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.04em; overflow-wrap: anywhere; }
.expense-summary > strong small { font-size: 20px; padding-right: 6px; font-weight: 500; }
.expense-category-totals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin: 12px 0 25px; }
.expense-category-totals > div { display: flex; flex-direction: column; gap: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.expense-category-totals span, .expense-category-totals small { color: var(--text-2); font-size: 11px; }
.expense-category-totals strong { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.expense-list-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 12px; }
.expense-list-title h2 { font-size: 17px; }
.expense-list-title span { color: var(--text-2); font-size: 12px; }
/* The editor owns the full viewport on phones, with its controls above safe areas. */
.sheet:has(.expense-sheet) { max-height: 100vh; max-height: 100dvh; top: 0; border-radius: 0; }
.sheet:has(.expense-sheet) .sheet-body { flex: 1; min-height: 0; background: var(--bg); padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
.expense-sheet { max-width: 620px; margin: 0 auto; }
.expense-editor-intro { color: var(--text-2); font-size: 14px; margin: 2px 0 18px; }
.expense-form-card { margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 15px; padding: 17px; }
.expense-form-card label, .expense-reason-label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; }
.expense-form-card label + label { margin-top: 19px; }
.expense-form-card input, .expense-form-card select, .expense-form-card textarea, .expense-reason-label textarea { display: block; width: 100%; min-height: 46px; font-size: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); padding: 10px 11px; outline: none; font-weight: 400; }
.expense-form-card textarea, .expense-reason-label textarea { line-height: 1.65; resize: vertical; scroll-margin-bottom: 100px; }
.expense-form-card input:focus, .expense-form-card select:focus, .expense-form-card textarea:focus, .expense-reason-label textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.expense-form-card input:disabled, .expense-form-card select:disabled, .expense-form-card textarea:disabled { opacity: .7; color: var(--text-2); }
.expense-amount-field > div { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.expense-amount-field > div > span { font-size: 28px; }
.expense-amount-field input { font-size: 36px; font-weight: 600; letter-spacing: -.03em; padding: 4px 0; border: 0; border-radius: 0; background: transparent; font-variant-numeric: tabular-nums; }
.expense-amount-field input:focus { box-shadow: none; }
.expense-amount-field > small { color: var(--text-3); font-size: 11px; }
.expense-label-row h3, .expense-detail-receipts h3 { font-size: 14px; }
.expense-label-row small { font-size: 11px; color: var(--text-2); font-weight: 400; margin-left: 6px; }
.expense-receipt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
.expense-receipt { display: flex; flex-direction: column; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.expense-receipt img { display: block; width: 100%; height: 106px; object-fit: contain; background: var(--surface); }
.expense-receipt a { display: block; }
.expense-receipt button, .expense-receipt > span { min-height: 44px; display: flex; justify-content: center; align-items: center; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; font-size: 12px; color: var(--text-2); }
.expense-receipt button { cursor: pointer; }
.expense-add-receipt { width: 100%; margin-top: 5px; }
.expense-image-error { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--danger); font-size: 12px; }
.expense-image-error > span { flex: 1 1 100%; overflow-wrap: anywhere; }
.expense-draft-status { text-align: center; color: var(--text-2); font-size: 11px; margin: 18px 0 10px; }
.expense-sticky-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); z-index: 2; display: flex; gap: 10px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg); }
.expense-sticky-actions .btn { flex: 1; padding-left: 8px; padding-right: 8px; }
.expense-discard { display: block; margin: 10px auto 0; border: 0; background: transparent; color: var(--text-3); font-size: 12px; min-height: 44px; padding: 8px; cursor: pointer; }
.expense-detail-amount { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 15px 0 26px; }
.expense-detail-amount > small { color: var(--text-2); font-size: 12px; }
.expense-detail-amount > strong { font-size: 38px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.04em; overflow-wrap: anywhere; }
.expense-facts { margin: 0 0 18px; padding: 0 15px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; }
.expense-facts > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; font-size: 14px; }
.expense-facts > div + div { border-top: 1px solid var(--line-2); }
.expense-facts dt { flex-shrink: 0; color: var(--text-2); }
.expense-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.expense-purpose { white-space: pre-wrap; overflow-wrap: anywhere; }
.expense-detail-receipts { padding: 14px 0; }
.expense-detail-actions { display: flex; gap: 10px; margin: 18px 0 10px; }
.expense-detail-actions > .btn { flex: 1; white-space: normal; }
.expense-wide { width: 100%; margin-bottom: 10px; }
.expense-void-button { width: 100%; margin: 5px 0 18px; color: var(--danger); }
.expense-reason-label { margin: 20px 0; }
.expense-history { margin: 30px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.expense-history h3 { font-size: 15px; margin-bottom: 20px; }
.expense-history ol { margin: 0; padding: 0; list-style: none; }
.expense-history li { position: relative; margin-left: 4px; padding: 0 0 25px 20px; border-left: 1px solid var(--line-3); }
.expense-history li:last-child { border-left-color: transparent; padding-bottom: 4px; }
.expense-history li:before { content: ''; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-3); }
.expense-history li > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px; }
.expense-history strong { font-size: 13px; }
.expense-history time, .expense-history li > p { color: var(--text-2); font-size: 11px; margin-top: 5px; }
.expense-history p.expense-history-reason { font-size: 13px; padding: 10px; background: var(--surface); border-radius: 8px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.expense-history details { margin-top: 8px; color: var(--text-2); font-size: 12px; }
.expense-history summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.expense-history details p { margin-top: 6px; }
html[data-theme="dark"] .expense-warning, html[data-theme="dark"] .expense-status.rejected { background: #362b1a; border-color: #534128; color: #f0c982; }
html[data-theme="dark"] .expense-status.approved, html[data-theme="dark"] .expense-status.booked { background: #183522; color: #8bd8a7; }
@media (min-width: 900px) {
  .sheet:has(.expense-sheet) { width: min(560px, 100vw); border-radius: 20px 0 0 20px; }
  .expense-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .expense-hero { align-items: stretch; flex-direction: column; gap: 19px; padding-top: 4px; }
  .expense-primary-actions > .btn { flex: 1; }
  .expense-hero h1 { font-size: 27px; }
  .expense-card { padding: 15px; }
  .expense-card-middle { align-items: flex-start; gap: 10px; }
  .expense-card-amount { font-size: 21px; }
  .expense-category-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .expense-category-totals > div { padding: 11px; }
  .expense-month-row { gap: 8px; }
  .expense-month-row .btn { font-size: 14px; }
}
@media (max-width: 350px) {
  .expense-card-middle { flex-direction: column; gap: 4px; }
  .expense-tabs button { padding-inline: 5px; font-size: 14px; }
  .expense-sticky-actions .btn { font-size: 14px; }
  .expense-category-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-form-card { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .expense-card { transition: none; }
  .sheet:has(.expense-sheet) { animation: none; }
}

/* Read-only monthly performance. Mobile first, no horizontal table. */
.sales.sales-performance-page { max-width: 960px; }
.performance-panel { margin-bottom: 24px; }
.performance-heading { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 14px; gap: 12px; }
.performance-heading h2 { font-size: 19px; line-height: 1.4; }
.performance-heading p { margin-top: 5px; font-size: 12px; color: var(--text-2); line-height: 1.6; }
.performance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: stretch; }
.performance-card { min-width: 0; padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.performance-card--personal { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 5%, var(--surface)), var(--surface) 65%); }
.performance-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.performance-card-head > div { min-width: 0; }
.performance-card-head h3 { font-size: 17px; margin-top: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.performance-eyebrow { display: block; color: var(--text-2); font-size: 11px; line-height: 1.5; }
.performance-month { flex-shrink: 0; color: var(--text-2); font-size: 11px; padding-top: 3px; white-space: nowrap; }
.performance-focus { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 21px 0 18px; }
.performance-focus > span { font-size: 12px; color: var(--text-2); }
.performance-focus strong { font-size: clamp(23px, 7vw, 31px); font-weight: 700; letter-spacing: -.025em; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; max-width: 100%; font-variant-numeric: tabular-nums; }
.performance-focus small { color: var(--text-2); font-size: 11px; line-height: 1.5; }
.performance-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 17px 13px; margin: 0; padding: 16px 0; border-top: 1px solid var(--line-2); }
.performance-facts div { min-width: 0; }
.performance-facts dt, .performance-person dt { color: var(--text-2); font-size: 11px; line-height: 1.5; }
.performance-facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.performance-gap--behind dd { color: #936435; }
.performance-gap--ahead dd { color: #4b7551; }
.performance-gap--unknown dd { color: var(--text-2); font-weight: 500; }
.performance-progress { height: 5px; border-radius: 5px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.performance-progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.performance-card--store .performance-progress i { background: #82947b; }
.performance-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; color: var(--text-2); font-size: 11px; margin-top: 9px; line-height: 1.6; }
.performance-baseline, .performance-notice, .performance-objective { margin-top: 12px; color: var(--text-2); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.performance-notice { padding: 9px 10px; background: var(--surface-2); border-radius: 8px; }
.performance-context { margin: 11px 0; color: var(--text-2); font-size: 12px; line-height: 1.6; }
.performance-team { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 10px 14px; }
.performance-team-heading { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.performance-team-heading h3 { font-size: 13px; }
.performance-team-heading .btn { min-height: 40px; }
.performance-team-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.performance-person { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.performance-person h4 { font-size: 13px; }
.performance-person p { color: var(--text-2); font-size: 11px; margin-top: 3px; line-height: 1.6; }
.performance-person dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 0 0 0 auto; }
.performance-person dd { margin: 3px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.performance-method { margin-top: 13px; color: var(--text-2); font-size: 11px; line-height: 1.7; }
.performance-method summary { cursor: pointer; padding: 8px 0; width: fit-content; font-size: 12px; }
.performance-method summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.performance-method p + p { margin-top: 6px; }
html[data-theme="dark"] .performance-gap--behind dd { color: #dfba89; }
html[data-theme="dark"] .performance-gap--ahead dd { color: #a3c6a7; }
@media (max-width: 359px) {
  .performance-card { padding: 15px; border-radius: 14px; }
  .performance-card-head { flex-wrap: wrap; }
  .performance-facts { gap: 14px 9px; }
  .performance-facts dd { font-size: 14px; }
  .performance-person dl { flex-basis: 100%; margin-left: 0; }
}

.upload-job-name{display:flex;align-items:center;gap:10px;min-width:0;font-size:14px;margin-bottom:8px}.upload-job-name span{overflow-wrap:anywhere}.upload-job .progress{margin-top:10px}

/* =============== 「工作 / 个人」切换放进标题行 ===============

   以前它塞在页面内容最上面，单独占一整行（min-height 44px + 18px 下边距），
   又高又占地方。现在放在标题行「今天」右边，做成紧凑的一小段。 */
.title-row {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.title-row h1 { flex: 0 0 auto; }
.today-mode-host { min-width: 0; }

/* 标题行里的切换：小一号、不占整行 */
.title-row .today-mode-switch {
  margin: 0; padding: 2px;
  max-width: none;
  border-radius: 9px;
  gap: 2px;
}
.title-row .today-mode-switch button {
  min-height: 28px; min-width: 46px;
  padding: 0 10px;
  font-size: 13px; font-weight: 600;
  border-radius: 7px;
}
.title-row .today-mode-note {
  padding: 0 8px 0 4px;
  font-size: 11.5px;
  white-space: nowrap;
}
/* 窄屏：字号再收一点，保证和「今天」放得下 */
@media (max-width: 430px) {
  .title-row { gap: 8px; }
  .title-row .today-mode-switch button { min-width: 42px; padding: 0 8px; font-size: 12.5px; }
  .title-row .today-mode-note { font-size: 11px; padding-right: 5px; }
}
@media (max-width: 350px) {
  .title-row .today-mode-note { display: none; }
}

/* ==================================================================
   任务看板 + 指针拖拽 + 长按菜单
   ==================================================================

   拖拽以前是 HTML5 的（draggable + dragstart/dragover/drop），
   在触摸屏上完全不触发 —— 手机上根本拖不动。现在换成 Pointer Events，
   下面这些是配套的视觉。 */

/* --- 被拖的那一行：原位留一个"坑" ---
   手机上手指挡着屏幕，画一条插入线是看不见的，
   所以用"行本身留在落点"当占位，空隙自然就出来了。 */
/* 长按拖动的前提：别让系统把长按当成"选文字/弹菜单"。
   真机上就是这个把拖拽掐断的（模拟触摸测不出来）——
   所以 user-select / touch-callout 必须**从按下那一刻**就关掉，
   不能等"拿起"之后再关，那就晚了。 */
.drag-wrap {
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.drag-wrap .bd-title, .drag-wrap .t-title { -webkit-user-select: none; user-select: none; }
.drag-wrap.drag-live {
  opacity: .28;
  outline: 2px dashed var(--accent, #2563eb);
  outline-offset: -2px;
  border-radius: 12px;
  background: var(--accent-soft, rgba(37,99,235,.08));
}

/* --- 跟手的那张卡 --- */
.drag-ghost {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;          /* 关键：不然 elementFromPoint 摸到的是它自己 */
  box-shadow: 0 18px 40px rgba(15,23,42,.28), 0 2px 6px rgba(15,23,42,.14);
  border-radius: 14px;
  background: var(--card, #fff);
  transform-origin: center;
  scale: 1.03;
  rotate: -1deg;
  opacity: .97;
  will-change: transform;
}
body.dragging { cursor: grabbing; user-select: none; }
body.dragging * { cursor: grabbing !important; }

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

/* 全屏看板：这一页除了看板什么都没有，列要尽量高 */
.kanban-wrap { margin: 0; }
.kanban-full { display: flex; flex-direction: column; }
.kanban-loading { padding: 40px 16px; text-align: center; color: var(--text-3, #94a3b8); }

/* 顶部一条：按人/按天 + 提示 + 成员按钮。做得极薄，不抢看板的地方 */
.kanban-top {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
}
.kanban-tabs {
  display: inline-flex; gap: 2px; padding: 2px;
  background: var(--bg-2, #f1f5f9);
  border-radius: 9px;
}
.kanban-tabs button {
  min-height: 30px; padding: 0 13px;
  border: 0; border-radius: 7px;
  background: transparent; color: var(--text-2, #475569);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.kanban-tabs button[aria-pressed="true"] {
  background: var(--card, #fff);
  color: var(--accent, #2563eb);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
.kanban-tip {
  flex: 1 1 auto; min-width: 0;
  font-size: 12px; color: var(--text-3, #94a3b8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kb-add-col {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 30px; padding: 0 12px;
  border: 1px solid var(--line, #e2e8f0); border-radius: 9px;
  background: var(--card, #fff); color: var(--text-2, #475569);
  font-size: 13px; font-weight: 600; cursor: pointer;
}

/* 横向滑动的一排 */
.kanban-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: hidden;
  padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
/* 滚动条隐藏 —— 底部有页码圆点了，这条多余 */
.kanban-scroll::-webkit-scrollbar { height: 0; display: none; }
/* 标准属性那条也要给 —— 原来这里写的是 scrollbar-width: thin（细条），
   现在条整个不要了 */
.kanban-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.kanban-scroll::-webkit-scrollbar-thumb {
  background: rgba(100,116,139,.3); border-radius: 99px;
}

/* 一列 */
.kb-col {
  flex: 0 0 auto;
  width: min(80vw, 302px);
  display: flex; flex-direction: column;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  /* 尽量占满可视高度：一屏就是几列，像 Todoist 那样 */
  height: calc(100vh - 260px);
  min-height: 320px;
  max-height: 720px;
}
.kb-col.has-overdue { border-color: rgba(220,38,38,.35); }
.kb-col-loose { border-style: dashed; }

/* 列头：名字 + 数量 + ⋮ */
.kb-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 10px 9px 12px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  flex: 0 0 auto;
}
.kb-who { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.kb-who b { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-who span { font-size: 11.5px; color: var(--text-3, #94a3b8); }
.kb-who em { font-style: normal; color: #dc2626; font-weight: 600; }
.kb-more {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--text-3, #94a3b8);
  cursor: pointer;
}
.kb-more:active { background: var(--bg-2, #f1f5f9); }

/* 列身：卡片从这里往下排 */
.kb-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px;
  display: flex; flex-direction: column; gap: 7px;
  min-height: 80px;
  -webkit-overflow-scrolling: touch;
}
/* 拖到这一列上方时整列亮一下，让人知道"松手就归他" */
.kb-body.drag-over {
  background: var(--accent-soft, rgba(37,99,235,.07));
}

.kb-empty {
  padding: 26px 10px; text-align: center;
  color: var(--text-3, #94a3b8); font-size: 12.5px; line-height: 1.7;
}

/* 列脚：＋ 添加任务（Todoist 每列都有，点了就地输入） */
.kb-foot { flex: 0 0 auto; padding: 6px; border-top: 1px solid var(--line, #e2e8f0); }
.kb-add {
  width: 100%; min-height: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--text-3, #94a3b8);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.kb-add:active { background: var(--bg-2, #f1f5f9); color: var(--text-2, #475569); }
.kb-input {
  width: 100%; min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--accent, #2563eb); border-radius: 9px;
  background: var(--card, #fff); color: inherit;
  font-size: 13.5px; outline: none;
}

/* 看板里的卡片：比今日页更紧凑，多余的点缀收掉 —— 一屏尽量多放几张 */
.kb-body .bd-row {
  padding: 9px 10px;
  border-radius: 11px;
  gap: 9px;
}
/* 已删除：看板标题的老尺寸（13.5px）。现在跟今天页统一 15.5px，由下面那条规则定义。 */
.kb-body .bd-marks { margin-top: 3px; gap: 4px; }
/* 已删除：看板标签的 10.5px 覆盖，跟今天页保持一致 */
.kb-body .bd-responsibility { margin-top: 4px; font-size: 11.5px; }
/* 卡片上不摆「讨论 / 提醒 / 改期」这些按钮：
   长按卡片弹出的菜单里有；有未读时才把讨论露出来 */
.kb-body .task-discuss-link { display: none; }
.kb-body .task-discuss-link:has(.discussion-badge) {
  display: inline-flex; align-items: center; gap: 3px;
}
.kb-body .bd-postpone, .kb-body .rm-btn { display: none; }

@media (max-width: 430px) {
  .kb-col { width: min(84vw, 286px); height: calc(100vh - 235px); }
  .kanban-tip { display: none; }
}

/* --- 长按快捷菜单 --- */
.qm-title { font-size: 15px; font-weight: 650; line-height: 1.5; }
.qm-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-3, #94a3b8); }
.qm-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.qm-list button {
  min-height: 46px; padding: 0 14px;
  text-align: left; font-size: 15px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 11px;
  background: var(--card, #fff); color: inherit;
  cursor: pointer;
}
.qm-list button:active { background: var(--bg-2, #f1f5f9); }

@media (max-width: 430px) {
  .kb-col { width: min(82vw, 300px); max-height: 62vh; }
  .kanban-tip { display: none; }     /* 手机上没地方，手势自己会说话 */
}

/* 隐藏了列之后，顶部留一个恢复入口 —— 不让人找不到 */
.kb-hidden-chip {
  flex: 0 0 auto;
  min-height: 30px; padding: 0 11px;
  border: 1px dashed var(--line, #cbd5e1); border-radius: 9px;
  background: transparent; color: var(--text-3, #94a3b8);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.kb-hidden-chip:active { background: var(--bg-2, #f1f5f9); }

/* 看板顶部的「已完成」入口 —— 已完成任务的窗口 */
.kb-done-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 30px; padding: 0 11px;
  border: 1px solid var(--line, #cbd5e1); border-radius: 9px;
  background: var(--surface, #fff); color: var(--text-2, #475569);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.kb-done-chip:active { background: var(--bg-2, #f1f5f9); }

/* ============ 浮层打开时锁住底下的页面 ============

   菜单/弹层浮在上面时，底下那层页面必须不能滚 —— 否则手指在菜单里
   上下滑，页面跟着滚，关掉菜单人就不知道被滚到哪去了。 */
html.wb-scroll-lock, html.wb-scroll-lock body {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;          /* 兜底：安卓 WebView 有时不吃 overflow */
}
/* 但浮层自己必须还能滚 */
html.wb-scroll-lock #menu,
html.wb-scroll-lock .sheet-body,
html.wb-scroll-lock .sheet {
  touch-action: pan-y;
}

/* 菜单太高时自己滚，别撑出屏幕、也别把滚动传给页面 */
#menu {
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;     /* 滚到头就停，不透传到底下的页面 */
  -webkit-overflow-scrolling: touch;
}

/* ============ 顶部只留一行 ============

   手机上 APK 自带一条蓝色标题栏（写着「醒原叶工作台」），
   网页原来又写一遍「醒原叶工作台 V1.x」，等于同一句话说两遍、
   白占一行高度。现在那行去掉了，版本号收进 ⋯ 菜单和「我的账号」。 */
.topbar { padding-top: 10px; }
.topbar .topbar-left { padding-top: 2px; }

/* ============ 顶栏自动让位 ============

   手机上 APP 自带的蓝色标题栏去不掉（要重装 APK），
   但网页这条吸顶的顶栏可以自己收起来 ——
   往下看内容时收上去，往回滑就出来，内容多出一整行。

   用 transform 而不是 display：有过渡动画，是"退场"不是"消失"；
   sticky 元素滚过之后原本的流内空间已经滚走了，所以收上去不留空档。 */
.topbar {
  transition: transform .2s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
body.topbar-hidden .topbar {
  transform: translateY(-105%);
  pointer-events: none;   /* 收起来了就别挡着点内容 */
}

/* ============ 套壳 APP：内容顶到屏幕边之后的安全区 ============

   安卓自带的标题栏去掉之后（NoActionBar），网页就是唯一的界面，
   内容一直顶到屏幕边。这时候顶部要避开状态栏、底部要避开手势条 ——
   在 APP 里由原生把 safe-area 透传给 CSS（env() 在 WebView 里默认是 0）。 */
html.wb-in-app .topbar { padding-top: max(10px, env(safe-area-inset-top)); }
html.wb-in-app .tabbar,
html.wb-in-app .tab-bar { padding-bottom: max(4px, env(safe-area-inset-bottom)); }

/* ==================== 今天页：分区头 + 日期小条 + 底部添加 ====================

   对齐 Todoist 的今天页：
     过期 2                    [重新安排]
     ───────────────────────────────
     星期一，10月5日   3 项      已完成 1/4
     ───────────────────────────────
     ○ 任务卡片…
     ＋ 添加任务
*/

/* 分区头：标题 + 条数 + 右侧动作 */
.td-sec {
  display: flex; align-items: baseline; gap: 8px;
  margin: 20px 0 10px;
  padding: 0 2px;
}
.td-sec:first-child { margin-top: 6px; }
.td-sec h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.td-sec .n { font-size: 13px; font-weight: 600; color: var(--text-3); }
.td-sec-done { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.td-sec-act {
  margin-left: auto;
  border: 0; background: none; cursor: pointer;
  font-size: 13.5px; font-weight: 650;
  color: var(--danger, #ff3b30);
  padding: 4px 2px;
}
.td-sec-act:active { opacity: .6; }

/* 卡片上那行日期：日历图标 + 日期时间，逾期标红 */
.bd-when {
  display: flex; align-items: center; gap: 5px;
  margin-top: 5px;
  font-size: 12.5px; color: var(--text-2);
}
.bd-when .ic { flex: none; opacity: .75; }
.bd-when.over { color: var(--danger, #ff3b30); font-weight: 600; }
.bd-when.over .ic { opacity: 1; }

/* 列表末尾的「＋ 添加任务」大按钮 */
.td-add {
  width: 100%; min-height: 50px;
  margin: 10px 0 4px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: 14px;
  background: var(--surface-2, #f2f2f7);
  color: var(--text-2);
  font-size: 14.5px; font-weight: 650;
  cursor: pointer;
}
.td-add:active { background: var(--line-2, #ececef); }
html[data-theme="dark"] .td-add { background: rgba(255,255,255,.07); }
html[data-theme="dark"] .td-add:active { background: rgba(255,255,255,.12); }

/* ==================================================================
   今天页 = Todoist 的样子
   ==================================================================

   这一页只有三样东西：
     「过期 N」分区（右侧一个动作）
     「星期X，M月D日」日期分区
     每个分区底下「＋ 添加任务」

   原来那套（问候语、两个入口卡片、顶部输入框、门店打卡、问阿策助理、
   明天计划、收集箱）全撤了 —— 用户说"直接不要了"。 */

.td-page { padding-bottom: 6px; }
.td-group { margin-bottom: 6px; }

/* 分区里的卡片：比别处更松一点、更像 Todoist 的卡片 */
.td-page .board-list { gap: 0; }
.td-page .bd-row {
  padding: 12px 12px 12px 0;
  border-radius: 0;
  gap: 2px;
}
.td-page .bd-row + .bd-row { border-top: 1px solid var(--line-2); }
.td-page .board-list > .card,
.td-page .board-list { background: var(--surface); }
.td-page .bd-title { font-size: 15.5px; font-weight: 450; line-height: 1.4; }

/* 备注预览：一行，灰色，超出省略 —— 对参考图里标题下面那行灰字 */
.bd-notes-preview {
  margin-top: 3px;
  font-size: 12.5px; line-height: 1.45;
  color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 底部「＋ 添加任务」按钮变成输入框时，占同样的位置 */
.td-add-input {
  margin: 10px 0 4px;
  min-height: 46px;
  font-size: 15px;
}

/* 分区头的日期那一行要显眼一点（对参考图里的「星期一，10月5日」） */
.td-sec h3 { font-variant-numeric: tabular-nums; }

/* ==================================================================
   卡片元信息一行 + 添加任务的弹框
   ================================================================== */

/* 元信息挤一行：日期在左，标签居中，负责人和讨论靠右 —— 卡片短一点。
   用户的原话：「负责人和讨论留在右边同一行上，卡片不宜太长」

   注意类名是 bd-metarow，不是 bd-meta ——
   后者是老类名，日程和别的卡片也在用，共用会互相弄坏。 */
.bd-metarow {
  display: flex; align-items: center; gap: 7px;
  margin-top: 6px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-2);
}
.bd-metarow .bd-when { margin-top: 0; flex: 0 0 auto; }
.bd-metarow .bd-marks {
  display: flex; gap: 6px; margin: 0;
  flex: 0 1 auto; min-width: 0; overflow: hidden;
  flex-wrap: nowrap;
}
.bd-metarow .bd-mark { flex: 0 0 auto; }
/* 负责人 + 讨论贴右边 */
.bd-resp {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto; min-width: 0;
}
.bd-resp .asg { max-width: none; padding: 0; background: transparent; border: 0; }
.bd-resp .asg-name { display: none; }
.bd-resp .task-discuss-link { font-size: 12px; white-space: nowrap; }

/* 窄屏：标签让位，日期和负责人留着 —— 这两个最有用 */
@media (max-width: 430px) {
  .bd-metarow .bd-marks { display: none; }
}

/* ---------------- 添加任务的弹框（对齐 Todoist） ---------------- */
.ad-wrap { display: flex; flex-direction: column; gap: 4px; }
.ad-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: inherit;
  font-size: 16px; line-height: 1.5; font-family: inherit;
  resize: none; outline: none;
}
.ad-input:focus { border-color: var(--accent); }
.ad-preview {
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 26px; margin: 8px 0 2px;
}
.ad-tag {
  font-size: 12.5px; padding: 3px 9px; border-radius: 99px;
  background: var(--surface-2); color: var(--text-2);
}
.ad-tag.t { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ad-label { margin: 14px 0 6px; font-size: 12.5px; color: var(--text-3); }
.ad-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-chip {
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text-2);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.ad-chip.on {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
}
.ad-submit { margin-top: 20px; width: 100%; min-height: 48px; font-size: 15.5px; }

/* 卡片右边的动作小按钮：回复 / 讨论
   用户的要求：「回复按钮也做到卡片的右边…卡片不宜太长」——
   所以它们和负责人挤在同一行，不另起一行。 */
.bd-act {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: none; padding: 2px 4px;
  color: var(--text-3); font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; border-radius: 6px;
}
.bd-act:active { background: var(--line-2); }
.bd-act .ic { opacity: .8; }
/* 有未读的时候讨论按钮要跳出来 */
.bd-act .discussion-badge { color: var(--accent); font-weight: 700; }

/* ==================================================================
   个人模式 = 工作模式的样子
   ==================================================================

   用户的原话：「"今天"里的"个人"也是，要做到跟"工作"一致」

   个人待办是一整套独立引擎（离线草稿、失败重试、提醒），
   这里**只动外观**，引擎一点不碰：
     · 卡片改成和工作一样的（圆圈 + 标题 + 一行元信息 + 右侧动作）
     · 分区头改成和「过期 / 星期一，10月5日」一个样式
     · 紫色主色去掉 —— 工作和个人用同一个色，看起来才是一套
     · 编辑器收进卡片里，标题输入框对齐「添加任务」那个框 */

/* 紫色拿掉：两个模式一个色 */
body.personal-mode { --accent: #4f7cff; --accent-soft: #eaf0ff; }
html[data-theme="dark"] body.personal-mode { --accent: #7d9dff; --accent-soft: #1e2536; }
.pt-workspace { --pt-accent: var(--accent); --pt-soft: var(--accent-soft); }

/* 页面标题那块收掉 —— 顶栏已经写着「今天 / 个人」了，这里不用再重复一遍 */
.pt-header { display: none; }

/* 状态分页（未完成 / 已完成 / 最近删除）做成和工作分区头一样的分量 */
.pt-tabs {
  display: flex; gap: 8px; margin: 0 0 10px; padding: 0;
  background: none; border: 0;
}
.pt-tabs button {
  min-height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--text-2);
  font-size: 13px; font-weight: 600;
}
.pt-tabs button.is-active {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
}
.pt-tabs button span { margin-left: 5px; opacity: .75; font-weight: 500; }

/* 列表外框去掉，卡片自己撑起来 */
.pt-list-pane {
  background: none; border: 0; border-radius: 0; padding: 0;
}
.pt-list { display: flex; flex-direction: column; gap: 0; }

/* 卡片：对齐工作模式的 bd-row */
.pt-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 4px 12px 0;
  background: var(--surface);
  border: 0; border-radius: 0;
}
.pt-row + .pt-row { border-top: 1px solid var(--line-2); }
.pt-list > .pt-row:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.pt-list > .pt-row:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

/* 圆圈勾选框：和工作模式同款（细圈、点一下变实心打勾） */
.pt-check {
  width: 22px; height: 22px; min-width: 22px; min-height: 22px;
  margin: 2px 0 0 12px; padding: 0;
  border: 1.9px solid var(--line-3, #c7c7cc); border-radius: 50%;
  background: transparent; color: transparent;
  display: inline-grid; place-items: center;
  font-size: 13px; line-height: 1;
}
.pt-row.is-completed .pt-check {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

.pt-row-content {
  flex: 1; min-width: 0; text-align: left;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.pt-row-content strong {
  display: block;
  font-size: 15.5px; font-weight: 450; line-height: 1.4;
  color: inherit; word-break: break-word;
}
.pt-row.is-completed .pt-row-content strong {
  color: var(--text-3); text-decoration: line-through;
}
.pt-row-meta {
  display: block; margin-top: 5px;
  font-size: 12.5px; line-height: 1.5; color: var(--text-3);
}
.pt-row-meta .pt-overdue { color: var(--danger, #ff3b30); font-weight: 600; }

/* 右侧「删除 / 恢复」小按钮：对齐工作模式的 bd-act */
.pt-row > .pt-button {
  min-height: 30px; min-width: 0; padding: 0 8px;
  border: 0; background: none; color: var(--text-3);
  font-size: 12px; font-weight: 600;
}
.pt-row > .pt-button:active { background: var(--line-2); border-radius: 6px; }

/* 编辑器：对齐「添加任务」那个弹框的样子 */
.pt-editor {
  border: 0; border-radius: 0; background: none; padding: 0 0 4px;
}
.pt-section-heading h2 { font-size: 16px; font-weight: 700; }
.pt-title-input {
  min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
  font-size: 16px;
}
.pt-title-input:focus { border-color: var(--accent); outline: none; }
.pt-editor-actions .pt-primary {
  width: 100%; min-height: 48px; font-size: 15.5px;
  background: var(--accent); border-color: var(--accent);
}
.pt-presets button { border-radius: 10px; font-weight: 600; }

/* 底部那行「结果待确认」之类的提示，别抢视线 */
.pt-pending, .pt-error { border-radius: 10px; }
.pt-footer-note { display: none; }

/* ==================================================================
   看板卡片的排布（窄列专用）
   ==================================================================

   看板一列才 280px 宽，今天页那套「日期 + 负责人 + 回复 + 讨论」
   塞不进去。这里按窄列重排：

     标题
     📅 今天              [干] 回复 · 讨论(3)

   勾选圈也统一成空心细圈 —— 原来那个是 44px 按钮配 1px 描边，
   暗色下糊成一坨黑点，看不出是「没勾」。 */

/* 勾选圈：和今天页同款（空心、看得清） */
/* 勾选圈：沿用今天页那套（44×44 按钮 + inset:11px 的圈 = 正圆）。
   注意别只改 width —— 全局还有一条 min-height:44px，
   只改 width 会得到 26×44 的**竖椭圆**（这个坑我踩过）。
   这里只把描边加粗到 2px，让它在深色列上也看得清。 */
.kb-body .bd-check::before {
  inset: 11px;
  border: 2px solid var(--line-3);
  background: transparent;
  border-radius: 50%;
}
.kb-body .bd-row.done .bd-check::before {
  background: var(--accent); border-color: var(--accent);
}
.kb-body .bd-row.done .bd-check::after {
  inset: 8px; font-size: 14px; line-height: 1;
}

/* 元信息一行：窄列里不能挤，给右边那组让出空间 */
.kb-body .bd-metarow {
  gap: 6px; margin-top: 6px;   /* 和今天页一样，差 1px 看得出来 */
  min-width: 0;
}
/* 日期不缩字号、不缩图标 —— 之前缩过，结果和今天页差 3px */
.kb-body .bd-resp { gap: 4px; min-width: 0; }
/* 负责人只留头像，名字省掉 */
.kb-body .bd-resp .asg-name { display: none; }
.kb-body .bd-resp .asg { padding: 0; background: transparent; border: 0; }
.kb-body .bd-resp .mini-avatar { width: 18px; height: 18px; font-size: 10px; }
/* 动作按钮：图标 + 短字，绝不换行、绝不溢出 */
.kb-body .bd-act {
  /* 只保留「不换行、不溢出」这两条约束，尺寸跟今天页走 */
  flex: 0 0 auto; max-width: 72px;
}
.kb-body .bd-act span { overflow: hidden; text-overflow: ellipsis; }
/* 已删除：看板的图标尺寸覆盖，跟今天页保持一致（由标记里的尺寸决定）。 */
/* 讨论按钮平时不占位；有未读才冒出来（数字要小、要贴住） */
.kb-body .task-discuss-link { display: none; }
.kb-body .task-discuss-link:has(.discussion-badge) { display: inline-flex; }
.kb-body .discussion-badge {
  margin-left: 1px; font-size: 10.5px; font-weight: 700;
  min-width: 14px; text-align: center;
}
/* 一行实在放不下就把日期截断，别把按钮顶出去 */
.kb-body .bd-metarow .bd-when span:last-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 84px;
}

/* ============ 个人模式彻底对齐工作模式 ============

   用户的原话：「个人待办要像工作待办的看板状态一模一样」

   标记已经换成同一套（bd-row / bd-check / bd-title / bd-metarow），
   这里再把两个残留的差异抹平：
     · 字号 —— .td-page 里有 15.5px 的覆盖，个人页不在 .td-page 里，
       所以吃到了全局的 13.5px，看起来比工作的小一号
     · 背景 —— 个人模式原来带一层紫调（#f7f5fa / #17131b），去掉 */

.pt-card .bd-title { font-size: 15.5px; font-weight: 450; line-height: 1.4; }
.pt-card { padding: 12px 12px 12px 0; }
.pt-card + .pt-card { border-top: 1px solid var(--line-2); }
.pt-card .bd-body { cursor: pointer; }
.pt-card .bd-when.over { color: var(--danger); font-weight: 600; }

/* 紫色底去掉，跟工作模式同一个底色 */
body.personal-mode { background: var(--bg); }
html[data-theme="dark"] body.personal-mode { background: var(--bg); }

/* ============ 看板窄列：宁可换行，绝不顶出去 ============

   生产上实测出来的：一条带「王博 安排 + 紧急」两个标签的任务，
   右边那组（头像 + 回复）会被顶出卡片 16px。
   本地数据标签少，测不出来 —— 这就是为什么要在真数据上量。

   原因：日期、标签、右边那组都是 flex: 0 0 auto（不许缩），
   加起来超过 282px 的列宽，就只能往外溢。

   修法：允许换行。放得下还在一行（不变高），放不下就把
   标签甩到第二行，右边那组仍然贴右。怎么都不会溢出。 */
.kb-body .bd-metarow {
  flex-wrap: wrap;
  row-gap: 3px;
  overflow: hidden;
}
.kb-body .bd-metarow .bd-marks {
  max-width: 100%;
  overflow: hidden;
}
.kb-body .bd-metarow .bd-mark {
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 换行之后，右边那组仍然要贴右（margin-left:auto 在换行时会失效） */
.kb-body .bd-resp { margin-left: auto; }

/* ============ 看板卡片 = 今天页（以今天页为标准）============

   用户的原话：「看板页要做到跟今天页的卡片大小一致，以今天页为标准」

   看板原来把标题压到 13.5px（列窄，怕放不下）。现在统一按今天页来：
   标题 15.5px、内边距 12px —— 两边看起来是同一张卡。 */
.kb-body .bd-title { font-size: 15.5px; font-weight: 450; line-height: 1.4; }
.kb-body .bd-row { padding: 12px 12px 12px 0; border-radius: 0; gap: 2px; }   /* gap 跟今天页一致，差 8px 看得出来 */
.kb-body .bd-row + .bd-row { border-top: 1px solid var(--line-2); }
.kb-body .bd-metarow { font-size: 12.5px; }
.kb-body .bd-metarow .bd-when { font-size: 12.5px; }
.kb-body .bd-act { font-size: 12px; }

/* 今天页底部两个按钮并排：添加任务 / 添加协助任务 */
.td-add-row { display: flex; gap: 8px; margin: 10px 0 4px; }
.td-add-row .td-add { margin: 0; flex: 1 1 0; min-width: 0; font-size: 14px; }
.td-add-help { color: var(--accent); }
html[data-theme="dark"] .td-add-help { background: var(--accent-soft); }

/* ============ 整页任务（点系统提醒进来走这个）============

   用户的原话：「不要再工作台底部弹页面提醒，那个很不好用」

   所以点提醒进来是**整页**，不是底部弹层：
   顶部一个返回，下面是任务详情 + 讨论，撑满整个页面。 */
.task-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 4px 0 32px;
}
.task-page-back {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 40px; padding: 0 12px 0 6px;
  margin: 0 0 12px;
  border: 0; border-radius: 10px;
  background: none; color: var(--accent);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.task-page-back:active { background: var(--accent-soft); }
.task-page .task-detail-summary,
.task-page .task-discussion {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.task-page .task-detail-summary { margin-bottom: 14px; }

/* ============ 看板列宽 = 今天页卡片宽 ============

   用户的要求：「卡片的宽度也要改，改成和"今天"页一致」

   实测算出来的链条（390 视口）：
     今天页  #view 390 → .td-page 358 → .board-list 358 → 卡片 328px
     看板    #view 390 → .kb-col  300 → .kb-body   298 → 卡片 282px

   卡片 = 列宽 - 列边框(2) - 列体左右内边距(16)
   要 328px  →  列宽 = 328 + 2 + 16 = 346px
   346 = 100vw - 44px（390 - 44）

   ⚠ 只在手机宽度生效。桌面端列宽要是跟着 100vw 走，
     一列会撑到一千多像素，看板就没法看了 —— 上面那种情况保持原样。 */
@media (max-width: 600px) {
  .kb-col { width: calc(100vw - 44px); }
}

/* ============ 讨论按钮：两页同一套规则 ============

   生产上比同一张卡量出来的：
     今天页  日期42 + 王博安排51 + 紧急24 + 右侧134（含「讨论」） = 272 → 超过 270，换行
     看板页  日期42 + 王博安排55 + 紧急31 + 右侧 73（无「讨论」） = 222 → 一行

   看板当初为了窄列，没有未读时会把「讨论」藏掉；今天页没这条规则。
   结果同一张卡一个换行、一个不换行 —— 卡片高度就对不上。

   统一：**没有未读就不显示「讨论」**，有未读才冒出来（带数字）。
   放心，入口没少：旁边的「回复」就是进讨论（打开就落在输入框）。 */
.bd-row .task-discuss-link { display: none; }
.bd-row .task-discuss-link:has(.discussion-badge) { display: inline-flex; }

/* 标签尺寸由基础规则决定（原来那条 10.5px 的看板覆盖已删）。 */

/* ============ 个人页面：和工作页一模一样 ============

   用户的要求：
     · 「一点击个人页面，右边仅自己可见就蹦出来挤住了。可以把它下移」
     · 「"个人"页面要做到像工作页一样，用看板卡片的形式来，
        除了没有添加协作任务按钮，其他得一模一样」

   结构已经换成和工作页同一套（td-page / td-sec / board-list / bd-row / td-add），
   这里只补两处个人页专有的小东西。 */

/* 「仅自己可见」从标题行挪下来了 —— 现在是正文第一行的一行小字 */
.pt-private-note {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 10px;
  font-size: 12.5px; color: var(--text-3);
}
.pt-private-note .ic { flex: none; opacity: .8; }

/* 编辑框：只在「添加 / 点开某一项」时出现，样式贴住工作页的观感 */
.pt-page .pt-editor-group { margin-bottom: 10px; }
.pt-page .pt-editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.pt-page .pt-list-pane { padding: 0; }

/* 三个分区的外层间距跟工作页一致 */
.pt-page .td-group { margin-bottom: 6px; }
.pt-page .board-list { padding: 0 14px; }

/* ============ 顶栏里那行「仅自己可见」 ============

   用户的原话：「把仅自己可见那一行字，往上放，放在横线之上，
   自己的事都清了下面」

   位置：副标题（「自己的事都清了」）下面、顶栏 border-bottom 那条横线之上。
   只在个人模式出现。 */

.topbar-private {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text-3);
  /* 顶栏窄，长了就省略，别把顶栏撑高 */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-private[hidden] { display: none; }

/* 个人页正文里那行已经挪走了，样式留着也无害 —— 万一还有别处在用 */

/* ============ 看板：滑动吸附 + 底部页码圆点 ============

   用户的原话：「他这个底部是由小圆点组成的，拖动之后他会按照小圆点
   去分页面，不会卡在半中间，我们这种会卡在一半，在两个人的任务中间」

   吸附本身原来就有，但写的是 proximity（离得近才吸）—— 正常滑动不算近，
   所以每次都停在一半。JS 那边已经改成 mandatory，这里补两件 CSS 的事：
     1. scroll-padding：对齐的时候别把列贴到容器最边上（要留出内边距）
     2. 底部那排圆点的样子 */

.kanban-scroll {
  /* 和 .kanban-scroll 自己的左右内边距对齐，否则吸附后会顶到边 */
  scroll-padding-left: 2px;
  scroll-behavior: smooth;
}

/* ---------------- 底部页码圆点 ---------------- */
.kanban-dots {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 22px;
  margin: 2px 0 4px;
  padding: 0 4px;
}
.kanban-dots[hidden] { display: none; }

.kb-dot {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--line-3);
  cursor: pointer;
  transition: background .16s, transform .16s;
}
.kb-dot.far { width: 6px; height: 6px; opacity: .55; }
.kb-dot.on {
  background: var(--text);
  transform: scale(1.25);
}
.kb-dot:active { transform: scale(.9); }

/* 列数多的时候圆点会换行 —— 允许，不撑破页面 */
@media (max-width: 430px) {
  .kanban-dots { gap: 6px; }
  .kb-dot { width: 7px; height: 7px; }
  .kb-dot.far { width: 5px; height: 5px; }
}

/* ============ 备忘录：对齐全站的字号尺度 ============ */

/* 顶上那行「仅自己可见」—— 跟今天页同一个分量 */
.memo-privacy {
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 12px;
  color: var(--text-3);
}
.memo-privacy .ic { margin-top: 2px; }

/* 外框：跟其他页一样的圆角卡片，别再多一层边框 */
.memo-layout {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

/* 「备忘录」这个标题用分区头的分量（16px），不再是 20px */
.memo-list-heading { padding: 14px 14px 8px; }
.memo-list-heading h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.memo-count { font-size: 12.5px; color: var(--text-3); }

.memo-list-tools { gap: 8px; padding: 0 14px 10px; }
.memo-search { border-radius: 10px; }
.memo-search input { min-height: 40px; font-size: 14px; padding: 6px 0; }

/* 按钮：全站是 13.5px / 36px 上下，备忘录原来 44px 起 */
.memo-button {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13.5px;
  border-radius: 10px;
}
.memo-button.memo-primary { padding: 6px 14px; }
.memo-icon { padding: 7px; }

/* 分页（全部/收藏/回收站）—— 跟看板的「按人/按天」一个样子 */
.memo-folder-tabs { gap: 6px; padding: 0 14px 10px; }
.memo-folder-tabs button {
  min-height: 32px;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.memo-folder-tabs .is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* 列表项：跟任务卡片同一套（标题 15.5 / 预览 12.5 / 元信息 12.5） */
.memo-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}
.memo-row:last-child { border-bottom: 0; }
.memo-row-title { font-size: 15.5px; font-weight: 450; line-height: 1.4; gap: 5px; }
.memo-row-preview { font-size: 12.5px; line-height: 1.5; margin-top: 3px; }
.memo-row-meta { font-size: 12.5px; gap: 6px; margin-top: 5px; }
.memo-pin-mark { margin-top: 4px; }

/* 编辑器 */
.memo-editor-toolbar { min-height: 50px; padding: 6px 8px; }
.memo-editor-label { display: none; }        /* 标题栏已经写着「备忘录」了 */
.memo-writing { padding: 14px 16px 10px; }
.memo-title-input { font-size: 19px; font-weight: 650; min-height: 40px; }
.memo-body-input { font-size: 15px; line-height: 1.65; }
.memo-editor-footer { padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
.memo-footer-info { font-size: 12.5px; }
.memo-footer-actions .memo-primary { min-width: 78px; }

/* 空状态 / 提示 */
.memo-empty { padding: 34px 20px; font-size: 14px; }
.memo-empty h3 { font-size: 15.5px; }
.memo-empty p { font-size: 13px; }
.memo-empty .ic { margin-bottom: 10px; }
.memo-empty .memo-button { margin-top: 14px; }
.memo-loading, .memo-trash-hint, .memo-partial, .memo-deleted-notice { font-size: 12.5px; padding: 12px 14px; }
.memo-alert { margin: 10px 12px; padding: 12px; border-radius: 10px; font-size: 13px; }
.memo-alert strong { font-size: 13.5px; }

/* 宽屏下的两栏布局保持不变 */
@media (min-width: 860px) {
  .memo-list-heading { padding: 16px 16px 10px; }
  .memo-list-tools { padding: 0 16px 12px; }
  .memo-folder-tabs { padding: 0 16px 10px; }
  .memo-row { padding: 13px 16px; }
}

/* 备忘录分页标签上的条数（原来挂在被删掉的「我的备忘录」标题上） */
.memo-tab-n {
  margin-left: 4px;
  font-size: 11.5px;
  font-weight: 600;
  opacity: .7;
}

/* 列表工具条现在直接顶在卡片上沿，上面留一点白 */
.memo-list-tools { padding-top: 12px; }

/* ============ 应用内确认框 / 输入框 ============
   替代原生 confirm / prompt，见 app.js 里 wbConfirm 上面的说明。 */

.dlg-msg {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;   /* 原生 confirm 里的 \n 要保留换行 */
  word-break: break-word;
}

/* ============ 打卡：只能现场拍，不给相册 ============

   APK 那边带 capture 的 input 会直接开相机（见 MainActivity.onShowFileChooser）。
   这里只是把这件事在界面上说清楚 —— 否则用户会以为相册坏了。 */

.ck-camera-only {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-3);
}
.ck-camera-only .ic { flex: none; opacity: .75; }

/* 按钮里的相机图标别被压扁 */
.btn .ic { flex: none; }

/* ============ 打卡：完成后锁定 ============
   打卡确认后不能撤销（防「打了又撤」），弹层里给一条明确提示。 */

.ck-locked {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ok-soft, var(--surface-2));
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
}
.ck-locked .ic { flex: none; color: var(--ok, var(--accent)); }

/* ============ 打卡页底部的管理员按钮 ============
   原来「+ 加一项」在顶部那张进度卡里、「重置这一天」在「完成情况」报表里，
   那两处都删了，挪到这里，功能不丢。 */

.cl-admin-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 20px 12px 2px;
}
.cl-admin-row .btn { min-height: 34px; font-size: 13px; }

/* 危险动作用文字色提示，别用整块红底 —— 底部不该抢眼 */
.btn.danger-text { color: var(--danger); }
.btn.danger-text:hover { background: var(--danger-soft); border-color: transparent; }

/* ============ 顶栏日期下面的「完成进度 x/x」============
   打卡页专用，一行小字。见 index.html 的 #topbarProgress。 */

.topbar-progress {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;   /* 数字等宽，翻日期时不会跳 */
  white-space: nowrap;
}
.topbar-progress[hidden] { display: none; }

/* ============ 危险操作的红色警告窗 ============
   用户的原话：「重置这一天弹出一个警告红色窗口」
   见 app.js 的 wbConfirm（danger 模式）。 */

/* 顶部一条红底警告 */
.dlg-warn {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
}
.dlg-warn .ic { flex: none; }

/* 弹层整体：上沿一条红边 + 标题变红 —— 一眼看出不是普通确认 */
#sheet.sheet-danger {
  border-top: 3px solid var(--danger);
}
#sheet.sheet-danger #sheetTitle {
  color: var(--danger);
}

/* 红色确定按钮（.btn.danger 已有，这里只确保够醒目） */
#sheet.sheet-danger .btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  font-weight: 600;
}
#sheet.sheet-danger .btn.danger:hover { filter: brightness(1.06); }

/* ============ 整页禁止缩放 ============
   用户的要求：「所有页面都处于可缩放状态，你要固定住，要求不能缩放。
              只有照片选中后可以缩放，整体页面不行」

   这是双保险：viewport 里已经写了 user-scalable=no，
   这里再声明一次 allowed touch 只有平移 —— 捏合手势直接被吃掉。
   子元素（拖拽行等）自己写的 touch-action 会覆盖这条，不受影响。 */
html {
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;   /* 横屏时别自动放大文字 */
  text-size-adjust: 100%;
}

/* ============ 照片查看器（这里才可以缩放）============ */

.pv {
  position: fixed; inset: 0; z-index: 900;   /* 要盖过顶栏和底部导航 */
  background: #0b0b0c;                        /* 全不透明 —— 别让底下的界面透出来 */
  display: flex; flex-direction: column;
  touch-action: none;          /* 查看器里自己管手势，别让浏览器插手 */
  overscroll-behavior: contain;
}
.pv[hidden] { display: none; }

.pv-bar {
  display: flex; align-items: center; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  color: #fff;
  flex: none;
}
.pv-btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 6px 12px;
  border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.pv-btn:hover { background: rgba(255, 255, 255, .22); }
.pv-btn .ic { flex: none; }
.pv-name {
  flex: 1; min-width: 0;
  font-size: 12.5px; color: rgba(255, 255, 255, .7);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 图片舞台：手势都挂在这上面 */
.pv-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-out;
}
.pv-img {
  max-width: 100%; max-height: 100%;
  display: block;
  will-change: transform;
  transform-origin: center center;
  user-select: none; -webkit-user-select: none;
  -webkit-user-drag: none;
  transition: transform .06s linear;
}
.pv-stage:active .pv-img { transition: none; }

.pv-hint {
  flex: none;
  padding: 8px 12px max(14px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px; color: rgba(255, 255, 255, .55);
  transition: opacity .2s;
}

/* ============ 开发者模式：整屏聊天窗 ============
   用户的要求：「点击进入开发者模式就像进入微信聊天界面。
              底部的导航栏都可以收起来了」

   做法：进这一页给 body 加 dev-chat，然后把内容区变成
   「一屏高 = 视口 − 顶栏」，消息区自己滚，输入框钉在底下。 */

body.dev-chat .tabbar,
body.dev-chat .fab { display: none; }

body.dev-chat .content {
  /* ★ 必须 flex: none —— 父级给的是 flex: 1，而 flex-basis 比 height 优先，
     不关掉的话下面那两行 height 会被忽略，内容区跟着消息无限变高，
     输入框就被顶到屏幕外面去了（踩过） */
  flex: none;
  /* 去掉为底部导航留的那一大块空白，也去掉左右内边距 */
  padding: 0;
  max-width: none;
  width: 100%;
  height: calc(100vh - var(--topbar-h) - var(--safe-t, 0px));
  height: calc(100dvh - var(--topbar-h) - var(--safe-t, 0px));   /* 手机地址栏收放时更准 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.dev-chat #view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* 整页就一个聊天窗 —— ★ 钉在屏幕上，不参与父级的 flex 计算 */
body.dev-chat .dev-page {
  position: fixed;
  left: 0; right: 0;
  top: calc(var(--topbar-h) + var(--safe-t, 0px));
  /* ★ 跟着键盘走：键盘弹起来时窗口缩到它上方，输入框永远是可见的。
     写死 bottom:0 的话键盘会直接盖住输入框（用户说的「对话栏被拉起来」）。
     --keyboard-inset 由 initMobileViewport() 维护。 */
  bottom: var(--keyboard-inset, 0px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* 消息区：自己滚 */
.dev-thread {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 14px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.dev-empty {
  margin: auto;
  padding: 40px 16px;
  color: var(--text-3); font-size: 13px;
}

/* ---- 消息气泡（去重时被误删过，别再删） ---- */
.dev-msg { display: flex; flex-direction: column; max-width: 86%; }
.dev-msg.me { align-self: flex-end; align-items: flex-end; }
.dev-msg.them { align-self: flex-start; align-items: flex-start; }

.dev-bubble {
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 15px; line-height: 1.55;
  word-break: break-word;
}
.dev-msg.me .dev-bubble {
  background: var(--accent); color: #fff;
  border-bottom-right-radius: 5px;
}
.dev-msg.them .dev-bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.dev-time { margin-top: 3px; font-size: 10.5px; color: var(--text-3); }

/* 自己消息上那排小标签（现场信息）—— 很轻，不抢眼 */
.dev-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dev-chip {
  font-size: 10px; line-height: 1.5;
  padding: 0 7px; border-radius: 99px;
  background: rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .9);
  white-space: nowrap;
}

/* 输入区：钉在底下，像微信 */
.dev-composer {
  position: static;
  flex: none;
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.dev-composer textarea {
  flex: 1; min-width: 0;
  min-height: 42px; max-height: 120px;
  padding: 11px 13px;
  font-size: 15px; line-height: 1.4;
  border-radius: 20px;
  resize: none;
}
.dev-composer .btn {
  flex: none;
  min-width: 62px; min-height: 42px;
  border-radius: 20px;
}
body.dev-chat .topbar {
  /* 聊天窗的顶栏不透明，滚动时消息不会从下面透出来 */
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---- 标题居中，像微信 ----
   ① 右侧图标绝对定位 → 左边这块拿到整条顶栏的宽度
   ② 标题在这整条里居中
   ③ 返回按钮绝对定位在左边，不参与居中计算 */
body.dev-chat .topbar-right {
  position: absolute;
  right: 14px; top: 0; bottom: 0;
  margin: 0;
}
body.dev-chat .topbar-left {
  flex: 1 1 100%;
  min-width: 0;
  position: relative;
  align-items: center;
  justify-content: center;
}
body.dev-chat .title-row {
  width: 100%;
  justify-content: center;
  align-items: center;
}
body.dev-chat #viewTitle {
  font-size: 15.5px;
  font-weight: 650;
  text-align: center;
  /* ★ 右上角有 ⊕🔔⋯ 三个图标，标题必须给它们让位，不然会压上去（截图抓到过） */
  max-width: calc(100vw - 220px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 聊天时用不上搜索，收起来给标题腾地方 */
body.dev-chat #btnSearch { display: none; }
/* 聊天页不显示副标题这类东西，标题独占一行 */
body.dev-chat #viewSub,
body.dev-chat #viewPrivate,
body.dev-chat #topDateNav,
body.dev-chat #topbarProgress { display: none !important; }

body.dev-chat .topbar-back {
  position: absolute;
  left: 0; top: 50%;
  margin: 0;
  transform: translateY(-50%);
}

/* 键盘弹起来时，输入区不用再留底部安全区（否则多一块空白） */
body.keyboard-open .dev-composer { padding-bottom: 8px; }

/* ============ 放大输入框（开发者模式）============
   输入超过 3 行时，输入框右边出现「↗ 放大」，
   点开是全屏编辑器 —— 字大、地方大，方便检查错别字。 */

.dev-expand {
  flex: none;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dev-expand:hover { background: var(--hover); }
.dev-expand[hidden] { display: none; }

/* ---- 全屏编辑器 ---- */
.dev-full {
  position: fixed; inset: 0; z-index: 950;
  display: flex; flex-direction: column;
  background: var(--bg);
  padding-top: var(--safe-t, 0px);
  padding-bottom: var(--keyboard-inset, 0px);   /* 键盘弹起来时缩到它上方 */
}
.dev-full[hidden] { display: none; }

.dev-full-bar {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.dev-full-title { font-size: 15px; font-weight: 650; }
.dev-full-btn {
  min-height: 36px; padding: 6px 14px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--accent);
  font-size: 15px; font-weight: 550;
  cursor: pointer;
}
.dev-full-btn.primary { background: var(--accent); color: #fff; }
.dev-full-btn:hover { opacity: .88; }

.dev-full-input {
  flex: 1; min-height: 0;
  width: 100%;
  padding: 16px 16px calc(16px + var(--safe-b, 0px));
  border: 0;
  background: var(--bg);
  color: var(--text);
  /* 编辑长文本时字大一点，好挑错别字 */
  font-size: 17px;
  line-height: 1.7;
  resize: none;
  outline: none;
}

/* ============ 已读标记 + 正文的粗体/代码 ============ */

/* 「我 · 16:22」前面那个「已读」 */
.dev-read {
  display: inline-block;
  margin-right: 5px;
  color: var(--text-3);
  opacity: .85;
}

/* 正文里的粗体 —— 别用浏览器默认的 700，太重 */
.dev-text b { font-weight: 650; }

/* 正文里的行内代码 */
.dev-text code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(127, 127, 127, .16);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
}
/* 自己发的那条是蓝底白字，代码块要换个底色才看得清 */
.dev-msg.me .dev-text code { background: rgba(255, 255, 255, .22); }

/* ============ 对话切换条（新对话入口）============ */
/* 一个话题聊完开一条新对话；旧对话存档，点标题能翻 */

/* 看历史对话时，输入区换成一个提示 + 回到当前 */

/* 对话记录列表（抽屉里）*/

/* ============ 云上DeepSeek：顶栏两个图标 + 输入区的 ＋ 和附件 ============ */

/* ‹ 后面那个 ≡（看历史对话）。它在 dev-chat 模式下跟 ‹ 一样是绝对定位的，
   所以要往右挪一个身位，不然两个叠在一起。 */

/* 右上角那个 ⊕（开新对话）—— 跟通知/搜索/⋯ 排一起 */

/* 输入区左边的 ＋（发文件和照片） */
.dev-plus {
  flex: none;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dev-plus:hover { background: var(--hover); color: var(--accent); }
.dev-plus:active { background: var(--accent-soft); }

/* 选完文件后那一排小缩略条 */
.dev-atts {
  flex: none;
  display: flex; gap: 8px;
  padding: 8px 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.dev-atts::-webkit-scrollbar { display: none; }
.dev-att {
  position: relative;
  flex: none;
  display: flex; align-items: center; gap: 6px;
  max-width: 180px;
  padding: 5px 8px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.dev-att img {
  width: 30px; height: 30px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}
.dev-att-ico {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--hover);
  color: var(--text-2);
  flex: none;
}
.dev-att-name {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dev-att-x {
  flex: none;
  width: 20px; height: 20px;
  border: 0; border-radius: 50%;
  background: var(--line);
  color: var(--text-2);
  font-size: 11px; line-height: 1;
  cursor: pointer;
}
.dev-att-x:hover { background: var(--danger); color: #fff; }

/* 输入框自动长高（高度由 JS 设，这里只把过渡做顺） */
.dev-composer textarea { transition: height .12s ease; }

/* 对话列表底部那句提示 */


/* 回复是谁写的：云端（服务器值班进程）还是电脑（老板电脑上那个） */
.dev-src { font-weight: 600; }
.dev-src.cloud { color: var(--accent); }
.dev-src.pc { color: var(--text-3); }

/* ---------- 客户往来：提货未结算 / 给了钱没拿货 ---------- */
.led-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 14px; }
.led-hero-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 15px 14px 12px; overflow: hidden; }
.led-hero-card::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; }
.led-hero-card.due::after { background: var(--danger); }
.led-hero-card.prepaid::after { background: var(--accent); }
.led-hero-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.led-hero-num { font-size: 23px; font-weight: 750; letter-spacing: -.02em; margin: 7px 0 2px; font-variant-numeric: tabular-nums; }
.led-hero-card.due .led-hero-num { color: var(--danger); }
.led-hero-card.prepaid .led-hero-num { color: var(--accent); }
.led-hero-sub { font-size: 11px; color: var(--text-3); }
.led-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.led-dot.due { background: var(--danger); }
.led-dot.prepaid { background: var(--accent); }

.led-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.led-seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; }
.led-seg-btn { border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 9px; min-height: 34px; }
.led-seg-btn.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.led-add { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; }

.led-custs { display: flex; flex-direction: column; gap: 8px; }
.led-cust { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; }
.led-avatar { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 16px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.led-cust-main { min-width: 0; flex: 1; }
.led-cust-name { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-cust-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.led-pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.led-pill.due { color: var(--danger); background: var(--danger-soft); }
.led-pill.prepaid { color: var(--accent); background: var(--accent-soft); }
.led-cust-count { font-size: 11px; color: var(--text-3); flex: none; }

.led-count { font-weight: 500; color: var(--text-3); }
.led-list { display: flex; flex-direction: column; gap: 8px; }
.led-row { position: relative; display: flex; align-items: flex-start; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 12px 17px; overflow: hidden; }
.led-row.closed { background: transparent; }
.led-row.closed .led-who, .led-row.closed .led-amt { color: var(--text-3); }
.led-row-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.led-row-bar.due { background: var(--danger); }
.led-row-bar.prepaid { background: var(--accent); }
.led-row-main { min-width: 0; flex: 1; }
.led-row-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.led-who { font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }
.led-tag { font-size: 10.5px; font-weight: 650; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.led-tag.due { color: var(--danger); background: var(--danger-soft); }
.led-tag.prepaid { color: var(--accent); background: var(--accent-soft); }
.led-row-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; overflow-wrap: anywhere; }
.led-row-note { font-size: 12px; color: var(--text-2); margin-top: 3px; overflow-wrap: anywhere; }
.led-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: none; }
.led-amt { font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.led-amt.due { color: var(--danger); }
.led-amt.prepaid { color: var(--accent); }
.led-act { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 650; padding: 5px 11px; border-radius: 9px; min-height: 30px; white-space: nowrap; }
.led-act.due { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); color: var(--danger); }
.led-act.prepaid { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); }
.led-act.ghost { border-style: dashed; }
.led-void { font-size: 11px; color: var(--text-3); }
.led-mini { border: 0; background: transparent; color: var(--text-3); padding: 3px; min-height: 28px; display: grid; place-items: center; }
.led-mini:hover { color: var(--danger); }
.led-loading { padding: 28px; text-align: center; }
.led-empty { text-align: center; padding: 32px 16px; color: var(--text-2); }
.led-empty-ic { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.led-empty-t { font-weight: 650; color: var(--text); margin-bottom: 3px; }

/* 记一笔：类型用两张可选卡片，不用难点的单选圈 */
.led-form-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.led-kind-card { position: relative; display: flex; align-items: center; gap: 9px; border: 1.5px solid var(--line); border-radius: 14px; padding: 11px; cursor: pointer; background: var(--surface); }
.led-kind-card input { position: absolute; opacity: 0; pointer-events: none; }
.led-kind-card.due:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.led-kind-card.prepaid:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.led-kind-ic { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.led-kind-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.led-quick-cust { display: flex; gap: 6px; flex-wrap: wrap; margin: -3px 0 0; }
.led-amount { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 12px; }
.led-amount-prefix { font-size: 17px; font-weight: 700; color: var(--text-3); }
.led-amount .input { border: 0; padding-left: 0; background: transparent; flex: 1; }

/* 催款跟进：承诺结款 / 最近催款 */
.led-sub { display: flex; gap: 6px; margin-top: 4px; font-size: 12px; line-height: 1.45; align-items: baseline; }
.led-sub-k { flex: none; color: var(--text-3); }
.led-sub-v { color: var(--text-2); overflow-wrap: anywhere; }
.led-sub-v.soon { color: var(--warn); font-weight: 650; }
.led-sub-v.over { color: var(--danger); font-weight: 650; }
.led-ask-head { margin-bottom: 14px; }
.led-ask-title { font-size: 17px; font-weight: 700; }
.led-ask-amt { color: var(--danger); font-variant-numeric: tabular-nums; }
.led-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: -3px 0 4px; }
.chip { cursor: pointer; }

/* 催款凭证 + 改期审批 */
.led-ev-list { display: flex; gap: 8px; flex-wrap: wrap; }
.led-ev-list:not(:empty) { margin-bottom: 8px; }
.led-ev-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.led-ev-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.led-ev-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .62); color: #fff; font-size: 13px; line-height: 1; display: grid; place-items: center; }
.led-ev-add { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line-3); background: var(--surface); color: var(--text-2); border-radius: 10px; padding: 10px 14px; font-size: 13px; min-height: 44px; }
.led-pending { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: 14px; padding: 12px 13px; margin-bottom: 14px; }
.led-pending-h { font-size: 13px; font-weight: 700; color: var(--danger); margin-bottom: 8px; }
.led-pending-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--danger) 18%, transparent); }
.led-pending-row:first-of-type { border-top: 0; }
.led-pending-main { min-width: 0; }
.led-pending-acts { display: flex; gap: 6px; flex: none; }
.date-field { position: relative; cursor: pointer; }
.date-field input[type="date"] { cursor: pointer; }

/* 待结算记录：客户 / 同行调货 切换 */
.led-tabs { margin-bottom: 12px; }

/* 总账：可点开的余额卡（本月实收 / 本月支出） */
.led-tap { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.led-tap:active { transform: scale(.99); }

/* 同事圈 */
.chat-view { display: flex; flex-direction: column; gap: 12px; }
.chat-list { display: flex; flex-direction: column; gap: 10px; }
.chat-row { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; }
.chat-row.me { background: var(--accent-soft); border-color: transparent; }
.chat-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 5px; }
.chat-meta b { font-weight: 650; }
.chat-body { font-size: 14.5px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.chat-compose { display: flex; gap: 8px; align-items: center; position: sticky; bottom: 8px; }
.chat-compose .input { flex: 1; }

/* 业绩上报：按品牌汇总 */
.brand-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.brand-row .brand-name { flex: none; width: 74px; font-size: 13px; color: var(--text-2); }
.brand-row .input { flex: 1; min-width: 0; }

/* 备忘录图片 */
.memo-images { margin: 10px 0 4px; padding: 0 2px; }
.memo-images-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.memo-image-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.memo-img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

.memo-image-strip:empty { display: none; }
.memo-images-head { min-height: 0; }

/* 版本更新闸门（关不掉，只能刷新） */
.ug-lock { overflow: hidden; }
.update-gate { position: fixed; inset: 0; z-index: 99999; background: rgba(0, 0, 0, .62); display: flex; align-items: center; justify-content: center; padding: 24px; }
.update-gate-card { background: var(--surface); border-radius: 16px; padding: 22px 18px 18px; width: 100%; max-width: 320px; text-align: center; box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.ug-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.ug-sub { font-size: 13.5px; color: var(--text-2); line-height: 1.65; margin-bottom: 16px; }

/* 备忘录独立页：顶栏 / 小字 / 底部工具条 */
.memo-icon-only { padding: 6px 8px; }
.memo-meta-line { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); margin: 2px 0 10px; }
.memo-toolbar { display: flex; gap: 6px; align-items: center; padding: 10px 0 2px; border-top: 1px solid var(--memo-border); margin-top: 10px; }
.memo-toolbar .memo-button { flex: none; padding: 6px 10px; font-size: 13px; gap: 5px; }
.memo-toolbar .mt-icon { font-size: 15px; line-height: 1; }

/* 备忘录：独立整页（隐藏底部 tabbar） */
body[data-view="memos"] .tabbar { display: none; }
body[data-view="memos"] #view { padding-bottom: 12px; }

/* ---------- 个人备忘录：iOS 备忘录风格（无边框、整页、大标题） ---------- */
.memo-layout { border: 0; border-radius: 0; background: var(--surface); box-shadow: none; }
.memo-list-pane { border-right: 0 !important; }
.memo-list-tools { padding: 2px 2px 10px; gap: 6px; }
.memo-search input { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding-left: 4px; }
.memo-row { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 12px 2px; }
.memo-row.is-selected, .memo-row:hover { background: transparent; }
.memo-row-title { font-size: 16px; font-weight: 650; }
.memo-title-input { font-size: 26px; font-weight: 700; border: 0; background: transparent; padding: 6px 0; }
.memo-body-input { border: 0; background: transparent; font-size: 16px; line-height: 1.75; padding: 4px 0 0; min-height: 46vh; }
.memo-writing { border: 0; background: transparent; box-shadow: none; }
.memo-editor-toolbar { border-bottom: 1px solid var(--line); background: transparent; }
.memo-folder-tabs { border-bottom: 1px solid var(--line); }

/* 备忘录：独立 App 式（连工作台顶栏一起隐藏） */
body[data-view="memos"] .topbar { display: none; }
body[data-view="memos"] .app-main, body[data-view="memos"] #view { padding-top: 0; }
body[data-view="memos"] { background: var(--surface); }
.memo-standalone-top { display: flex; align-items: center; gap: 8px; padding: 6px 2px 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.memo-standalone-top b { font-size: 24px; font-weight: 700; letter-spacing: -.2px; }
.memo-standalone-top .memo-button:last-child { margin-left: auto; }

/* 备忘录：清理（iOS 备忘录式，去掉重复按钮 / 下划线 / 底部说明） */
body[data-view="memos"] .memo-editor-footer { display: none !important; }
body[data-view="memos"] .memo-title-input,
body[data-view="memos"] .memo-body-input {
  border: 0 !important; box-shadow: none !important; background: transparent !important;
  border-radius: 0 !important; outline: none;
}
body[data-view="memos"] .memo-title-input { font-size: 27px !important; font-weight: 700 !important; }
body[data-view="memos"] .memo-body-input { font-size: 16px !important; line-height: 1.8 !important; }
body[data-view="memos"] .memo-writing { display: flex; flex-direction: column; min-height: calc(100dvh - 150px); }
body[data-view="memos"] .memo-body-input { flex: 1; }
body[data-view="memos"] .memo-toolbar { margin-top: auto; border-top: 1px solid var(--line); }
body[data-view="memos"] .memo-editor { display: flex; flex-direction: column; min-height: calc(100dvh - 20px); }
body[data-view="memos"] .memo-editor-toolbar { position: sticky; top: 0; z-index: 3; background: var(--surface); }
body[data-view="memos"] .memo-meta-line { font-size: 11.5px; opacity: .75; }
body[data-view="memos"] .memo-list-pane { padding-top: 6px; }

/* 完成任务礼花 */
.celebrate-layer { position: fixed; inset: 0; pointer-events: none; z-index: 99998; overflow: hidden; }
.celebrate-bit { position: absolute; top: 38%; border-radius: 2px; opacity: 0; animation: celebrate-fly var(--dur, 1.2s) cubic-bezier(.2, .7, .3, 1) var(--delay, 0s) forwards; }
@keyframes celebrate-fly {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(calc(var(--dx, 0) * 46vw), 52vh) rotate(720deg) scale(.9); opacity: 0; }
}

/* 完成任务：🎉 上喷 + 顶端闪光（覆盖旧版彩屑） */
.celebrate-pop { position: absolute; left: 50%; bottom: 16%; font-size: 58px; line-height: 1; transform: translate(-50%, 40px) scale(.4); opacity: 0; animation: celebrate-rise .46s cubic-bezier(.16, .9, .3, 1.15) forwards; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .28)); }
@keyframes celebrate-rise {
  0% { transform: translate(-50%, 60px) scale(.35); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(-50%, -44vh) scale(1.18); opacity: 1; }
}
.celebrate-spark { position: absolute; left: 50%; top: 34%; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #fbbf24); box-shadow: 0 0 12px var(--c, #fbbf24); animation: celebrate-spark .68s ease-out forwards; }
@keyframes celebrate-spark {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) scale(.15); opacity: 0; }
}

/* 礼花筒：从一点往外喷（覆盖旧的 🎉） */
.cannon-bit { position: absolute; border-radius: 1px; transform: translate(-50%, -50%); opacity: 0; animation: cannon-fly var(--d, .8s) cubic-bezier(.12, .78, .25, 1) forwards; will-change: transform, opacity; }
@keyframes cannon-fly {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(.15); opacity: 1; }
  18% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) rotate(var(--rot, 360deg)) scale(1); opacity: 0; }
}
.cannon-ring { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .92); box-shadow: 0 0 22px rgba(255, 255, 255, .55); animation: cannon-ring .38s ease-out forwards; }
@keyframes cannon-ring {
  0% { transform: scale(.25); opacity: .95; }
  100% { transform: scale(3.6); opacity: 0; }
}

/* 看板：每个人列下的「已完成」 */
.kb-done-sec { margin: 10px 2px 0; border-top: 1px dashed var(--line); padding-top: 8px; }
.kb-done-sec summary { font-size: 12.5px; color: var(--text-2); cursor: pointer; list-style: none; }
.kb-done-sec summary::-webkit-details-marker { display: none; }
.kb-done-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.kb-done-title { flex: 1; min-width: 0; text-decoration: line-through; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-undo { flex: none; font-size: 11.5px; color: var(--accent); background: transparent; border: 0; padding: 2px 4px; cursor: pointer; }

/* ==================== 排班改动申请 / 审核 ==================== */

/* 编辑模式的提示条 */
.roster-edit-bar {
  margin-bottom: 12px;
  align-items: flex-start;
}
.roster-edit-bar b { font-size: 14px; }

/* 工具栏上「待审核 N」—— 有一点背景色，好认 */
.shr-badge-btn {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 600;
}

/* 申请卡片 */
.shr-item {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 11px;
  background: var(--surface);
}
.shr-item:last-child { margin-bottom: 0; }

.shr-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.shr-av { flex: 0 0 auto; }
.shr-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 14px;
}
.shr-who b { font-weight: 600; }

/* 「原来 → 改成」那两行 */
.shr-diff {
  background: var(--surface-2, #f6f7f9);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 9px;
}
.shr-row {
  display: flex;
  gap: 9px;
  align-items: baseline;
  font-size: 13.5px;
  line-height: 1.7;
}
.shr-k {
  flex: 0 0 34px;
  color: var(--text-3);
  font-size: 12.5px;
}
.shr-v { flex: 1; min-width: 0; word-break: break-word; }
.shr-before { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-3, #ccd); }
.shr-after { color: var(--text); font-weight: 600; }

.shr-reason {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  padding: 8px 11px;
  background: var(--accent-soft, #eef3ff);
  border-radius: 9px;
}
.shr-reason b { color: var(--text); }

.shr-actions {
  display: flex;
  gap: 9px;
  margin-top: 11px;
}
.shr-actions .btn { flex: 1; }

/* 状态小标签 */
.shr-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 7px;
  vertical-align: 1px;
}
.shr-badge.shr-pending { background: var(--warn-soft, #fff4e0); color: var(--warn, #b07b1e); }
.shr-badge.shr-approved { background: var(--ok-soft, #e8f7ee); color: var(--ok, #2a7a4b); }
.shr-badge.shr-rejected { background: var(--danger-soft, #fdecec); color: var(--danger, #b3382f); }
.shr-badge.shr-stale { background: var(--surface-2, #eee); color: var(--text-3); }

/* 「提交后不会立刻生效」那条小提示 */
.shr-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 11px;
  background: var(--warn-soft, #fff8e6);
  border-radius: 9px;
  font-size: 12.5px;
  color: var(--warn, #8a6420);
}
.shr-tip svg { flex: 0 0 auto; }

/* 必填星号 */
.req-star { color: var(--danger, #d9534f); font-weight: 700; margin-left: 2px; }

/* 排班批量审核 */
.shr-batch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 2px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.shr-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.shr-check { width: 18px; height: 18px; margin-right: 2px; }

/* 排班表按月：横向滑动 */
.rs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.rs-scroll .roster { min-width: 900px; }
