:root {
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --border: #dde1e6;
  --text: #1b1f24;
  --muted: #5b6470;
  --accent: #2f6fed;
  --accent-hover: #2559c7;
  --danger: #c0392b;
  --success: #1e824c;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header h1 {
  margin: 0 0 6px;
  font-size: 1.8rem;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 700px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

.file-drop.dragover {
  border-color: var(--accent);
  border-style: solid;
  color: var(--accent);
  background: #eef3ff;
}

.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.status {
  margin-top: 12px;
  font-size: 0.92rem;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

.column-config {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.column-config legend {
  font-weight: 600;
  padding: 0 6px;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.field input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 8px;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  background: #b7c2d6;
  cursor: not-allowed;
}

.note {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}

th, td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #eef1f6;
  position: sticky;
  top: 0;
}

tr:last-child td {
  border-bottom: none;
}
