:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1c2433;
  --muted: #7c879a;
  --line: #e6eaf2;
  --brand: #0b6e99;
  --brand2: #0e8aa8;
  --ok: #1f9d55;
  --warn: #d97706;
  --risk: #dc2626;
  --chip: #eaf3f8;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55;
  padding-bottom: 84px;
}
.topbar { background: linear-gradient(120deg, var(--brand), var(--brand2)); color: #fff; padding: 16px 16px 12px; }
.brand { font-size: 17px; font-weight: 700; }
.sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.tabbar {
  display: flex; position: sticky; top: 0; z-index: 5; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.tab {
  flex: 1; border: none; background: none; padding: 13px 0; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
main { padding: 12px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(20,30,50,.04);
}
.card h4 { margin: 0 0 6px; font-size: 15.5px; }
.meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions { margin-top: 8px; display: flex; gap: 8px; }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--brand); }
.chip.ok { background: #e6f6ec; color: var(--ok); }
.chip.warn { background: #fdf0dc; color: var(--warn); }
.chip.risk { background: #fdeaea; color: var(--risk); }
.btn {
  border: none; border-radius: 9px; padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.btn.ghost { background: #eef1f6; color: var(--muted); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.danger { background: #fdeaea; color: var(--risk); }
.fab {
  position: fixed; right: 18px; bottom: 22px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 28px; line-height: 54px; text-align: center;
  box-shadow: 0 4px 14px rgba(11,110,153,.4); cursor: pointer; z-index: 9;
}
.sheet { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: flex-end; z-index: 20; }
.sheet[hidden] { display: none; }
.sheet-card { background: #fff; width: 100%; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }
.sheet-card h3 { margin: 0 0 12px; }
.sheet-card input, .sheet-card textarea, .sheet-card select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 10px;
  font-size: 15px; font-family: inherit; background: #fbfcfe; color: var(--ink);
}
.sheet-card textarea { min-height: 84px; resize: vertical; }
.check-row { display: flex; gap: 8px; }
.check-row label { flex: 1; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.check-row input, .check-row select { margin-bottom: 0; }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; padding: 12px; }
.settings-card textarea { min-height: 120px; }
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #1c2433; color: #fff;
  padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 30;
}
.toast[hidden] { display: none; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.board-col { margin-bottom: 14px; }
.board-col h3 { font-size: 14px; margin: 6px 2px; color: var(--brand); }
.kpi { display: flex; gap: 10px; margin-bottom: 12px; }
.kpi .box { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.kpi .num { font-size: 22px; font-weight: 700; color: var(--brand); }
.kpi .lbl { font-size: 11px; color: var(--muted); }
