:root {
  --bg: #eef3ef;
  --ink: #1c2a22;
  --muted: #5d6f64;
  --card: #fffdf8;
  --line: #d5e0d7;
  --accent: #1f6f5b;
  --accent-2: #c8892b;
  --shadow: 0 12px 40px rgba(28, 42, 34, 0.08);
  --radius: 18px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #dfece4 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, #f7e7c8 0%, transparent 35%),
    var(--bg);
  min-height: 100vh;
}

.page { max-width: 1080px; margin: 0 auto; padding: 28px 18px 60px; }

.hero {
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 111, 91, 0.92), rgba(31, 111, 91, 0.75)),
    url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80h160M80 0v160' stroke='%23ffffff22' stroke-width='1'/%3E%3C/svg%3E");
  color: #f7fff9;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.hero-inner { padding: 36px 34px 40px; }
.brand {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.85;
}
.hero h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sub { margin: 12px 0 0; max-width: 520px; line-height: 1.6; opacity: 0.92; }

.wrap { display: grid; gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 18px; }
.step {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
}
.hint { margin: 0; color: var(--muted); font-size: 13px; }

.drop {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 140px;
  border: 1.5px dashed #9bb5a6;
  border-radius: 14px;
  background: #f7fbf8;
  cursor: pointer;
  transition: 0.2s ease;
  padding: 20px;
  text-align: center;
}
.drop:hover, .drop.dragover {
  border-color: var(--accent);
  background: #eef8f3;
  transform: translateY(-1px);
}
.drop strong { font-size: 16px; }
.drop span { color: var(--muted); font-size: 13px; }
.file-meta { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.map-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.map-item label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.map-item .target {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.map-item select,
.map-item input.default-input {
  width: 100%;
  border: 1px solid #c9d6cc;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.map-item .field-block {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.map-item .field-block:last-child {
  margin-bottom: 0;
}

.group-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
}
.group-chip input { accent-color: var(--accent); }
.group-chip.active {
  border-color: var(--accent);
  background: #eef8f3;
  color: var(--accent);
  font-weight: 600;
}
.group-summary {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.group-list {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.group-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px dashed #e7eee9;
}
.group-list-item:last-child { border-bottom: 0; }
.group-list-item span:last-child { color: var(--muted); }

.options {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.options label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.options input {
  border: 1px solid #c9d6cc;
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 320px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 640px;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #e7eee9;
  text-align: left;
  white-space: nowrap;
}
th { background: #f3f7f4; position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: #f8fbf9; }

.actions {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #2a8f74);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 111, 91, 0.28);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
}
.export-tip { margin: 0; color: var(--muted); font-size: 13px; }

.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #1c2a22;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-width: min(90vw, 480px);
  text-align: center;
}

@media (max-width: 640px) {
  .hero-inner { padding: 28px 22px; }
  .card { padding: 16px; }
}
