﻿:root {
  --bg: #eef3f0;
  --surface: #ffffff;
  --surface-2: #f6f9f7;
  --ink: #12211b;
  --muted: #5d6f67;
  --line: #d9e3de;
  --brand: #0f5c46;
  --brand-2: #147a5c;
  --brand-soft: #e3f1ea;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #b54708;
  --warn-soft: #fef3e2;
  --info: #1d4ed8;
  --info-soft: #e8eefc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 6px 18px rgba(16, 40, 30, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

#app { min-height: 100%; max-width: 680px; margin: 0 auto; background: var(--surface); }
@media (min-width: 720px) {
  body { background: #e4ebe7; }
  #app { box-shadow: 0 0 0 1px var(--line); min-height: 100vh; }
}

.screen { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.topbar-brand {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
}
.topbar-text { min-width: 0; flex: 1; }
.topbar-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.topbar-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; }

.back-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  cursor: pointer; padding: 0;
}
.back-btn:active { background: var(--surface-2); }

/* ---------- 内容 ---------- */
.content { flex: 1; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.content.no-tabs { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 680px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
}
.tabbar.three { grid-template-columns: repeat(3, 1fr); }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; border-radius: 10px; color: var(--muted);
  font-size: 11px; font-weight: 500;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--brand); background: var(--brand-soft); }

/* ---------- 卡片与列表 ---------- */
.section { margin-bottom: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.section-title { margin: 0; font-size: 15px; font-weight: 700; }
.section-link { font-size: 13px; color: var(--brand); font-weight: 600; }

.card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 10px; }

.task-card:active { background: var(--surface-2); }
.task-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.task-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.task-meta b { color: var(--ink); font-weight: 600; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--muted);
  white-space: nowrap;
}
.chip.type { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.chip.urgent { background: var(--danger-soft); border-color: transparent; color: var(--danger); }

.status { margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st-pending { background: var(--warn-soft); color: var(--warn); }
.st-accepted { background: var(--info-soft); color: var(--info); }
.st-submitted { background: #f3e8ff; color: #7e22ce; }
.st-completed { background: #e7f6ec; color: #15803d; }

.overdue-text { color: var(--danger); font-weight: 600; }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 6px; text-align: center; box-shadow: var(--shadow);
}
.stat-num { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat.warn .stat-num { color: var(--warn); }
.stat.danger .stat-num { color: var(--danger); }
.stat.done .stat-num { color: #15803d; }

.greeting { margin: 2px 0 16px; }
.greeting h1 { margin: 0; font-size: 21px; font-weight: 700; }
.greeting p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  font-size: 16px; outline: none; appearance: none;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20, 122, 92, .12); }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5 8 5 5 5-5' stroke='%235d6f67' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 38px;
}
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.error-text { color: var(--danger); font-size: 13px; margin-top: 8px; }

.segmented { display: grid; grid-auto-flow: column; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.seg { border: 0; background: transparent; border-radius: 9px; padding: 10px 8px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg.active { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(16, 40, 30, .12); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 16px; border-radius: 12px;
  border: 1px solid transparent; background: var(--surface-2); color: var(--ink);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { background: #0b4a38; }
.btn-outline { background: var(--surface); border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: 13.5px; border-radius: 10px; }

/* ---------- 筛选 ---------- */
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.chip-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.seg-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.seg-tab { border: 0; background: none; padding: 10px 4px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.seg-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--muted); padding: 36px 16px; font-size: 14px; }
.empty-icon { font-size: 30px; margin-bottom: 8px; }

/* ---------- 详情 ---------- */
.detail-title { margin: 4px 0 8px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.detail-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.info-grid { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.info-row { display: flex; gap: 12px; padding: 11px 14px; font-size: 14px; }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-row dt { flex: none; width: 76px; color: var(--muted); margin: 0; }
.info-row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.desc { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.65; margin: 10px 0 0; }

.members { display: flex; flex-direction: column; gap: 8px; }
.member { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
  font-size: 14px; font-weight: 700;
}
.member-name { font-weight: 600; font-size: 14px; }
.member-role { font-size: 12px; color: var(--muted); }
.member-kind { margin-left: auto; font-size: 11.5px; color: var(--muted); }

.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.evidence-item { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.evidence-thumb { display: block; width: 100%; height: 96px; object-fit: cover; }
.file-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 96px; padding: 6px; text-align: center; }
.file-tile .ext { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; }
.file-tile .fname { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.evidence-name { font-size: 10.5px; color: var(--muted); padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.tl-item { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--line); margin-left: 5px; }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); }
.tl-action { font-size: 14px; font-weight: 600; }
.tl-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.tl-note { font-size: 13px; margin-top: 4px; background: var(--surface-2); border-radius: 8px; padding: 6px 9px; white-space: pre-wrap; }

/* ---------- 底部操作条 ---------- */
.actionbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 680px;
  display: flex; gap: 10px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.actionbar .btn { flex: 1; }

/* ---------- 弹层 ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(9, 24, 18, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 680px; max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  animation: sheet-in .16s ease-out;
}
@keyframes sheet-in { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-title { margin: 0; font-size: 17px; font-weight: 700; }
.sheet-close { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.sheet-foot { display: flex; gap: 10px; margin-top: 18px; }
.sheet-foot .btn { flex: 1; }

.check-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.check-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface);
}
.check-item input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.check-item .check-name { font-weight: 600; font-size: 14px; }
.check-item .check-sub { font-size: 12px; color: var(--muted); }

/* ---------- 登录 ---------- */
.login {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 28px 22px; background: linear-gradient(160deg, #0c4636 0%, #0f5c46 55%, #147a5c 100%);
}
.login-card { width: 100%; max-width: 420px; margin: 0 auto; }
.login-brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 26px; }
.login-mark { width: 46px; height: 46px; border-radius: 13px; background: #fff; display: grid; place-items: center; color: var(--brand); font-size: 20px; font-weight: 800; }
.login-brand h1 { margin: 0; font-size: 21px; }
.login-brand p { margin: 2px 0 0; font-size: 12.5px; opacity: .75; }
.login-box { background: #fff; border-radius: 18px; padding: 22px 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.login-box h2 { margin: 0 0 4px; font-size: 18px; }
.login-box .sub { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.login-foot { text-align: center; color: rgba(255, 255, 255, .7); font-size: 12px; margin-top: 18px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; top: 14px; left: 50%; transform: translate(-50%, -20px);
  z-index: 80; background: rgba(18, 33, 27, .94); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: all .18s ease;
  max-width: min(88vw, 560px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- 个人完成量 ---------- */
.month-card {
  border-radius: 18px; padding: 18px 16px;
  background: linear-gradient(150deg, #0f5c46 0%, #147a5c 100%);
  color: #fff; box-shadow: 0 10px 24px rgba(15, 92, 70, .22);
}
.month-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; opacity: .85; }
.month-title { font-weight: 700; letter-spacing: .02em; }
.month-period { font-size: 12px; }
.month-big { font-size: 46px; font-weight: 800; line-height: 1.05; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.month-big span { font-size: 14px; font-weight: 600; margin-left: 5px; opacity: .8; }
.month-sub { font-size: 13px; opacity: .9; }
.month-chart-label { margin-top: 16px; font-size: 12px; opacity: .72; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 124px; margin-top: 6px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.chart-value { font-size: 11px; height: 14px; opacity: .9; font-variant-numeric: tabular-nums; }
.chart-slot { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.chart-bar { width: 100%; background: rgba(255, 255, 255, .92); border-radius: 5px 5px 2px 2px; min-height: 3px; }
.chart-bar.zero { background: rgba(255, 255, 255, .28); }
.chart-label { font-size: 10.5px; opacity: .75; white-space: nowrap; }
.month-rank { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 12px; opacity: .88; }

/* ---------- 任务性质 / 抢单 ---------- */
.chip.overtime { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.chip.grab { background: #eef2ff; border-color: transparent; color: #4338ca; }

/* ---------- 区队工作量 ---------- */
.admin-entry { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.admin-entry:active { background: var(--surface-2); }
.chevron { margin-left: auto; color: var(--muted); font-size: 22px; line-height: 1; }
.month-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.month-switch-label { font-size: 15px; font-weight: 700; }
.workload-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.rank-badge {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--surface-2); color: var(--muted);
}
.rank-badge.top { background: var(--brand-soft); color: var(--brand); }
.workload-main { flex: 1; min-width: 0; }
.workload-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.workload-name { font-weight: 700; }
.workload-count { margin-left: auto; font-weight: 700; color: var(--brand); white-space: nowrap; }
.workload-bar { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.workload-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }

/* ---------- 后台管理 ---------- */
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- 任务进度 ---------- */
.progress-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); transition: width .2s ease; }
.mini-progress { height: 6px; margin-top: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mini-progress span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }

/* ---------- 新增：撤回/搜索/评论/画像 ---------- */
.st-cancelled { background: var(--surface-2); color: var(--muted); }
.tab { position: relative; }
.tab-badge {
  position: absolute; top: 2px; right: 50%; transform: translateX(18px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: #dc2626; color: #fff; font-size: 10px; line-height: 16px;
  text-align: center; font-weight: 700;
}
.search-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.search-input {
  flex: 1; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); font-size: 15px; outline: none;
}
.search-input:focus { border-color: var(--brand-2); }
.filter-count { font-size: 11px; color: var(--brand); font-weight: 700; margin-left: 4px; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.comment-name { font-weight: 700; }
.comment-text { font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.comment-del { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form .textarea { min-height: 48px; }
.dimension { margin-bottom: 12px; }
.dimension-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.dimension-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.dimension-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.dim-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; margin: 0 6px 6px 0; background: var(--brand-soft); color: var(--brand); }
.dim-tag.warn { background: var(--warn-soft); color: var(--warn); }
.group-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.group-name { font-weight: 700; }
.group-meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.profile-hero { text-align: center; padding: 18px; }
.profile-score { font-size: 44px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.profile-level { font-weight: 700; margin-top: 2px; }
.profile-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.evidence-del {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(18, 33, 27, .7); color: #fff; font-size: 15px; line-height: 22px;
  padding: 0; cursor: pointer;
}

/* ---------- 工作量建议 ---------- */
.suggestion-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; text-align: center; }
.suggestion-grid > div { background: var(--surface-2); border-radius: 10px; padding: 8px 4px; }
.suggestion-grid b { display: block; font-size: 20px; color: var(--brand); line-height: 1.2; }
.suggestion-grid span { font-size: 11.5px; color: var(--muted); }
.hazard-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.hazard-list .check-item { padding: 8px 10px; }

/* ---------- 矿派：首页 Hero 与视觉优化 ---------- */
.home-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 18px 16px 16px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%),
    linear-gradient(150deg, #0b4a38 0%, #0f5c46 52%, #147a5c 100%);
  box-shadow: 0 14px 30px rgba(15, 92, 70, .22);
}
.home-hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; opacity: .9; }
.home-hero-top span:first-child { font-size: 20px; font-weight: 700; opacity: 1; }
.home-hero-sub { margin-top: 3px; font-size: 13px; opacity: .78; }
.home-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.home-metrics a {
  display: block; padding: 9px 4px; text-align: center; color: #fff;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px; backdrop-filter: blur(4px);
}
.home-metrics b { display: block; font-size: 21px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.home-metrics span { display: block; margin-top: 2px; font-size: 11px; opacity: .82; }

.section-title { display: flex; align-items: center; gap: 8px; }
.section-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
}

.task-card { border-left: 3px solid var(--line); }
.task-card[data-status="open"] { border-left-color: #0891b2; }
.task-card[data-status="pending"] { border-left-color: #d97706; }
.task-card[data-status="accepted"] { border-left-color: #2563eb; }
.task-card[data-status="submitted"] { border-left-color: #7e22ce; }
.task-card[data-status="completed"] { border-left-color: #15803d; }
.task-card[data-status="cancelled"] { border-left-color: #9ca3af; }

@media (min-width: 900px) {
  #app { max-width: 900px; }
  .tabbar, .actionbar { max-width: 900px; }
  .content { padding: 22px 28px calc(100px + env(safe-area-inset-bottom)); }
  .topbar { padding-left: 24px; padding-right: 24px; }
}

/* ---------- 内置使用教程 ---------- */
.help-hero {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(150deg, #0b4a38, #147a5c);
  color: #fff;
}
.help-hero h2 { margin: 0 0 10px; font-size: 18px; }
.help-steps { margin: 0; padding-left: 20px; }
.help-steps li { margin: 6px 0; font-size: 13.5px; line-height: 1.6; opacity: .95; }
.help-item {
  margin-bottom: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.help-item summary {
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}
.help-item[open] summary::before { content: "−"; }
.help-body { padding-top: 10px; }
.help-body p { margin: 6px 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.help-body ul { margin: 6px 0; padding-left: 18px; }
.help-body li { margin: 5px 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.help-entry { display: flex; align-items: center; gap: 12px; }
.help-entry-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: 18px;
}

@media print {
  body { background: #fff; }
  .topbar, .back-btn, .tabbar, .toast, #printHelp { display: none !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .help-item { break-inside: avoid; border-color: #bbb; }
  .help-hero { color: #000; background: #eee; }
  .help-steps li, .help-body p, .help-body li { color: #222; }
}

/* ---------- 批量验收 ---------- */
.batch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.batch-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; cursor: pointer; }
.batch-row input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.batch-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- 验收评分与说明模板 ---------- */
.score-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.score-btn {
  padding: 9px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.score-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.desc-templates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.desc-templates .chip { border: 0; cursor: pointer; background: var(--brand-soft); color: var(--brand); }

/* ---------- 任务风险辨识 ---------- */
.risk-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.risk-low { background: #e8f5ec; color: #15803d; }
.risk-medium { background: #fff4e5; color: #b45309; }
.risk-high { background: #fdecea; color: #b42318; }
.risk-major { background: #7f1d1d; color: #fff; }
.chip.risk-high, .chip.risk-major { background: #fdecea; color: #b42318; }
.risk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.risk-list { display: grid; gap: 8px; }
.risk-item { padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--line); }
.risk-item.risk-high { border-left-color: #d92d20; background: #fff7f6; }
.risk-item.risk-major { border-left-color: #7f1d1d; background: #fff1f0; }
.risk-item.risk-medium { border-left-color: #d97706; background: #fffaf2; }
.risk-item.risk-low { border-left-color: #15803d; }
.risk-item-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.risk-item-head span { color: var(--muted); font-size: 12px; }
.risk-item-detail { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.permit-chip { display: inline-block; padding: 2px 7px; margin: 2px 0; border-radius: 6px; background: #fef3e2; color: #b45309; font-size: 12px; }

/* ---------- 煤矿作业风险库 ---------- */
.risk-lib-search { margin-bottom: 10px; }
.risk-lib-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.risk-lib-chips .chip { flex: none; border: 0; cursor: pointer; }
.risk-lib-chips .chip.active { background: var(--brand); color: #fff; }

/* ---------- 派发页风险预判 ---------- */
.risk-preview { margin: 0 0 14px; padding: 11px 13px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.risk-preview-low { border-left-color: #15803d; }
.risk-preview-medium { border-left-color: #d97706; }
.risk-preview-high { border-left-color: #d92d20; background: #fff8f7; }
.risk-preview-major { border-left-color: #7f1d1d; background: #fff3f2; }
.risk-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.risk-preview-list { margin: 4px 0 6px; padding-left: 18px; }
.risk-preview-list li { margin: 3px 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
