:root {
  --bg: #f5f7f8;
  --card: #ffffff;
  --line: #e3e8ea;
  --text: #16202b;
  --muted: #6b7a86;
  --faint: #93a1ab;
  --accent: #0f766e;
  --accent-dark: #0b5d56;
  --accent-soft: #e6f2f0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 43, .04), 0 8px 24px rgba(22, 32, 43, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 24px 40px;
}

/* ---------- header ---------- */
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.head-right {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5db;
}

.dot.ok { background: #12a37a; }
.dot.err { background: #d9534f; }

/* ---------- search ---------- */
.search-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 14px;
  margin-bottom: 16px;
}

.search-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 420px;
  min-width: 220px;
}

.field label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .3px;
}

.field input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  height: 42px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

.btn:hover { border-color: #c8d2d8; background: #fafbfb; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
  min-width: 96px;
}

.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }

.btn-mini {
  height: 30px;
  padding: 0 13px;
  font-size: 12.5px;
  border-radius: 6px;
  color: var(--muted);
}

.btn-mini:hover { color: var(--accent); border-color: var(--accent); }

.hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  flex-wrap: wrap;
}

.quick {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-label {
  font-size: 12px;
  color: var(--faint);
  margin-right: 2px;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

.meta {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- hint / result ---------- */
.hint-card {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
}

.hint-title {
  margin: 0 0 7px;
  font-size: 14px;
  color: var(--text);
}

.hint-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--faint);
}

.result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
}

.rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.rc-title {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .4px;
}

.rc-actions {
  display: flex;
  gap: 8px;
}

.result-text {
  margin: 0;
  padding: 18px 22px;
  background: #f7faf9;
  border: 1px solid #e8efee;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 2.05;
  letter-spacing: .3px;
  color: #1d2b36;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

/* ---------- batch import ---------- */
.batch-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
  margin-top: 16px;
}

.rc-note {
  font-size: 12px;
  color: var(--faint);
}

.batch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.batch-row input[type="file"] {
  flex: 1 1 280px;
  min-width: 220px;
  height: 42px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-family: inherit;
  background: #fbfcfc;
  cursor: pointer;
}

.batch-row select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12.5px;
  color: var(--text);
  background: #fff;
  font-family: inherit;
  max-width: 100%;
}

.batch-info {
  margin-top: 13px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  background: #f7faf9;
  border: 1px solid #e8efee;
  border-radius: 8px;
  padding: 10px 13px;
}

.batch-info.err {
  color: #a12d28;
  background: #fdf5f4;
  border-color: #f3dcda;
}

.batch-sample {
  margin-top: 10px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  line-height: 1.95;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-left: 3px solid #a12d28;
  border-radius: 8px;
}

.batch-sample.ok {
  border-left-color: #12a37a;
  color: var(--muted);
}

/* ---------- empty / footer ---------- */
.empty {
  padding: 50px 20px 54px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-title {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text);
}

.empty-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--faint);
}

.foot {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  background: #16202b;
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 99;
}

.toast.show { opacity: .92; }

@media (max-width: 720px) {
  .page { padding: 16px 14px 30px; }
  .head-right { display: none; }
  .result-text { font-size: 13.5px; padding: 14px 16px; }
}
