:root {
  --bg: #f1f7fa;
  --panel: rgba(255, 255, 255, .96);
  --ink: #183044;
  --muted: #6d7f8d;
  --line: #d9e6ec;
  --line-strong: #c4d7df;
  --accent: #1769aa;
  --accent-2: #1ba99b;
  --green: #148a55;
  --red: #c03945;
  --warn: #b7791f;
  --shadow: 0 18px 44px rgba(31, 80, 111, .12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fcfd 0%, var(--bg) 100%);
}
.shell { width: min(960px, 96vw); margin: 24px auto; }
.panel {
  border: 1px solid rgba(196, 215, 223, .9);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.bolt {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
h1 { margin: 0; font-size: 20px; }
p { margin: 4px 0 0; color: var(--muted); }
button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: linear-gradient(135deg, #1769aa, #1f91c8); }
.danger { background: linear-gradient(135deg, #c03945, #dd6870); }
.ghost, .logs button, .download button { color: var(--accent); background: #eef7fb; border: 1px solid #cde4ee; }
.compact-form { padding: 18px 20px 10px; }
.grid { display: grid; gap: 14px; }
.two { grid-template-columns: 1.25fr .75fr; }
.three { grid-template-columns: repeat(3, 1fr); margin-top: 14px; }
label span, .section-tag { display: block; margin-bottom: 8px; color: #38566b; font-size: 14px; font-weight: 700; }
input, select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(23, 105, 170, .1); }
.file-row { display: block; margin-top: 14px; }
.file-row input[type="file"] {
  height: auto;
  min-height: 38px;
  padding: 6px 10px;
  line-height: 1.4;
  background: #fafcfe;
}
.file-row input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border: 1px solid #b9d0df;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eef7fb 100%);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}
.file-row input[type="file"]::-webkit-file-upload-button {
  margin-right: 10px;
  padding: 7px 12px;
  border: 1px solid #b9d0df;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eef7fb 100%);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}
.compact-actions { margin-top: 16px; display: flex; justify-content: flex-end; gap: 10px; }
.status-card {
  margin: 0 20px 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.status-copy h2 { margin: 0; font-size: 18px; }
.bar { height: 8px; margin-top: 14px; border-radius: 99px; background: #dcecf2; overflow: hidden; }
.bar i { display: block; width: 0%; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.bar-meta { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 13px; }
.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 20px 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(27, 169, 155, .25);
  background: #f4fffd;
}
.download span { display: block; color: #3a6c69; font-size: 13px; font-weight: 800; margin-bottom: 4px; }
.download a { color: #0d746d; word-break: break-all; }
.hidden { display: none; }
.logs { margin: 0 20px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.logs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.log-actions { display: flex; gap: 8px; }
pre, .logs-body { margin: 0; height: 240px; padding: 14px; overflow: auto; font-family: Consolas, monospace; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.logs-body { background: #fff; }
.log-error { color: var(--red); font-weight: 700; }
.log-success { color: var(--green); font-weight: 700; }
.log-warn { color: var(--warn); font-weight: 700; }
@media (max-width: 760px) {
  .titlebar, .compact-actions, .download, .logs-head { flex-direction: column; align-items: stretch; }
  .two, .three { grid-template-columns: 1fr; }
  button { width: 100%; }
  .log-actions { width: 100%; flex-direction: column; }
}
