:root {
  --bg: #f5f7fa;
  --panel-bg: #ffffff;
  --border: #dcdfe6;
  --primary: #409eff;
  --primary-hover: #66b1ff;
  --danger: #f56c6c;
  --text: #303133;
  --muted: #909399;
  --radius: 6px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header,
footer {
  padding: 1.2rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

header h1 {
  margin: .2rem 0 .5rem;
  font-size: 1.6rem;
}

.panel {
  background: var(--panel-bg);
  margin: 1rem 1.2rem;
  padding: 1rem 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

h2 {
  margin: .2rem 0 1rem;
  font-size: 1.15rem;
}

#dropZone {
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 1.6rem 1rem;
  text-align: center;
  background: #f0f9ff;
  position: relative;
  cursor: pointer;
  transition: .25s;
}

#dropZone.dragover {
  background: #e2f3ff;
  border-color: #1d8ce0;
}

#dropZone p {
  margin: 0 0 .8rem;
  color: var(--muted);
}

#dropZone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

#fileInfo {
  margin-top: .6rem;
  font-size: .9rem;
  color: var(--muted);
  word-break: break-all;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem .8rem .4rem;
  margin: .8rem 0;
}

legend {
  padding: 0 .4rem;
  font-size: .85rem;
  color: var(--muted);
}

label {
  margin-right: 1rem;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  cursor: pointer;
}

.opt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: .5rem;
}

button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .65rem 1.1rem;
  font-size: .9rem;
  cursor: pointer;
  transition: .2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

button:hover:not(:disabled) {
  background: var(--primary-hover);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.actions button {
  margin-right: .8rem;
}

#progressBar {
  width: 100%;
  height: 10px;
  background: #ebeef5;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

#progressBar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(95deg, #409eff, #68c0ff);
  transition: width .2s;
}

.log {
  background: #1e1f22;
  color: #d1d5db;
  font-family: var(--mono);
  padding: .75rem;
  height: 180px;
  overflow: auto;
  border-radius: var(--radius);
  font-size: .75rem;
}

.table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 360px;
  background: #fff;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: .75rem;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: .4rem .5rem;
  text-align: left;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  background: #f3f4f6;
  position: sticky;
  top: 0;
  z-index: 1;
}

footer {
  margin-top: 2rem;
  font-size: .75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: center;
}

@media (max-width:700px) {

  th,
  td {
    white-space: normal;
  }
}