/* ============================================================
   一尺见学 · 分校区负责人月度绩效考核表 · 在线填报系统
   ============================================================ */

:root {
  --brand: #1f4e79;
  --brand-2: #2f6da8;
  --brand-soft: #eaf1f8;
  --ink: #14213d;
  --ink-2: #46536b;
  --ink-3: #7a8699;
  --line: #d3dbe6;
  --line-soft: #e8edf3;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ok: #1a7f5a;
  --ok-soft: #e6f5ee;
  --warn: #b06a00;
  --warn-soft: #fdf3e2;
  --danger: #b3261e;
  --danger-soft: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand-2); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.topbar .logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
}
.topbar .logo small {
  font-weight: 400;
  opacity: .75;
  font-size: 12px;
  margin-left: 8px;
}
.topbar .spacer { flex: 1; }
.topbar .who {
  font-size: 12.5px;
  opacity: .9;
  white-space: nowrap;
}

/* ---------- 布局 ---------- */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 16px 80px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.card > h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card > h2::before {
  content: "";
  width: 3px;
  height: 15px;
  background: var(--brand-2);
  border-radius: 2px;
}
.hint { color: var(--ink-3); font-size: 12.5px; }
.hint-warn { color: var(--warn); font-size: 12.5px; }
.hint-danger { color: var(--danger); font-size: 12.5px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand-2); color: var(--brand-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: #ecc9c6; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 4px 9px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 表单控件 ---------- */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.input, select.input, textarea.input {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  width: 100%;
  outline: none;
  transition: .15s;
}
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 109, 168, .12); }
.input[readonly], .input:disabled { background: #f6f8fa; color: var(--ink-2); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

/* ---------- 状态徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge.gray { background: #eef1f5; color: var(--ink-2); }
.badge.blue { background: var(--brand-soft); color: var(--brand); }
.badge.orange { background: var(--warn-soft); color: var(--warn); }
.badge.green { background: var(--ok-soft); color: var(--ok); }
.badge.red { background: var(--danger-soft); color: var(--danger); }

/* ---------- 步骤条 ---------- */
.stepper { display: flex; gap: 0; flex-wrap: wrap; margin: 4px 0 2px; }
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  font-size: 12.5px;
  color: var(--ink-3);
  position: relative;
}
.step .dot {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: #e7ebf1; color: var(--ink-3);
  flex: none;
}
.step.done { color: var(--ok); }
.step.done .dot { background: var(--ok); color: #fff; }
.step.current { color: var(--brand); font-weight: 700; }
.step.current .dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.step:not(:last-child)::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 1px; height: 18px; margin-top: -9px; background: var(--line);
}

/* ---------- 表格 ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; }
table.sheet {
  border-collapse: collapse;
  width: 100%;
  min-width: 1180px;
  background: #fff;
  font-size: 12.5px;
}
table.sheet th,
table.sheet td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  vertical-align: middle;
  word-break: break-word;
}
table.sheet thead th {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  text-align: center;
  padding: 9px 8px;
  white-space: nowrap;
}
table.sheet td.c-idx,
table.sheet td.c-num,
table.sheet td.c-weight,
table.sheet td.c-score { text-align: center; }
table.sheet td.c-dim { text-align: center; font-weight: 600; color: var(--ink); background: #fafbfd; }
table.sheet td.c-name { font-weight: 600; }
table.sheet td.c-src { color: var(--ink-2); font-size: 12px; }
table.sheet tr.subtotal td { background: #f7f9fc; font-weight: 700; color: var(--brand); }
table.sheet tr.section-title td { background: #f2f6fb; }
table.sheet tr.row-bonus td.c-score input { color: var(--ok); }
table.sheet tr.row-deduct td.c-score input { color: var(--danger); }

.score-input {
  width: 100%;
  min-width: 62px;
  text-align: center;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 4px;
  outline: none;
  background: #fff;
  color: var(--brand);
}
.score-input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 109, 168, .12); }
.score-input.err { border-color: var(--danger); background: var(--danger-soft); }
.score-input:disabled { background: #f6f8fa; color: var(--ink-2); border-color: var(--line-soft); }
select.score-input { padding: 5px 2px; }
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.score-input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.calc-val { font-weight: 700; color: var(--brand); font-size: 13.5px; }
.calc-val.big { font-size: 15px; }

/* 汇总区 */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.summary-box {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fbfcfe;
}
.summary-box .k { font-size: 12.5px; color: var(--ink-3); }
.summary-box .v { font-size: 22px; font-weight: 800; color: var(--brand); line-height: 1.25; }
.summary-box .v small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.summary-box.accent { background: var(--brand); border-color: var(--brand); }
.summary-box.accent .k { color: rgba(255, 255, 255, .78); }
.summary-box.accent .v { color: #fff; }
.summary-box.accent .v small { color: rgba(255, 255, 255, .7); }
.summary-box.ko { background: var(--danger-soft); border-color: #f0c9c6; }
.summary-box.ko .v { color: var(--danger); }

/* ---------- 等级对照 ---------- */
table.grades { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.grades th, table.grades td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
table.grades thead th { background: var(--brand-soft); color: var(--brand); }
table.grades tr.hit td { background: #fff7e6; font-weight: 700; color: var(--warn); }
table.grades td.g-name { font-weight: 600; white-space: nowrap; }
table.grades td.g-rule { white-space: nowrap; }

/* ---------- 说明 ---------- */
ol.notes { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 12.5px; }
ol.notes li { margin-bottom: 6px; }

/* ---------- 签字区 ---------- */
.sign-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sign-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 158px;
}
.sign-card.done { border-color: #b7ddca; background: #fbfefc; }
.sign-card.locked { background: #f8fafc; }
.sign-card .role { font-size: 12.5px; font-weight: 700; color: var(--brand); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sign-card .role .st { font-size: 11px; font-weight: 600; }
.sign-card .role .st.ok { color: var(--ok); }
.sign-card .role .st.no { color: var(--ink-3); }
.sign-box {
  flex: 1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fcfdfe;
  min-height: 74px;
  overflow: hidden;
  padding: 4px;
}
.sign-box img { max-width: 100%; max-height: 78px; display: block; }
.sign-box .empty { color: #b6bfcd; font-size: 12.5px; }
.sign-card .meta { font-size: 11.5px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 6px; }

/* ---------- 签名弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 33, 61, .48);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 620px;
  box-shadow: 0 24px 60px rgba(20, 33, 61, .3);
  overflow: hidden;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 700;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.modal-head .x { cursor: pointer; color: var(--ink-3); font-size: 20px; line-height: 1; background: none; border: 0; padding: 0 4px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fafbfd;
}
canvas.sign-canvas {
  width: 100%;
  height: 220px;
  display: block;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}
.sign-tip { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* ---------- 列表 / 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 12px 14px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12.5px; color: var(--ink-3); }
.stat .v { font-size: 24px; font-weight: 800; color: var(--brand); }
table.list { border-collapse: collapse; width: 100%; min-width: 980px; font-size: 13px; }
table.list th, table.list td { border-bottom: 1px solid var(--line-soft); padding: 9px 10px; text-align: left; vertical-align: middle; }
table.list thead th { background: #f7f9fc; color: var(--ink-2); font-weight: 700; font-size: 12.5px; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.list tbody tr:hover { background: #fafcff; }
table.list td.ops { white-space: nowrap; }
table.list td.ops .btn { margin-right: 4px; }
.empty-state { text-align: center; padding: 42px 16px; color: var(--ink-3); }

/* ---------- 提示条 ---------- */
.tip {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.tip.info { background: var(--brand-soft); color: var(--brand); border-color: #cfe0f0; }
.tip.warn { background: var(--warn-soft); color: var(--warn); border-color: #f0dcbb; }
.tip.danger { background: var(--danger-soft); color: var(--danger); border-color: #f0c9c6; }
.tip.ok { background: var(--ok-soft); color: var(--ok); border-color: #c2e3d4; }

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 33, 61, .94);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: .22s;
  max-width: 88vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: rgba(179, 38, 30, .96); }
#toast.ok { background: rgba(26, 127, 90, .96); }

/* ---------- 打印 ---------- */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff; font-size: 10.5px; }
  .no-print, .topbar, .modal-mask, #toast { display: none !important; }
  .wrap { max-width: none; padding: 0; margin: 0; }
  .card { box-shadow: none; border: 0; padding: 0; margin: 0 0 8px; break-inside: avoid; }
  .card > h2 { display: none; }
  table.sheet { min-width: 0; width: 100%; font-size: 9.6px; }
  table.sheet th, table.sheet td { padding: 3px 5px; }
  .table-scroll { overflow: visible; }
  .score-input {
    border: 0 !important;
    background: transparent !important;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    color: var(--brand) !important;
    box-shadow: none !important;
  }
  select.score-input { -webkit-appearance: none; appearance: none; text-align: center; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .summary-box { padding: 6px 9px; border-color: var(--line); background: #fff !important; }
  .summary-box.accent .k { color: var(--ink-2); }
  .summary-box.accent .v { color: var(--brand); }
  .sign-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .sign-card { min-height: 0; padding: 8px; break-inside: avoid; }
  .sign-box { min-height: 56px; border-style: solid; }
  .sheet-title { display: block !important; text-align: center; font-size: 15px; font-weight: 800; margin: 0 0 8px; }
  .print-only { display: block !important; }
  .input {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: var(--ink) !important;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
  }
  .field label { color: var(--ink-3); font-weight: 500; }
  .summary-box.accent { background: #fff !important; }
  .summary-box.accent .v { color: var(--brand) !important; }
  .badge { border: 1px solid var(--line); background: #fff !important; color: var(--ink) !important; }
  .tip { border: 1px solid var(--line); background: #fff !important; color: var(--ink-2) !important; }
  table.grades tr.hit td { background: #fff !important; font-weight: 700; }
}
.print-only { display: none; }
.sheet-title { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sign-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-grid { grid-template-columns: 1fr; }
  .wrap { padding: 14px 12px 90px; }
  .card { padding: 14px; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .sign-grid { grid-template-columns: 1fr; }
  .topbar { padding: 9px 12px; }
  .topbar .logo small { display: none; }
  table.sheet { min-width: 1040px; font-size: 12px; }
}

/* ============================================================
   门店巡检抽查表
   ============================================================ */
.reason-input {
  width: 100%;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 7px;
  outline: none;
  background: #fff;
}
.reason-input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 109, 168, .12); }
.reason-input:disabled { background: #f6f8fa; color: var(--ink-2); border-color: var(--line-soft); }
table.sheet.inspection { min-width: 900px; }
.sign-grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .sign-grid.two { grid-template-columns: 1fr; } }

/* ============================================================
   一尺见学考核系统 · 首页门户
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1f4e79 0%, #2f6da8 100%);
  color: #fff;
  border-radius: 14px;
  padding: 26px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 8px; font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.hero p { margin: 0; font-size: 13px; line-height: 1.75; opacity: .92; max-width: 760px; }
.hero .chips { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .chip {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
}

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.mod-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: .18s;
}
.mod-card:hover { border-color: #c4d6e8; transform: translateY(-2px); }
.mod-card .m-head { display: flex; align-items: center; gap: 11px; }
.mod-card .m-icon {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; background: var(--brand-soft); color: var(--brand);
}
.mod-card h3 { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.mod-card .m-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.mod-card .m-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; flex: 1; }
.mod-card .m-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.mod-card .m-meta b { color: var(--brand); font-weight: 700; }
.mod-card .m-acts { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px dashed var(--line-soft); }
.mod-card.coming {
  background: #fbfcfe;
  border-style: dashed;
  box-shadow: none;
  opacity: .92;
}
.mod-card.coming:hover { transform: none; border-color: var(--line); }
.mod-card.coming .m-icon { background: #eef1f5; color: var(--ink-3); }

.portal-foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.9;
}
.portal-foot b { color: var(--ink-2); }

/* ============================================================
   备案号页脚 —— 工信部要求展示并链接 beian.miit.gov.cn
   所有页面统一使用；打印时隐藏（不印进 A4 成品）
   ============================================================ */
.site-beian {
  margin: 22px 0 10px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.8;
}
.site-beian a {
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
}
.site-beian a:hover { color: var(--brand); border-bottom-color: var(--brand); }
/* 填报页手机端有吸底汇总条，页脚需让出空间，避免被遮住 */
body:has(.mobile-foot) .site-beian { margin-bottom: 84px; }
@media print { .site-beian { display: none !important; } }

@media (max-width: 560px) {
  .hero { padding: 20px 16px; }
  .hero h1 { font-size: 20px; }
  .mod-grid { grid-template-columns: 1fr; }
}

/* 打印：巡检表的文本输入同样去边框 */
@media print {
  .reason-input {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: var(--ink) !important;
    box-shadow: none !important;
    font-size: 10px !important;
  }
  .reason-input::placeholder { color: transparent !important; }
  .hero { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line); }
}

/* ============================================================
   协同填报 · 身份与板块
   ============================================================ */
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.id-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: .15s;
}
.id-card:hover { border-color: var(--brand-2); background: #f7fafd; transform: translateY(-1px); }
.id-card b { font-size: 15px; color: var(--ink); }
.id-card span { font-size: 11.5px; color: var(--ink-3); line-height: 1.55; }
.id-card.sup { border-style: dashed; }

.id-current {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 10px 14px;
}
.id-name { font-size: 15px; font-weight: 800; color: var(--brand); }
.id-scope { font-size: 12.5px; color: var(--ink-2); }
.id-current .btn { margin-left: auto; }

.part-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.part-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 9px 12px;
  background: #fbfcfe;
}
.part-row.done { background: var(--ok-soft); border-color: #c2e3d4; }
.pr-main { display: flex; flex-direction: column; gap: 2px; min-width: 128px; flex: 1; }
.pr-main b { font-size: 13.5px; color: var(--ink); }
.pr-main span { font-size: 11.5px; color: var(--ink-3); }
.pr-state { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.part-row.done .pr-state { color: var(--ok); font-weight: 600; }

.dim-owner { font-weight: 400; font-size: 11px; color: var(--ink-3); }

/* ============================================================
   手机卡片式填写视图
   ============================================================ */
.view-cards { display: none; }

.cg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 10px;
  padding: 8px 12px;
  background: var(--brand-soft);
  border-left: 3px solid var(--brand-2);
  border-radius: 6px;
}
.cg-head:first-child { margin-top: 0; }
.cg-title { font-size: 14px; font-weight: 800; color: var(--brand); }
.cg-meta { font-size: 12px; color: var(--ink-2); }
.cg-owner {
  margin-left: auto;
  font-size: 11.5px;
  background: #fff;
  border: 1px solid #cfe0f0;
  color: var(--brand);
  border-radius: 999px;
  padding: 1px 9px;
  white-space: nowrap;
}
.cg-owner.ok { background: var(--ok-soft); border-color: #c2e3d4; color: var(--ok); }
.cg-owner.none { color: var(--ink-3); border-color: var(--line); }

.citem {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  margin-bottom: 10px;
}
.citem.not-mine { background: #f8fafc; }
.ci-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ci-idx {
  flex: none;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px;
}
.ci-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.ci-max { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.ci-max.danger { color: var(--danger); font-weight: 700; }
.ci-content { font-size: 12.5px; color: var(--ink-2); line-height: 1.72; margin-top: 7px; }
.ci-src { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.ci-owner-tip {
  display: inline-block;
  font-size: 11.5px;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 6px;
  padding: 4px 9px;
  margin-top: 8px;
}
.ci-input { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ci-input .score-input { width: 88px; height: 42px; font-size: 17px; flex: none; }
.quick-btn { height: 42px; flex: none; padding: 0 12px; font-size: 13px; }
.ci-unit { font-size: 12px; color: var(--ink-3); }
.cg-foot {
  text-align: right;
  font-size: 12.5px;
  color: var(--ink-2);
  margin: -2px 0 16px;
  padding-right: 2px;
}
.cg-foot b { color: var(--brand); font-size: 15px; }

.ko-toggle { gap: 10px; }
.ko-btn {
  flex: 1;
  height: 44px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}
.ko-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ko-btn.danger.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.ko-btn:disabled { opacity: .55; }

/* ============================================================
   手机端常驻汇总条
   ============================================================ */
.mobile-foot {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(20, 33, 61, .08);
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  align-items: center;
  gap: 12px;
}
.mf-scores { display: flex; align-items: center; gap: 14px; flex: 1; flex-wrap: wrap; }
.mf-scores span { font-size: 12px; color: var(--ink-3); }
.mf-scores b { font-size: 17px; color: var(--brand); margin-left: 3px; }
.mf-scores em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ============================================================
   手机端适配：切换到卡片视图 + 触控友好
   ============================================================ */
@media (max-width: 900px) {
  .view-table { display: none; }
  .view-cards { display: block; }
  .mobile-foot { display: flex; }

  /* 16px 起可避免 iOS 聚焦输入框时自动放大页面 */
  .input, select.input, textarea.input, .reason-input { font-size: 16px; }
  .score-input { font-size: 17px; }
  .btn { min-height: 36px; }
  .topbar { gap: 8px; padding: 8px 12px; }
  .topbar .logo { font-size: 14px; }
  .topbar .btn { min-height: 30px; padding: 4px 9px; }
  .card { padding: 13px 12px; border-radius: 9px; }
  .card > h2 { font-size: 14.5px; margin-bottom: 10px; }
  .sign-box img { max-height: 96px; }
  canvas.sign-canvas { height: 240px; }
  .summary-grid { gap: 10px; }
  .summary-box { padding: 10px 12px; }
  .summary-box .v { font-size: 20px; }
}

@media print {
  .view-table { display: block !important; }
  .view-cards { display: none !important; }
  .mobile-foot { display: none !important; }
  /* 必须放在 .view-table 之后：同特异性下后者胜出，确保提示文字在打印时仍被隐藏 */
  .no-print, .no-print * { display: none !important; }
  .cg-owner { border: 1px solid var(--line); background: #fff !important; color: var(--ink-2) !important; }
}

.ci-reason { margin-top: 8px; }

/* ============================================================
   管理台 · 分工填报配置
   ============================================================ */
.asg-empty { font-size: 12.5px; color: var(--ink-3); padding: 8px 0; }
.asg-row {
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fbfcfe;
}
.asg-top { display: flex; align-items: center; gap: 8px; }
.asg-top .input { flex: 1; }
.asg-parts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; }
.asg-parts label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.asg-parts input[type=checkbox] { margin: 0; accent-color: var(--brand); width: 15px; height: 15px; }
.asg-sum { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.asg-sum b { color: var(--brand); }
