:root {
  --brand: #c8281f;
  --brand-dark: #a01b14;
  --brand-soft: #fdecea;
  --ink: #16181c;
  --ink-2: #565c64;
  --ink-3: #878e96;
  --line: rgba(60, 64, 67, .12);
  --line-soft: rgba(60, 64, 67, .07);
  --bg: #f5f6f8;
  --card: #ffffff;
  --ok: #17803d;
  --ok-soft: #e6f6ec;
  --warn: #b25c00;
  --warn-soft: #fff3e2;
  --danger: #c0281f;
  --danger-soft: #fdecea;
  --radius: 16px;
  --shadow: 0 1px 1px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --shadow-lift: 0 2px 4px rgba(16, 24, 40, .06), 0 14px 34px rgba(16, 24, 40, .10);
  --ease: cubic-bezier(.25, .72, .32, 1);
  --spring: cubic-bezier(.34, 1.35, .5, 1);
  --press: scale(.97);
}

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

html { height: -webkit-fill-available; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

.hidden { display: none !important; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection { background: rgba(200, 40, 31, .16); }

/* ---------- 启动 ---------- */
.boot {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; color: var(--ink-3);
  animation: pulse 1.2s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: .45; } to { opacity: 1; } }

/* ---------- 登录 / 绑定 ---------- */
.auth {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 20px 40px;
  background: radial-gradient(120% 80% at 50% 0%, #fff1ef 0%, var(--bg) 60%);
  animation: auth-in .4s var(--ease) both;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .logo {
  display: block; width: 60px; height: 60px; margin: 0 auto 16px;
  border-radius: 17px; object-fit: cover;
  box-shadow: 0 12px 28px rgba(200, 40, 31, .30);
  animation: logo-in .5s var(--spring) both;
}
@keyframes logo-in { from { opacity: 0; transform: scale(.7) translateY(8px); } to { opacity: 1; transform: none; } }
.auth-brand h1 { margin: 0; font-size: 22px; font-weight: 680; letter-spacing: -.3px; }
.auth-brand p { margin: 6px 0 0; color: var(--ink-3); font-size: 13px; }

.auth-card {
  width: 100%; max-width: 380px;
  background: var(--card); border-radius: 22px; padding: 22px 20px 18px;
  box-shadow: var(--shadow-lift);
  animation: card-in .45s var(--ease) .08s both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 13px; background: #f9fafb;
  outline: none; transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3.5px rgba(200, 40, 31, .12);
}
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.field-error { color: var(--danger); font-size: 12.5px; min-height: 0; margin: -4px 0 8px; }
.field-error:empty { display: none; }
.hint { text-align: center; color: var(--ink-3); font-size: 12px; margin: 12px 0 0; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid transparent; border-radius: 13px;
  padding: 0 16px; height: 46px; font-weight: 570;
  background: #f1f2f4; color: var(--ink);
  cursor: pointer; user-select: none;
  transition: transform .16s var(--spring), background .18s var(--ease), opacity .18s, box-shadow .18s var(--ease);
}
.btn:hover { filter: brightness(.985); }
.btn:active { transform: var(--press); filter: brightness(.94); transition-duration: .06s; }
.btn.block { width: 100%; }
.btn.primary { background: linear-gradient(180deg, #d03027, #bb241b); color: #fff; box-shadow: 0 6px 16px rgba(200, 40, 31, .26), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { filter: brightness(1.04); }
.btn.primary:active { background: var(--brand-dark); box-shadow: 0 2px 8px rgba(200, 40, 31, .22); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn.tiny { height: 33px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.danger:active { background: #f9d9d6; }
.btn.ok { background: var(--ok-soft); color: var(--ok); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.ghost.code-sent { color: var(--ink-3); }

/* ---------- 主框架 ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 76px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px;
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}
.topbar-main { flex: 1; min-width: 0; }
.topbar-title { font-size: 17.5px; font-weight: 680; letter-spacing: -.3px; }
.topbar-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { flex: 1; padding: 14px 16px 8px; max-width: 780px; width: 100%; margin: 0 auto; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: stretch;
  background: rgba(255, 255, 255, .82);
  border-top: 1px solid var(--line-soft);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 -1px 0 rgba(16, 24, 40, .02);
}
.tabbar button {
  flex: 1; border: 0; background: none; padding: 9px 0 10px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-3); font-size: 11.5px; cursor: pointer;
  transition: color .2s var(--ease), transform .16s var(--spring);
}
.tabbar button:active { transform: scale(.92); }
.tabbar button.active { color: var(--brand); font-weight: 600; }
.tabbar button.active .ico { transform: scale(1.08); }
.tabbar .ico { font-size: 18px; line-height: 1; transition: transform .2s var(--spring); }

/* ---------- 页面切换入场 ---------- */
.page-enter > * { animation: rise .34s var(--ease) both; }
.page-enter > *:nth-child(1) { animation-delay: 0ms; }
.page-enter > *:nth-child(2) { animation-delay: 26ms; }
.page-enter > *:nth-child(3) { animation-delay: 52ms; }
.page-enter > *:nth-child(4) { animation-delay: 78ms; }
.page-enter > *:nth-child(5) { animation-delay: 100ms; }
.page-enter > *:nth-child(6) { animation-delay: 118ms; }
.page-enter > *:nth-child(7) { animation-delay: 134ms; }
.page-enter > *:nth-child(8) { animation-delay: 148ms; }
.page-enter > *:nth-child(n+9) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 通用块 ---------- */
.section-title { font-size: 13px; color: var(--ink-3); margin: 18px 2px 8px; font-weight: 500; }
.section-title:first-child { margin-top: 4px; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 16px; margin-bottom: 10px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
button.card, .task { transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.task:active { transform: scale(.985); box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 4px; }
.stat {
  background: var(--card); border-radius: 14px; padding: 13px 8px; text-align: center;
  box-shadow: var(--shadow); transition: transform .18s var(--spring);
}
.stat:active { transform: scale(.96); }
.stat b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--ink-3); }
.stat.is-warn b { color: var(--warn); }
.stat.is-ok b { color: var(--ok); }
/* 待审核：数字与文字统一走品牌红，便于总部一眼看到积压（2026-11-16） */
.stat.is-submitted b { color: var(--danger); }
.stat.is-submitted span { color: var(--danger); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 7px 15px; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: transform .16s var(--spring), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.chip:hover { border-color: rgba(60, 64, 67, .22); }
.chip:active { transform: var(--press); }
.chip.active {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 570;
  box-shadow: 0 4px 12px rgba(200, 40, 31, .24);
}
/* 「待审核」筛选按钮：未选中时文字用红色（选中态仍是红底白字）（2026-11-16） */
.chip[data-filter="submitted"]:not(.active) { color: var(--danger); }

select.chip { -webkit-appearance: none; appearance: none; }

/* ---------- 任务卡 ---------- */
.task { position: relative; }
.task-head { display: flex; align-items: flex-start; gap: 10px; }
.task-title { flex: 1; font-size: 15.5px; font-weight: 620; line-height: 1.4; letter-spacing: -.1px; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.task-body { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.task-foot .spacer { flex: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-weight: 570;
}
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.submitted { background: #eaf1ff; color: #1b4fd8; }
.badge.approved { background: var(--ok-soft); color: var(--ok); }
.badge.rejected { background: var(--danger-soft); color: var(--danger); }

/* 驳回原因醒目横幅：首页任务卡片 + 详情弹窗共用（2026-11-13） */
.reject-banner {
  margin: 10px 0 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--danger-soft);
  border: 1px solid rgba(192, 40, 31, .28);
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}
.reject-banner::before { content: ''; display: block; height: 0; }
.badge.late { background: #f0eaff; color: #6b3dd6; }

.empty { text-align: center; color: var(--ink-3); padding: 52px 20px; font-size: 13.5px; }
.empty .big { font-size: 36px; margin-bottom: 10px; opacity: .55; }

/* ---------- 表单 ---------- */
.form-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.task-examples[hidden] { display: none; }
.task-examples { border-top: 1px solid var(--line); padding-top: 14px; }
.example-count { color: var(--brand); margin-left: 6px; font-weight: 500; }
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; margin-top: 10px; }
.example-slot { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfcfd; }
.example-title { font-size: 13px; font-weight: 650; margin-bottom: 8px; overflow-wrap: anywhere; }
.example-empty { display: grid; place-items: center; min-height: 112px; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 8px; font-size: 12px; }
.example-preview { display: block; width: 100%; height: 112px; border: 0; border-radius: 8px; padding: 0; overflow: hidden; background: #f0f1f3; cursor: zoom-in; }
.example-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.example-filename { font-size: 11px; color: var(--ink-3); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.example-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.task-example-area { margin: 14px 0; }
.task-example-area h4 { font-size: 14px; margin: 0; }
.example-saved { width: 100%; height: 130px; aspect-ratio: auto; }
.thumb.example-saved img { object-fit: contain; }
.form-row { margin-bottom: 14px; }
.form-row > label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.form-row input[type=text], .form-row input[type=date], .form-row input[type=number], .form-row textarea, .form-row select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #f9fafb;
  padding: 11px 13px; outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.form-row textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3.5px rgba(200, 40, 31, .10);
}
.form-row .sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.store-picker { border: 1px solid var(--line); border-radius: 12px; max-height: 240px; overflow: auto; background: #fff; -webkit-overflow-scrolling: touch; }
.store-picker .row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-size: 14px; transition: background .15s; }
.store-picker .row:hover { background: #fafbfc; }
.store-picker .row:last-child { border-bottom: 0; }
.store-picker .row.region { background: #fafbfc; color: var(--ink-3); font-size: 12px; padding: 5px 12px; font-weight: 600; }
.store-picker input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.picker-tools { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

/* ---------- 图片 ---------- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 10px; }
.thumb {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eef0f3;
  animation: thumb-in .3s var(--spring) both;
}
@keyframes thumb-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s var(--ease); }
.thumb:hover img { transform: scale(1.04); }
.thumb .del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
  transition: transform .15s var(--spring), background .15s;
}
.thumb .del:active { transform: scale(.85); background: rgba(0, 0, 0, .75); }
.uploader {
  margin-top: 10px; border: 1.5px dashed #d3d8de; border-radius: 14px;
  padding: 20px 12px; text-align: center; color: var(--ink-3); font-size: 13px; cursor: pointer;
  background: #f9fafb;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .16s var(--spring);
}
.uploader:hover { border-color: #b9bfc6; }
.uploader:active { background: #f2f3f5; transform: var(--press); }
.uploader .ico { font-size: 22px; display: block; margin-bottom: 4px; }
/* 透明文件输入框铺满上传区：点击直接落在 input 上，不依赖 JS 触发（兼容企微内置浏览器） */
.uploader { position: relative; overflow: hidden; }
.uploader input[type='file'] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; padding: 0; border: 0; cursor: pointer; z-index: 2;
}

/* ---------- 整改前 / 整改后 对比 ---------- */
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); padding: 7px 0; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.ba-upload { display: grid; gap: 12px; margin-top: 10px; }
.ba-block { border: 1px solid var(--line, #e6e9ee); border-radius: 14px; padding: 10px 12px 12px; background: #fbfcfd; }
.ba-label { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ba-label span { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.ba-label.before { color: #c0392b; }
.ba-label.after { color: #1e874b; }
.ba-list { display: grid; gap: 10px; margin-top: 10px; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ba-cell { display: grid; gap: 6px; }
.ba-empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; color: var(--ink-3); }
.thumb-empty { margin-top: 10px; padding: 18px; text-align: center; font-size: 13px; color: var(--ink-3); background: #f7f8fa; border-radius: 12px; }
.thumb.kept { outline: 2px solid #cfe3d6; outline-offset: -2px; }
.kept-tag {
  position: absolute; left: 4px; bottom: 4px; z-index: 2;
  background: rgba(30, 135, 75, .9); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 6px;
}
/* 一级页面卡片上的前后对比小图 */
.card-ba {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px;
  padding-top: 9px; border-top: 1px dashed var(--line, #e9ecf0);
}
.card-ba-col { display: grid; gap: 5px; min-width: 0; }
.card-ba-tag { font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.card-ba-tag.before { color: #c0392b; }
.card-ba-tag.after { color: #1e874b; }
.card-ba-imgs { display: flex; gap: 5px; }
.card-ba-imgs .mini {
  width: 56px; height: 56px; border-radius: 9px; overflow: hidden; flex: none;
  background: #eef0f3; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink-3);
}
.card-ba-imgs .mini img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.card-ba-imgs .mini.more { background: #f3f5f8; font-weight: 600; }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal-mask {
  position: absolute; inset: 0; background: rgba(14, 17, 22, .44);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: mask-in .22s var(--ease) both;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.modal-body {
  position: relative; width: 100%; max-width: 620px; max-height: 88vh; overflow: auto;
  background: var(--card); border-radius: 22px 22px 0 0; padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 44px rgba(16, 24, 40, .20);
  animation: sheet-up .32s var(--spring) both;
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
.modal.closing .modal-mask { animation: mask-out .2s var(--ease) both; }
.modal.closing .modal-body { animation: sheet-down .2s var(--ease) both; }
@keyframes mask-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes sheet-down { from { transform: none; opacity: 1; } to { transform: translateY(30%); opacity: .3; } }
@media (min-width: 640px) {
  .modal { align-items: center; }
  .modal-body { border-radius: 22px; max-height: 82vh; animation: sheet-pop .28s var(--spring) both; }
  .modal.closing .modal-body { animation: sheet-pop-out .18s var(--ease) both; }
  @keyframes sheet-pop { from { transform: scale(.92) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes sheet-pop-out { from { transform: none; opacity: 1; } to { transform: scale(.94); opacity: 0; } }
}
.modal h3 { margin: 0 0 4px; font-size: 17.5px; font-weight: 680; letter-spacing: -.2px; }
.modal .m-sub { color: var(--ink-3); font-size: 12.5px; margin-bottom: 14px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: #f1f2f4; color: var(--ink-2); font-size: 15px; cursor: pointer;
  transition: transform .16s var(--spring), background .15s;
}
.modal-close:active { transform: scale(.88); background: #e7e8ea; }
.kv { display: flex; gap: 10px; font-size: 13.5px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink-3); width: 76px; flex: none; }
.kv .v { flex: 1; white-space: pre-wrap; word-break: break-word; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: rgba(22, 24, 28, .92); color: #fff; padding: 11px 19px; border-radius: 999px;
  font-size: 13.5px; z-index: 90; max-width: 86vw; text-align: center;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: toast-in .32s var(--spring) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.92); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .name { font-size: 14.5px; font-weight: 570; }
.list-row .meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.code-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  background: #f4f5f7; border-radius: 8px; padding: 4px 8px; letter-spacing: .5px; color: var(--ink-2);
}
.role-tag {
  flex: none; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px;
  background: #eef4ff; color: #2f6bdb;
}
.role-tag.hq { background: #fdeeea; color: #c8281f; }
.role-tag.wait { background: #fff6e6; color: #b7791f; }
.staff-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 10px; }
.staff-head .section-title { padding: 0; }

/* ---------- 图片全屏预览 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(8, 10, 14, .93);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: lb-in .22s var(--ease) both;
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 96vw; max-height: 96vh; object-fit: contain; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: lb-zoom .28s var(--spring) both;
}
@keyframes lb-zoom { from { transform: scale(.88); opacity: 0; } to { transform: none; opacity: 1; } }
.thumb img { cursor: zoom-in; }

/* ---------- 时间选择优化 ---------- */
.dt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) {
  #new-task-form .dt-grid { grid-template-columns: minmax(0, 1fr); }
}
.dt-box {
  background: #f9fafb; border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px 9px;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.dt-box:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3.5px rgba(200, 40, 31, .10); }
.dt-label { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); margin-bottom: 5px; font-weight: 570; }
.dt-box input { width: 100%; border: 0; background: none; padding: 0; font-size: 14px; font-weight: 570; color: var(--ink); outline: none; font-family: inherit; }
.quick-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.quick-row .chip { padding: 5px 12px; font-size: 12px; }

/* ---------- 任务搜索 ---------- */
.search-row { padding: 2px 0 10px; }
.search-row input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 13px;
  background: #f9fafb; padding: 11px 14px;
  font-size: 14.5px; color: var(--ink); outline: none; font-family: inherit;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.search-row input::placeholder { color: #9aa0a6; }
.search-row input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3.5px rgba(200, 40, 31, .10); }
.search-row input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- 无障碍 / 降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 卡片内嵌返图 ---------- */
.card-thumbs { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); margin-top: 10px; }
.card-thumbs .thumb { border-radius: 10px; }

/* ---------- 电脑端左侧导航（参考有赞后台） ---------- */
.app { display: flex; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar { display: none; }

@media (min-width: 900px) {
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; top: 0; bottom: 0; left: 0; width: 224px;
    background: #fff; border-right: 1px solid var(--line-soft);
    padding: 18px 12px 14px; z-index: 30; overflow-y: auto;
  }
  .shell-main { margin-left: 224px; }
  .app { padding-bottom: 0; }
  .tabbar { display: none; }
  .topbar { border-radius: 0; }
  .main { max-width: 860px; padding: 20px 24px 24px; }
}

.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.side-logo {
  flex: none; width: 40px; height: 40px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 6px 14px rgba(200, 40, 31, .28);
}
.side-brand-txt b { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.2px; }
.side-brand-txt span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.side-group { font-size: 11.5px; color: var(--ink-3); padding: 14px 10px 6px; font-weight: 600; letter-spacing: .3px; }
.side-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 0; background: none; cursor: pointer; text-align: left;
  padding: 9px 10px; border-radius: 10px; margin-bottom: 2px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: background .16s var(--ease), color .16s var(--ease), transform .14s var(--spring);
}
.side-item .si { font-size: 16px; width: 22px; text-align: center; }
.side-item:hover { background: #f4f5f7; color: var(--ink); }
.side-item:active { transform: scale(.98); }
.side-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 620; }
.side-item.active .si { filter: none; }
.side-soon {
  margin-left: auto; font-size: 10px; font-weight: 600;
  background: #f1f2f4; color: var(--ink-3); border-radius: 6px; padding: 2px 6px;
}
.side-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 10.5px; color: #b3b9bf; border-top: 1px solid var(--line-soft); }

/* ---------- 业绩提报 ---------- */
.rp-row { display: grid; grid-template-columns: 1.7fr 1fr 1fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.rp-row input {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; background: #f9fafb; outline: none; font-size: 13.5px;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.rp-row input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(200, 40, 31, .10); }
.rp-head { margin-bottom: 6px; }
.rp-head span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; padding-left: 2px; }
.rp-del {
  width: 30px; height: 30px; border: 0; border-radius: 9px; background: #f1f2f4;
  color: var(--ink-3); cursor: pointer; font-size: 13px;
  transition: background .15s, color .15s, transform .14s var(--spring);
}
.rp-del:hover { background: var(--danger-soft); color: var(--danger); }
.rp-del:active { transform: scale(.88); }

/* ---------- 提报：文件上传 ---------- */
.rp-upload {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1.5px dashed #d6d9de; border-radius: 14px;
  padding: 26px 16px; cursor: pointer; text-align: center;
  background: #fafbfc;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .15s var(--spring);
}
.rp-upload:hover { border-color: var(--brand); background: #fff; }
.rp-upload:active { transform: scale(.985); }
.rp-up-ico { font-size: 30px; margin-bottom: 4px; }
.rp-upload b { font-size: 14.5px; font-weight: 620; color: var(--ink); }
.rp-upload span { font-size: 11.5px; color: var(--ink-3); max-width: 320px; line-height: 1.5; }

/* ---------- 提报：解析遮罩 ---------- */
.parse-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  backdrop-filter: blur(8px) saturate(160%);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .18s var(--ease);
}
.parse-box {
  background: #fff; border-radius: 18px; padding: 26px 28px;
  box-shadow: 0 18px 50px rgba(16, 20, 26, .14);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  max-width: 78vw;
}
.parse-box .pt { font-size: 14.5px; font-weight: 620; color: var(--ink); }
.parse-box .ps { font-size: 11.5px; color: var(--ink-3); text-align: center; line-height: 1.5; max-width: 240px; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid rgba(200, 40, 31, .18);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
  margin-bottom: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* 品类子任务标签网格 */
.subcat-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.subcat-grid .chip { font-size: 12px; padding: 4px 10px; border-radius: 14px; }
.task-subcats { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 6px; }
.task-subcats .code-tag { font-size: 10.5px; padding: 1px 7px; }
.kv .code-tag { margin: 1px 3px 1px 0; }

/* 品类子任务：按品类分块/分组 */
.cat-block .cat-title { font-size: 13px; font-weight: 650; margin-bottom: 6px; color: var(--ink); }
.cat-group { margin-bottom: 12px; }
.cat-head { font-size: 12.5px; font-weight: 650; margin: 8px 0 4px; }
.card-ba-cat { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.card-ba-catname {
  font-size: 11px; color: var(--ink-3); min-width: 60px; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 更多模块入口 */
.more-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; background: transparent; border: none;
  border-bottom: 1px solid var(--line, #eef1f5); text-align: left; cursor: pointer;
}
.more-item:last-child { border-bottom: none; }
.more-item:active { background: #f7f8fa; }
.mi-ico { font-size: 20px; }
.mi-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mi-txt b { font-size: 14.5px; color: var(--ink); }
.mi-txt span { font-size: 12px; color: var(--ink-3); }
.mi-arrow { color: var(--ink-3); font-size: 18px; }
