:root {
  --ink: #1b1c1e;
  --ink-2: #5c6067;
  --ink-3: #8c9199;
  --line: #e2e3e6;
  --line-2: #eef0f2;
  --bg: #fbfbfa;
  --card: #ffffff;
  --accent: #2a5a4c;
  --danger: #a1382f;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.shell {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.mark {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  position: relative;
  flex: 0 0 auto;
}

.mark::after {
  content: "";
  position: absolute;
  inset: 6px 6px auto auto;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 1px;
}

.head-text { flex: 1; min-width: 0; }

h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

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

.pill {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--card);
}

.pill.on { color: var(--accent); border-color: #c8d8d2; }

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

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.panel-head h2 { margin-bottom: 0; }

.batch-id, .count {
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 5px;
}

input, textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

input:focus, textarea:focus {
  border-color: var(--ink-3);
  background: var(--card);
}

textarea { resize: vertical; min-height: 66px; }

.row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.row input { flex: 1; }

.row-btns { margin-top: 14px; }

.btn {
  font: inherit;
  font-size: 14px;
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { border-color: var(--ink-3); }

.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn.primary:hover { opacity: 0.86; }

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.drop {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.drop.over {
  border-color: var(--accent);
  background: #f7faf8;
}

.drop-main {
  margin: 0;
  font-size: 14px;
}

.drop-sub {
  margin: 4px 0 14px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.queue {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.queue:empty { display: none; }

.item {
  border-top: 1px solid var(--line-2);
  padding: 11px 0;
}

.item:first-child { border-top: none; }

.item-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.item-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  flex: 0 0 auto;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.item-bar {
  height: 2px;
  background: var(--line-2);
  margin-top: 7px;
  border-radius: 1px;
  overflow: hidden;
}

.item-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s ease;
}

.item.done .item-bar > i { background: var(--accent); }
.item.error .item-bar > i { background: var(--danger); }

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

.bar {
  height: 3px;
  background: var(--line-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.25s ease;
}

.status {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  min-height: 20px;
}

.recent {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recent li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line-2);
  font-size: 13px;
}

.recent li:first-child { border-top: none; }

.recent .r-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent .r-meta {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.empty {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 4px 0;
}

@media (max-width: 520px) {
  .shell { padding: 20px 14px 56px; }
  .panel { padding: 16px; }
  .row-btns { flex-direction: column-reverse; }
  .row-btns .btn { width: 100%; }
}
