/* style.css — 页面样式 + 原站结果卡片类名适配(粉色主题) */
:root {
  --brand: #c2185b;
  --brand-light: #f9c6dd;
  --bg: #fdf5f9;
  --card: #ffffff;
  --text: #3c2730;
  --muted: #80606e;
  --ok: #1f7a3f;
  --warn: #a15c00;
  --err: #b3261e;
  --radius: 12px;
}

.bc-tool * { box-sizing: border-box; }
.bc-tool {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- header / footer ---------- */
.site-header {
  background: linear-gradient(180deg, var(--brand-light), var(--bg));
  padding: 40px 0 28px;
  border-bottom: 1px solid #f1d5e3;
}
.site-header h1 { margin: 0 0 8px; font-size: 28px; color: var(--brand); }
.site-header .en { font-size: 16px; font-weight: 400; color: var(--muted); }
.tagline { margin: 0; color: var(--muted); font-size: 14px; }
.site-footer {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #f1d5e3;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- form ---------- */
.batchcode-form {
  background: var(--card);
  border: 1px solid #f1d5e3;
  border-radius: var(--radius);
  padding: 22px;
  margin: 26px 0;
  box-shadow: 0 2px 10px rgba(194, 24, 91, 0.06);
}
.field { display: block; margin-bottom: 16px; }
.field .label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  border: 1px solid #e6c4d6;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(194,24,91,.12); }

.brand-picker { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  z-index: 20;
  left: 0; right: 0; top: calc(100% + 4px);
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e6c4d6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.dropdown.show { display: block; }
.dropdown a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 13px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px solid #fce8f2;
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: #fdebf4; }
.dropdown a .grp { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dropdown a.empty { color: var(--muted); justify-content: center; }

.submit-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.submit-btn:hover { background: #9c1250; }

.status { margin: 12px 0 0; font-size: 14px; }
.status.err { color: var(--err); }
.status.ok { color: var(--ok); }

/* ---------- 结果区(适配原站类名) ---------- */
.output { display: none; margin-bottom: 20px; }
.output .head { margin-bottom: 10px; }
.output .head h2 { margin: 0; font-size: 20px; color: var(--brand); }
.output .postit {
  background: var(--card);
  border: 1px solid #f1d5e3;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.output .postit p { margin: 6px 0; }
.output .postit strong { color: var(--brand); }

.recommendation-old,
.recommendation-fresh {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 4px 12px;
  align-items: start;
}
.recommendation-old { background: #fdf3e7; border: 1px solid #f0d9b8; }
.recommendation-fresh { background: #eaf7ee; border: 1px solid #c7e6d0; }
.recommendation-old .recommendation-icon,
.recommendation-fresh svg { grid-row: span 2; }
.recommendation-heading { margin: 0; font-size: 15px; }
.recommendation-heading.fresh { color: var(--ok); }
.recommendation-old .recommendation-heading { color: var(--warn); }
.recommendation-text { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }
.recommendation-text.fresh-text { color: #35604a; }
.recommendation-old svg, .recommendation-fresh svg { width: 24px; height: 24px; }

.invalid {
  background: #fdeceb;
  border: 1px solid #f3c6c2;
  border-radius: 10px;
  padding: 16px;
}
.invalid p { margin: 0 0 8px; color: var(--err); font-weight: 600; }
.report-section { margin-top: 8px; }
.report-btn {
  display: inline-block;
  font-size: 13px;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- 品牌区 / 选项卡 ---------- */
.brand-section { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tabs { display: flex; gap: 6px; margin: 0 0 18px; }
.tab {
  flex: 1;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  background: #fce8f2;
  border: 1px solid #f1d5e3;
  border-radius: 8px;
  cursor: pointer;
}
.tab.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.tab:hover:not(.active) { background: #f8dfeb; }

.panel { margin-top: 0; }

/* ---------- 批量查询 ---------- */
.bc-tool textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  font-family: Consolas, "Courier New", monospace;
  border: 1px solid #e6c4d6;
  border-radius: 8px;
  resize: vertical;
  color: var(--text);
}
.bc-tool textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(194,24,91,.12); }

.batch-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.btn-file {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--brand);
  background: #fdebf4;
  border: 1px dashed var(--brand);
  border-radius: 8px;
  cursor: pointer;
}
.btn-file:hover { background: #fbdceb; }
.col-picker { font-size: 14px; color: var(--muted); }
.col-picker select { padding: 6px 8px; border: 1px solid #e6c4d6; border-radius: 6px; font-size: 14px; }
.import-info { font-size: 13px; color: var(--ok); }

.batch-actions { display: flex; gap: 10px; margin-top: 12px; }
.batch-actions .submit-btn { width: auto; flex: 1; padding: 11px 20px; }
.ghost-btn {
  padding: 11px 18px;
  font-size: 15px;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--brand);
  border-radius: 8px;
  cursor: pointer;
}
.ghost-btn:hover { background: #fdebf4; }
.submit-btn:disabled { opacity: .6; cursor: default; }

.progress-wrap { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.progress-bar { flex: 1; height: 10px; background: #f6dbe8; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--brand); transition: width .12s linear; }
.progress-text { font-size: 13px; color: var(--muted); white-space: nowrap; }

.summary {
  margin-top: 14px;
  padding: 12px 16px;
  font-size: 14px;
  background: #fdebf4;
  border: 1px solid #f0cadd;
  border-radius: 10px;
  color: var(--text);
}
.summary strong { color: var(--brand); }

.batch-results { margin-top: 14px; overflow-x: auto; }
.result-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.result-table th, .result-table td { padding: 8px 10px; border-bottom: 1px solid #f4dce8; text-align: left; }
.result-table thead th { background: #fcebf4; color: var(--brand); font-size: 13px; white-space: nowrap; }
.result-table tbody tr:hover { background: #fdf5f9; }
.result-table td:first-child { color: var(--muted); width: 42px; }
.st-ok { color: var(--ok); }
.st-old { color: var(--warn); }
.st-invalid { color: var(--err); }

/* ---------- notes ---------- */
.notes { background: #fff; border: 1px solid #f1d5e3; border-radius: var(--radius); padding: 18px 22px; }
.notes h2 { margin: 0 0 8px; font-size: 17px; color: var(--brand); }
.notes ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.notes li { margin-bottom: 6px; }
.notes { margin-top: 24px; }

@media (max-width: 520px) {
  .site-header h1 { font-size: 22px; }
  .site-header .en { display: block; margin-top: 4px; }
  .batch-actions { flex-direction: column; }
  .result-table th, .result-table td { padding: 6px 7px; font-size: 13px; }
}