* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "Microsoft YaHei", sans-serif; background: #f5f6fa; color: #333; line-height: 1.6; }
header { background: #1a73e8; color: #fff; padding: 20px; text-align: center; }
header h1 { font-size: 22px; margin-bottom: 4px; }
.subtitle { font-size: 14px; opacity: 0.9; }
.tabs { display: flex; gap: 0; background: #fff; border-bottom: 2px solid #e0e0e0; padding: 0 20px; }
.tab { padding: 12px 24px; border: none; background: none; cursor: pointer; font-size: 15px; color: #666; border-bottom: 3px solid transparent; }
.tab.active { color: #1a73e8; border-bottom-color: #1a73e8; font-weight: 600; }
.tab-content { display: none; padding: 20px; max-width: 900px; margin: 0 auto; }
.tab-content.active { display: block; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card h2 { font-size: 17px; margin-bottom: 14px; padding-left: 10px; border-left: 4px solid #1a73e8; color: #1a73e8; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid label { display: flex; flex-direction: column; gap: 4px; }
.grid label.full { grid-column: 1 / -1; }
.grid label span { font-size: 13px; color: #555; font-weight: 500; }
input[type="text"], input[type="date"] { padding: 8px 10px; border: 1px solid #d0d0d0; border-radius: 4px; font-size: 14px; transition: border-color 0.2s; }
input[type="text"]:focus, input[type="date"]:focus { border-color: #1a73e8; outline: none; }
.data-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 13px; }
.data-table th { background: #f0f4ff; padding: 8px; text-align: center; border: 1px solid #d0d0d0; font-weight: 600; color: #333; }
.data-table td { padding: 6px; border: 1px solid #d0d0d0; text-align: center; }
.data-table td:first-child { background: #fafafa; font-weight: 500; }
/* 可自填的第一列：去掉灰底，跟其它可填单元格一致 */
.data-table td.editable { background: #fff; font-weight: 400; }
.data-table td.editable input { border-color: #c8d4f0; background: #fbfcff; }
.data-table td.static-col { background: #fafafa; color: #555; font-size: 12px; }
.data-table input { width: 100%; border: 1px solid #e0e0e0; border-radius: 3px; padding: 6px; text-align: center; font-size: 13px; }
.data-table input:focus { border-color: #1a73e8; }
.data-table input::placeholder { color: #b8b8b8; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.card-head h2 { margin-bottom: 0; }
.btn-link { background: #eaf1fd; color: #1a73e8; border: 1px solid #c3d7f8; padding: 6px 14px; border-radius: 4px; font-size: 13px; cursor: pointer; transition: background 0.2s; }
.btn-link:hover { background: #dbe8fb; }
.btn-link-ghost { background: #fff; color: #666; border-color: #dcdcdc; }
.btn-link-ghost:hover { background: #f5f5f5; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { font-size: 12px; color: #999; margin: -6px 0 14px; line-height: 1.5; }
/* 本项测试最大值：锚点输入区 */
.max-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 14px; background: #f8fafd; border: 1px solid #dce7fb; border-radius: 6px; }
.max-row label { display: flex; flex-direction: column; gap: 4px; flex: 0 0 220px; }
.max-row label span { font-size: 13px; color: #555; font-weight: 500; }
.max-row label span .opt { font-style: normal; font-size: 11px; color: #999; font-weight: 400; margin-left: 4px; }
.max-row input { width: 100%; }
.max-tip { flex: 1; min-width: 220px; }
.max-tip p { font-size: 12px; color: #888; line-height: 1.5; }
.check-msg { margin-top: 4px; min-height: 16px; }
.check-msg.ok { color: #1e8e3e; }
.check-msg.warn { color: #d93025; font-weight: 500; }
.upload-area { margin-top: 12px; }
.upload-label { display: flex; align-items: center; gap: 10px; padding: 10px; background: #f8f9fa; border: 2px dashed #d0d0d0; border-radius: 6px; cursor: pointer; }
.upload-label span { font-size: 14px; color: #555; font-weight: 500; white-space: nowrap; }
.upload-label input[type="file"] { flex: 1; font-size: 13px; }
.image-preview { margin-top: 8px; }
.image-preview img { max-width: 100%; max-height: 200px; border-radius: 4px; border: 1px solid #e0e0e0; }
.actions { display: flex; gap: 12px; justify-content: center; padding: 20px 0; }
.btn-primary { background: #1a73e8; color: #fff; border: none; padding: 12px 32px; border-radius: 6px; font-size: 15px; cursor: pointer; transition: background 0.2s; }
.btn-primary:hover { background: #1557b0; }
.btn-primary:disabled { background: #a0c4f0; cursor: not-allowed; }
.btn-secondary { background: #f0f0f0; color: #333; border: none; padding: 12px 32px; border-radius: 6px; font-size: 15px; cursor: pointer; }
.btn-secondary:hover { background: #e0e0e0; }
#historyList { font-size: 14px; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid #f0f0f0; }
.history-item:last-child { border-bottom: none; }
.history-info { flex: 1; }
.history-name { font-weight: 600; color: #333; }
.history-date { font-size: 12px; color: #999; }
.history-actions { display: flex; gap: 8px; }
.history-actions button { padding: 6px 14px; font-size: 13px; border-radius: 4px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal.hidden { display: none; }
.modal-content { background: #fff; border-radius: 8px; width: 90%; max-width: 480px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e0e0e0; }
.modal-header h3 { font-size: 18px; }
.modal-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #999; line-height: 1; }
.modal-body { padding: 20px; }
#previewInfo { margin-bottom: 20px; font-size: 14px; color: #555; }
#previewInfo .success-icon { color: #4caf50; font-size: 48px; text-align: center; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 12px 24px; border-radius: 6px; font-size: 14px; z-index: 2000; transition: opacity 0.3s; }
.toast.hidden { display: none; }
.toast.error { background: #d93025; }
.toast.success { background: #4caf50; }
.toast.info { background: #5f6368; }

/* ─────────── 报告类型选择页 ─────────── */
.picker { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
.picker-intro { text-align: center; margin-bottom: 28px; }
.picker-intro h2 { font-size: 19px; color: #222; margin-bottom: 6px; }
.picker-intro p { font-size: 13px; color: #888; }
.cat-group { margin-bottom: 30px; }
.cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cat-head h3 { font-size: 15px; color: #1a73e8; font-weight: 700; }
.cat-head .cat-count { font-size: 12px; color: #aaa; }
.cat-head::after { content: ""; flex: 1; height: 1px; background: #e3e8f0; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.type-card { position: relative; display: block; text-align: left; width: 100%; background: #fff; border: 1px solid #e3e8f0; border-radius: 10px; padding: 16px 18px; cursor: pointer; transition: all 0.18s ease; font-family: inherit; }
.type-card:hover { border-color: #1a73e8; box-shadow: 0 4px 14px rgba(26,115,232,0.14); transform: translateY(-2px); }
.type-card:active { transform: translateY(0); }
.type-card .tc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.type-card .tc-name { font-size: 15px; font-weight: 600; color: #222; }
.type-card .tc-desc { font-size: 12px; color: #888; line-height: 1.55; min-height: 36px; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 20px; white-space: nowrap; font-weight: 500; }
.badge.ready { background: #e6f4ea; color: #1e8e3e; }
.badge.planned { background: #f1f3f4; color: #9aa0a6; }
.type-card.disabled { background: #fafbfc; cursor: not-allowed; }
.type-card.disabled:hover { border-color: #e3e8f0; box-shadow: none; transform: none; }
.type-card.disabled .tc-name { color: #9aa0a6; }
.type-card.disabled .tc-desc { color: #b0b6bd; }
.back-bar { max-width: 900px; margin: 0 auto; padding: 12px 20px 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #1a73e8; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.loading-box { text-align: center; padding: 60px 20px; color: #999; font-size: 14px; }
.empty-box { text-align: center; padding: 40px 20px; color: #999; font-size: 14px; }
.load-err { max-width: 520px; margin: 0 auto; }
.load-err-title { font-size: 16px; color: #5f6368; font-weight: 600; margin: 0 0 8px; }
.load-err-msg { font-size: 13px; color: #9aa0a6; margin: 0 0 16px; }
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .tab-content { padding: 12px; }
  header h1 { font-size: 18px; }
  .type-grid { grid-template-columns: 1fr; }
  .picker { padding: 18px 12px 40px; }
}
