:root {
  --bg-top: #f4efe3;
  --bg-bottom: #fbf8f2;
  --surface: rgba(255, 252, 247, 0.94);
  --surface-strong: rgba(255, 248, 237, 0.98);
  --surface-soft: #f8f1e4;
  --border: #e7dac5;
  --border-strong: #d8c2a1;
  --text: #1e1b16;
  --muted: #6d6255;
  --accent: #8f5b2e;
  --accent-strong: #6d401a;
  --shadow: rgba(99, 68, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(202, 163, 117, 0.18), transparent 30%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 18px 40px var(--shadow);
}

h1,
h2 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

.hero-panel {
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(247, 237, 218, 0.98), rgba(255, 251, 243, 0.96)),
    var(--surface);
  border-color: var(--border-strong);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  max-width: 720px;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-note,
.section-note,
.field-hint,
.detail-id,
.job-meta,
.meta-label,
.back-link {
  color: var(--muted);
}

.hero-note {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(143, 91, 46, 0.12);
  font-size: 0.92rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin-bottom: 4px;
}

.section-note {
  margin: 0;
  line-height: 1.6;
}

.upload-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.field-label {
  font-weight: 700;
}

input[type="file"] {
  width: 100%;
}

.mode-group {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.72);
}

.mode-option {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(143, 91, 46, 0.12);
  background: #fffaf2;
}

.mode-option input {
  margin-right: 8px;
}

.mode-option small {
  color: var(--muted);
  line-height: 1.5;
}

button {
  width: fit-content;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(143, 91, 46, 0.2);
}

a {
  color: var(--accent-strong);
}

.job-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.job-link {
  display: block;
  padding: 18px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 244, 235, 0.96));
  border: 1px solid rgba(143, 91, 46, 0.12);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.job-link:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 91, 46, 0.28);
  box-shadow: 0 14px 24px rgba(99, 68, 34, 0.08);
}

.job-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.job-title-block {
  display: grid;
  gap: 8px;
}

.job-name {
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.mode-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(143, 91, 46, 0.1);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.job-meta-label,
.meta-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-id,
.detail-id code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.9rem;
  background: rgba(143, 91, 46, 0.08);
  padding: 4px 8px;
  border-radius: 999px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.is-created,
.is-unknown {
  background: #efe9de;
  color: #5f5244;
  border-color: #ddd0c0;
}

.is-running {
  background: #fff3d9;
  color: #8b5d10;
  border-color: #f0d28a;
}

.is-completed {
  background: #e7f6ea;
  color: #1f6a3a;
  border-color: #b9dfc2;
}

.is-partial {
  background: #fff0de;
  color: #92511a;
  border-color: #edc390;
}

.is-failed {
  background: #fbe8e6;
  color: #a03d34;
  border-color: #efb8b1;
}

.empty-state {
  padding: 22px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  background: rgba(255, 251, 245, 0.8);
  color: var(--muted);
}

.detail-panel {
  padding: 28px;
}

.back-link {
  margin-top: 0;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-title-row h1 {
  margin-bottom: 8px;
}

.detail-id {
  margin: 0;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.meta-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.download-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 243, 233, 0.98));
  border: 1px solid rgba(143, 91, 46, 0.14);
}

.download-chip strong {
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.is-disabled {
  opacity: 0.65;
}

.error-banner {
  margin-bottom: 0;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff1f0;
  border: 1px solid #efb8b1;
  color: #a03d34;
}

.notice-banner {
  margin-bottom: 0;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f4eee2;
  border: 1px solid #e3cfb1;
  color: #7a5b2b;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f2e9;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(143, 91, 46, 0.08);
}

@media (max-width: 720px) {
  .page {
    padding: 24px 16px 48px;
  }

  .hero-panel,
  .panel,
  .detail-panel {
    padding: 20px;
  }

  .form-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .job-main,
  .detail-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-meta {
    flex-wrap: wrap;
  }
}
