* { box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  margin: 0; background: #f4f6f8; color: #222;
}
.topbar {
  background: #1e5b94; color: #fff; padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.topbar .brand { font-weight: bold; font-size: 18px; }
.topbar nav a { color: #fff; margin-left: 16px; text-decoration: none; }
.topbar nav a:hover { text-decoration: underline; }
.topbar .who { margin-right: 6px; opacity: .85; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card {
  background: #fff; border-radius: 8px; padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.card.narrow { max-width: 420px; margin: 40px auto; }
h2 { margin-top: 0; }
label { display: block; margin: 12px 0 4px; font-weight: bold; font-size: 14px; }
input[type=text], input[type=password], input[type=number], input[type=month] {
  width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px;
}
button, .btn-link {
  margin-top: 18px; background: #1e5b94; color: #fff; border: none;
  padding: 10px 22px; border-radius: 4px; cursor: pointer; font-size: 15px;
  text-decoration: none; display: inline-block;
}
button:hover, .btn-link:hover { background: #164873; }
.hint { color: #666; font-size: 13px; }
.status-strip {
  padding: 9px 14px; border-radius: 4px; margin: 10px 0 12px; font-size: 14px;
  border-left: 4px solid #999; background: #f2f4f6; color: #333;
}
.status-strip.ok { background: #e6f4ea; border-left-color: #1e7e34; color: #1e7e34; }
.status-strip.empty { background: #fff6e5; border-left-color: #d98b00; color: #8a5a00; }
.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.flash.success { background: #e6f4ea; color: #1e7e34; }
.flash.error { background: #fdecea; color: #c0392b; }
.table-wrap { overflow-x: auto; margin-bottom: 10px; }
table.report-table { border-collapse: collapse; width: 100%; font-size: 13px; }
table.report-table th, table.report-table td {
  border: 1px solid #ddd; padding: 6px; text-align: center;
}
table.report-table th { background: #eef3f8; }
table.report-table input { min-width: 90px; text-align: center; }
.inline-form { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.inline-form label { margin: 0; }
.inline-form input[type=month] { width: auto; }
.inline-form button, .inline-form .btn-link { margin-top: 0; }
.card + .card { margin-top: 20px; }
h3 { margin: 22px 0 8px; font-size: 16px; color: #1e5b94; }
h4 { margin: 18px 0 8px; font-size: 14px; }
.hint code, td code { background: #eef3f8; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.hint ul { margin: 6px 0; padding-left: 20px; }
.hint li { margin: 3px 0; }
table.report-table th[colspan], table.report-table th[rowspan] { vertical-align: middle; }
td.cell-fixed { color: #555; }
td.cell-preview { background: #fafbfc; min-width: 70px; }
td.cell-preview.num { text-align: right; }
input[type=file] { padding: 6px; border: 1px solid #ccc; border-radius: 4px; background: #fff; width: 100%; }
ul.hint { color: #666; font-size: 13px; }

/* 表格之外的可填字段（填报单位 / 填报时间 / 填报人联系方式…）
   字段个数与名称都由模板决定，所以用流式排列，一格一个输入框。 */
.meta-fields { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 12px 0 16px; }
.meta-field { display: flex; align-items: center; gap: 8px; }
.meta-field label { display: inline-block; margin: 0; white-space: nowrap; }
.meta-field input { width: 220px; }
/* 管理员锁定并选了"在填报页展示"的格子：只读展示模板原文（无输入框、无任何按钮） */
.meta-statics { margin: 12px 0 16px; }
.meta-static { padding: 8px 12px; margin: 6px 0; background: #f6f8fa;
  border: 1px solid #e2e6ea; border-radius: 6px; color: #444; }
