:root {
  --ink: #153534;
  --muted: #637674;
  --paper: #f4f1e8;
  --surface: #fffdf7;
  --line: #d8ddd7;
  --teal: #0f3d3e;
  --teal-soft: #dcebe7;
  --gold: #f0c968;
  --danger: #a43f36;
  --shadow: 0 18px 45px rgba(19, 48, 47, 0.09);
  font-family:
    Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 86% 6%, rgba(240, 201, 104, 0.2), transparent 28rem),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(21, 53, 52, 0.16);
}

.brand {
  color: inherit;
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--teal);
  color: white;
  font: 700 14px/1 Georgia, serif;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}

.security-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f8d71;
  box-shadow: 0 0 0 4px rgba(63, 141, 113, 0.12);
}

.text-button,
.icon-button {
  color: var(--teal);
  background: transparent;
  border: 0;
  font-weight: 700;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 58px;
}

.eyebrow,
.section-label {
  margin: 0 0 13px;
  color: #52716e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font: 600 clamp(42px, 6vw, 72px) / 1.06 Georgia, "Noto Serif SC", serif;
  letter-spacing: -0.035em;
}

.hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.trust-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 19px 12px;
  padding-left: 28px;
  border-left: 1px solid rgba(21, 53, 52, 0.18);
}

.trust-index {
  color: #8aa19e;
  font: 600 13px/1.4 Georgia, serif;
}

.trust-card strong {
  font-size: 14px;
}

.trust-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: start;
}

.panel {
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(21, 53, 52, 0.13);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
}

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

.panel-heading h2 {
  margin: 0;
  font: 600 28px/1.2 Georgia, "Noto Serif SC", serif;
}

.limit-badge {
  padding: 7px 10px;
  border-radius: 999px;
  color: #315b59;
  background: var(--teal-soft);
  font-size: 11px;
  white-space: nowrap;
}

.dropzone {
  min-height: 210px;
  border: 1.5px dashed #9fb1ad;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: #faf9f3;
  transition: 160ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--teal);
  background: #f1f7f4;
  transform: translateY(-1px);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 24px;
}

.dropzone strong {
  font-size: 15px;
}

.dropzone > span:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.consent-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  margin: 19px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.consent-row input {
  margin-top: 3px;
  accent-color: var(--teal);
}

.primary-button {
  width: 100%;
  min-height: 51px;
  border: 0;
  border-radius: 13px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--teal);
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15, 61, 62, 0.17);
}

.primary-button:hover {
  background: #164b4c;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-message {
  min-height: 20px;
  margin: 8px 0;
  color: var(--danger);
  font-size: 12px;
}

.jobs-list {
  display: grid;
  gap: 12px;
  min-height: 353px;
}

.empty-state {
  min-height: 290px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}

.empty-state span {
  color: var(--ink);
  font: 600 20px Georgia, serif;
}

.empty-state p {
  margin: 8px 0 0;
  font-size: 12px;
}

.job-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  background: white;
}

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

.job-title {
  min-width: 0;
}

.job-title strong,
.job-title span {
  display: block;
}

.job-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.job-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.job-status {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  background: #e9efed;
}

.job-status.completed {
  color: #23644c;
  background: #e1f1e8;
}

.job-status.paused {
  color: #805b12;
  background: #f8edcf;
}

.job-status.failed,
.job-status.all_failed {
  color: #8b312b;
  background: #f8e3e0;
}

.progress-track {
  height: 6px;
  margin: 15px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eeeb;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 250ms ease;
}

.job-stats {
  color: var(--muted);
  font-size: 11px;
}

.job-estimate {
  margin-top: 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.job-estimate::before {
  content: "◷";
  margin-right: 5px;
  color: var(--gold);
}

.job-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 11px;
}

.job-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.small-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--teal);
  background: #fafbf8;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.small-button.download {
  color: white;
  border-color: var(--teal);
  background: var(--teal);
}

.small-button.primary {
  color: white;
  border-color: var(--teal);
  background: var(--teal);
}

.small-button.danger {
  color: var(--danger);
  border-color: rgba(139, 49, 43, 0.3);
  background: #fff8f7;
}

.notice {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 22px;
  margin-top: 24px;
  padding: 22px 26px;
  border: 1px solid rgba(21, 53, 52, 0.13);
  border-radius: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.notice strong {
  color: var(--ink);
}

.notice p {
  margin: 0;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 35, 34, 0.74);
  backdrop-filter: blur(12px);
}

.login-overlay[hidden] {
  display: none;
}

.login-card {
  width: min(430px, 100%);
  border-radius: 24px;
  padding: 36px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(5, 24, 23, 0.32);
}

.login-card h2 {
  margin: 0;
  font: 600 34px Georgia, "Noto Serif SC", serif;
}

.login-card > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.login-card label span {
  display: block;
  margin: 22px 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.login-card input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 13px;
  background: white;
}

@media (max-width: 850px) {
  .hero,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 38px;
  }

  .trust-card {
    padding: 22px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(21, 53, 52, 0.18);
  }
}

@media (max-width: 560px) {
  .topbar,
  main {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    min-height: 72px;
  }

  .security-state > span:not(.status-dot) {
    display: none;
  }

  main {
    padding-top: 42px;
  }

  h1 {
    font-size: 42px;
  }

  .panel {
    padding: 20px;
    border-radius: 18px;
  }

  .notice {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
