:root {
  --bg: #f4f5fa;
  --card: #ffffff;
  --ink: #14161f;
  --ink-2: #3d4255;
  --muted: #7b8298;
  --line: #e8eaf2;
  --brand: #4f46e5;
  --brand-2: #7c6cf6;
  --brand-soft: #eef0ff;
  --busy: #f43f5e;
  --busy-soft: #ffe8ec;
  --workable: #f59e0b;
  --workable-soft: #fff4dd;
  --free: #10b981;
  --free-soft: #dcfaef;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(23, 26, 45, 0.07);
  --shadow-sm: 0 2px 8px rgba(23, 26, 45, 0.05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body { min-height: 100vh; min-height: 100dvh; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 650; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---------- 启动 ---------- */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--bg);
  z-index: 60;
}
.boot-logo, .logo, .brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
.boot p { color: var(--muted); font-size: 13px; }
.boot-help { max-width: 320px; line-height: 1.7; }
.boot-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.boot-actions .btn { min-height: 44px; }

/* ---------- 壳 ---------- */
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding-bottom: 76px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 245, 250, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(232, 234, 242, 0.9);
  padding: 10px 16px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.topbar-main { display: flex; align-items: center; gap: 12px; }
.logo { width: 38px; height: 38px; border-radius: 12px; font-size: 17px; }
.titles { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.titles strong { font-size: 17px; letter-spacing: 0.2px; }
.titles span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  color: var(--ink-2);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--busy);
  border: 2px solid #fff;
}
.offline-bar {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--workable-soft);
  color: #92600a;
  font-size: 12px;
  text-align: center;
}

.view { padding: 14px 14px 24px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 640px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 4px;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 40;
}
.tab {
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 10.5px;
  border-radius: 12px;
  transition: color 0.15s;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--brand); font-weight: 600; }
.tab.active svg { filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.28)); }
.tab { position: relative; }
.tab-badge {
  position: absolute;
  top: 1px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--busy);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 2px solid #fff;
  box-sizing: content-box;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  border: 1px solid rgba(232, 234, 242, 0.7);
}
.card.tight { padding: 13px 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { font-size: 15.5px; font-weight: 650; }
.card-head h3 { font-size: 14px; font-weight: 650; }
.section-title { font-size: 13px; font-weight: 650; color: var(--muted); margin: 4px 2px -4px; letter-spacing: 0.4px; }

.hero {
  background: linear-gradient(150deg, #4f46e5, #6d5ef1 52%, #8b7bff);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.26);
}
.hero .eyebrow { font-size: 11.5px; opacity: 0.82; }
.hero-num { font-size: 22px; font-weight: 700; letter-spacing: 0.3px; }
.hero-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.hero .bar { background: rgba(255, 255, 255, 0.24); height: 7px; border-radius: 999px; overflow: hidden; }
.hero .bar i { display: block; height: 100%; background: #fff; border-radius: 999px; transition: width 0.4s; }
.hero .foot { margin-top: 9px; font-size: 11.5px; opacity: 0.85; line-height: 1.5; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid transparent;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 18px rgba(79, 70, 229, 0.24); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-soft { background: #f3f4fb; color: var(--ink-2); }
.btn-danger { background: var(--busy-soft); color: #c81e3f; }
.btn-ok { background: var(--free-soft); color: #0b7a58; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; min-height: 38px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.mini {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 周视图 ---------- */
.weekstrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
}
.weekstrip::-webkit-scrollbar { display: none; }
.weekstrip .day { flex: 0 0 68px; min-height: 94px; scroll-snap-align: start; }
.weekstrip .day .dd { font-size: 17px; }
.day.flash { animation: day-flash 0.85s ease-out; }
@keyframes day-flash {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5); }
  100% { box-shadow: 0 0 0 14px rgba(79, 70, 229, 0); }
}
.day {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  padding: 8px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 84px;
  color: var(--ink-2);
}
.day .dow { font-size: 10.5px; color: var(--muted); }
.day .dd { font-size: 15px; font-weight: 650; }
.day .day-min { font-size: 10.5px; color: var(--muted); }
.day .tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.day .alloc-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 0 3px;
}
.day.is-today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12); }
.day[data-tag="busy"] { background: var(--busy-soft); border-color: transparent; }
.day[data-tag="busy"] .tag-dot { background: var(--busy); }
.day[data-tag="workable"] { background: var(--workable-soft); border-color: transparent; }
.day[data-tag="workable"] .tag-dot { background: var(--workable); }
.day[data-tag="free"] { background: var(--free-soft); border-color: transparent; }
.day[data-tag="free"] .tag-dot { background: var(--free); }

.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- 标签 / 状态 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  background: #f3f4fb;
  color: var(--ink-2);
}
.chip.busy { background: var(--busy-soft); color: #bf1638; }
.chip.workable { background: var(--workable-soft); color: #92600a; }
.chip.free { background: var(--free-soft); color: #0b7a58; }
.chip.pending { background: var(--workable-soft); color: #92600a; }
.chip.public { background: var(--free-soft); color: #0b7a58; }
.chip.archived, .chip.rejected { background: #f1f2f6; color: var(--muted); }
.chip.phase-upcoming { background: #e0e7ff; color: #4338ca; }
.chip.phase-running { background: var(--free-soft); color: #0b7a58; }
.chip.phase-done { background: #e5e7eb; color: #6b7280; }
.chip.owner { background: var(--brand-soft); color: var(--brand); }

/* ---------- 列表行 ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 14px;
  background: #fafbff;
  border: 1px solid rgba(232, 234, 242, 0.8);
}
.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
}
.item .t { font-size: 14px; font-weight: 600; }
.item .s { font-size: 11.5px; color: var(--muted); }
.avatar svg { width: 18px; height: 18px; }
.tap-card { cursor: pointer; transition: transform 0.12s; }
.tap-card:active { transform: scale(0.985); }

.project-card { display: flex; flex-direction: column; gap: 10px; }
.project-top { display: flex; align-items: flex-start; gap: 11px; }
.project-name { font-size: 15.5px; font-weight: 650; line-height: 1.3; }
.project-desc { font-size: 12px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swatch { flex: none; width: 10px; align-self: stretch; border-radius: 999px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { background: #f7f8fd; border-radius: 12px; padding: 8px 10px; }
.metric b { display: block; font-size: 15px; }
.metric span { font-size: 11px; color: var(--muted); }

/* ---------- 进度 / 柱状 ---------- */
.bar-line { height: 6px; border-radius: 999px; background: #eef0f7; overflow: hidden; }
.bar-line i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.stack { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #eef0f7; }
.stack i { height: 100%; }
.spark { width: 100%; height: 42px; display: block; }

.contrib-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.contrib-row:last-child { border-bottom: 0; }
.contrib-bar { height: 9px; border-radius: 999px; background: #eef0f7; overflow: hidden; display: flex; }
.contrib-bar i.t { background: linear-gradient(90deg, #4f46e5, #7c6cf6); }
.contrib-bar i.o { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.rank {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #f3f4fb;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.rank.top1 { background: #fff3c4; color: #a06a00; }
.rank.top2 { background: #eef1f7; color: #59617a; }
.rank.top3 { background: #ffeadd; color: #a4531b; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcff;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%237b8298' stroke-width='1.6' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea { min-height: 74px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); }

.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.pick.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.pick.tag-pick.busy.on { background: var(--busy-soft); border-color: var(--busy); color: #bf1638; }
.pick.tag-pick.workable.on { background: var(--workable-soft); border-color: var(--workable); color: #92600a; }
.pick.tag-pick.free.on { background: var(--free-soft); border-color: var(--free); color: #0b7a58; }

/* ---------- 小时步进 ---------- */
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fbfcff;
  border-radius: 14px;
  padding: 6px;
}
.stepper button {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 0;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
}
.stepper button:active { transform: scale(0.94); }
.stepper input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  padding: 4px 0;
  box-shadow: none;
}
.stepper input:focus { box-shadow: none; }
.stepper .unit { flex: none; font-size: 12.5px; color: var(--muted); padding-right: 6px; }
details.precise { margin: 4px 0 12px; }
details.precise summary {
  font-size: 12px;
  color: var(--brand);
  cursor: pointer;
  padding: 6px 0;
  list-style: none;
}
details.precise summary::-webkit-details-marker { display: none; }
details.precise summary::after { content: ' ›'; }
details.precise[open] summary::after { content: ' ⌄'; }
details.precise input { margin-top: 4px; }

/* ---------- 骨架屏 ---------- */
.sk {
  border-radius: 10px;
  background: linear-gradient(90deg, #eef0f7 25%, #f8f9fd 37%, #eef0f7 63%);
  background-size: 400% 100%;
  animation: sk-shine 1.3s ease infinite;
}
@keyframes sk-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 语音 ---------- */
.voice-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed #cfd4e6;
  background: #fafbff;
  border-radius: 14px;
  padding: 10px 12px;
}
.voice-btn {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.26);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.voice-btn svg { width: 20px; height: 20px; }
.voice-btn.on { animation: pulse 1.2s infinite; background: linear-gradient(135deg, #f43f5e, #fb7185); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.voice-text { font-size: 12.5px; color: var(--muted); line-height: 1.45; flex: 1; min-width: 0; }
.voice-text.live { color: var(--brand); font-weight: 600; }

/* ---------- 弹层 ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 30, 0.44);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  animation: fade 0.18s ease;
}
.sheet {
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  max-height: min(88dvh, calc(var(--vvh, 100dvh) - 12px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 18px;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  animation: rise 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { font-size: 16px; }
.sheet-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  margin: 18px -18px -20px;
  margin: 18px -18px calc(-1 * (20px + env(safe-area-inset-bottom)));
  padding: 12px 18px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 18px rgba(23, 26, 45, 0.06);
  z-index: 2;
}
.sheet-actions .btn { flex: 1; padding: 12px 14px; }
.sheet-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.sheet-grabber {
  flex: none;
  width: 100%;
  padding: 9px 0 3px;
  display: grid;
  place-items: center;
  touch-action: none;
  cursor: grab;
}
.sheet-grabber::after {
  content: '';
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: #d7dbe8;
}
@keyframes rise { from { transform: translateY(26px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(6px);
  background: rgba(20, 22, 31, 0.92);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 12px;
  z-index: 70;
  max-width: 86vw;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 登录 ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 28px 20px; gap: 22px; max-width: 480px; margin: 0 auto; }
.brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.brand-mark { width: 58px; height: 58px; border-radius: 18px; font-size: 26px; }
.brand h1 { font-size: 24px; letter-spacing: 1px; }
.brand p { color: var(--muted); font-size: 13px; }
.auth-card { padding: 20px; }
.auth-card .hint { margin-top: 14px; font-size: 11.5px; color: var(--muted); line-height: 1.6; text-align: center; }
.auth-switch { margin: 4px 0 0; text-align: center; }
.auth-switch .link {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px;
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 22px 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.empty b { display: block; color: var(--ink-2); font-size: 14.5px; margin-bottom: 4px; }

/* ---------- 分段控件 ---------- */
.seg { display: flex; background: #eef0f7; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1;
  border: 0;
  background: none;
  padding: 8px 6px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.seg button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

/* ---------- 时间线 ---------- */
.tl-day { border-bottom: 1px dashed var(--line); padding: 11px 0; }
.tl-day:last-child { border-bottom: 0; }
.tl-date { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.tl-members { display: flex; flex-direction: column; gap: 7px; }
.tl-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.tl-row .name { width: 62px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.tl-row .tl-bar { flex: 1; height: 8px; border-radius: 999px; background: #eef0f7; overflow: hidden; }
.tl-row .tl-bar i { display: block; height: 100%; border-radius: 999px; }
.tl-row .num { width: 46px; text-align: right; color: var(--muted); font-size: 11.5px; flex: none; }

.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; padding: 0 1px; font-size: 15px; color: #d7dae6; line-height: 1; }
.stars button.on { color: #f5a623; }

/* ---------- 管理 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat { background: var(--card); border-radius: 14px; padding: 11px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 19px; letter-spacing: 0.2px; }
.stat span { font-size: 11px; color: var(--muted); }

/* 长文本换行，避免窄屏撑破卡片 */
.t,
.s { overflow-wrap: anywhere; }

/* 待办卡片：逐条快捷审批 */
.todo-item {
  padding: 10px 11px;
  border-radius: 14px;
  background: #fafbff;
  border: 1px solid rgba(232, 234, 242, 0.8);
}
.todo-item + .todo-item { margin-top: 8px; }
.todo-item .acts { display: flex; gap: 8px; margin-top: 9px; }
.todo-item .acts .mini {
  flex: 1;
  min-height: 40px;
  padding: 8px 0;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.todo-item .acts .mini.ok {
  color: #0b7a58;
  background: var(--free-soft);
  border-color: rgba(16, 185, 129, 0.3);
}

@media (min-width: 700px) {
  .view { padding: 20px 24px 32px; }
  .app { max-width: 640px; }
  body { background: #eef0f7; }
  .card { box-shadow: var(--shadow); }
}

/* 强制改密遮罩 */
.gate-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 18, 30, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fade 0.18s ease;
  overflow-y: auto;
}
.gate-card {
  width: 100%;
  max-width: 380px;
  padding: 22px 18px 18px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
}
.gate-card h2 { font-size: 18px; }
.gate-card .brand-mark { width: 42px; height: 42px; }

/* 备份文件选择 */
input[type="file"] {
  width: 100%;
  border: 1px dashed var(--line);
  background: #fbfcff;
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 13px;
}
input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* 无障碍：键盘焦点可见、尊重系统减弱动效设置 */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
