:root {
  color-scheme: light;
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #16181d;
  background: #f5f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(22, 24, 29, 0.04), transparent 34%),
    #f5f7fb;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d92355;
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
}

.subcopy {
  max-width: 680px;
  margin-top: 14px;
  color: #5f6572;
  line-height: 1.7;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid #dfe4ec;
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  color: #5f6572;
  font-size: 14px;
}

.status-pill.ok {
  border-color: #b8e6cb;
  color: #176b3b;
  background: #effbf4;
}

.status-pill.bad {
  border-color: #ffd0d0;
  color: #a42626;
  background: #fff4f4;
}

.panel,
.jobs {
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 14px 32px rgba(28, 35, 53, 0.07);
}

.panel {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 172px;
  resize: vertical;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 14px;
  color: #16181d;
  background: #fbfcff;
  outline: none;
}

textarea:focus {
  border-color: #d92355;
  box-shadow: 0 0 0 3px rgba(217, 35, 85, 0.12);
}

.destination {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #edf0f5;
}

.destination-head {
  margin-bottom: 10px;
}

.folder-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

input {
  width: 100%;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 11px 12px;
  color: #16181d;
  background: #fbfcff;
  outline: none;
}

input:focus {
  border-color: #d92355;
  box-shadow: 0 0 0 3px rgba(217, 35, 85, 0.12);
}

input[readonly] {
  color: #4f5663;
}

.actions,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.actions {
  justify-content: flex-start;
  margin-top: 14px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  color: #fff;
  background: #16181d;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: #2b2f38;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button.secondary,
button.ghost {
  border: 1px solid #dfe4ec;
  color: #252a33;
  background: #fff;
}

button.secondary:hover,
button.ghost:hover {
  background: #f5f7fb;
}

.hint {
  margin-top: 12px;
  color: #6d7480;
  font-size: 14px;
  line-height: 1.6;
}

.section-title {
  margin-bottom: 14px;
}

.job-list {
  display: grid;
  gap: 10px;
}

.job-list.empty {
  display: block;
  color: #747b87;
  padding: 18px;
  border: 1px dashed #cfd6e2;
  border-radius: 8px;
  background: #fbfcff;
}

.job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.job-url {
  overflow-wrap: anywhere;
  color: #333946;
}

.job-meta {
  margin-top: 7px;
  color: #68707d;
  font-size: 13px;
}

.job-progress {
  grid-column: 1 / -1;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ecf3;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d92355, #16181d);
  transition: width 0.25s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: #68707d;
  font-size: 13px;
}

.badge {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  background: #eef1f6;
  color: #4c5563;
}

.badge.success {
  background: #eaf8f0;
  color: #176b3b;
}

.badge.failed {
  background: #fff0f0;
  color: #a42626;
}

.badge.running,
.badge.pending {
  background: #fff6df;
  color: #835300;
}

@media (max-width: 720px) {
  .app {
    width: min(100% - 20px, 1040px);
    padding: 24px 0;
  }

  .hero,
  .job {
    grid-template-columns: 1fr;
    display: grid;
  }

  .status-pill {
    justify-self: start;
  }

  .panel,
  .jobs {
    padding: 16px;
  }

  .folder-picker,
  .progress-text {
    grid-template-columns: 1fr;
    display: grid;
  }
}
