:root {
  --bg: #f3ecdf;
  --bg-deep: #d6cbb7;
  --ink: #1f2b24;
  --muted: #5d675f;
  --panel: rgba(253, 248, 238, 0.76);
  --line: rgba(31, 43, 36, 0.12);
  --accent: #1c8c7d;
  --accent-soft: #d1eee7;
  --shadow: 0 24px 80px rgba(37, 42, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(28, 140, 125, 0.12), transparent 32rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(214, 203, 183, 0.2)),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 43, 36, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 43, 36, 0.03) 1px, transparent 1px);
  background-size: 100% 8rem, 8rem 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 90%);
}

.page-shell {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.masthead {
  display: grid;
  gap: 1rem;
  align-items: end;
  padding: 0 0 1.5rem;
}

.brand-block h1,
.hero-copy h2,
.status-head h3 {
  margin: 0;
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.brand-block h1 {
  font-size: clamp(3rem, 9vw, 5.8rem);
}

.masthead-copy,
.hero-text,
.field-note,
.progress-caption,
.submit-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.eyebrow,
.hero-kicker,
.detail-label {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(31, 43, 36, 0.62);
}

.layout {
  display: grid;
  gap: 1.25rem;
}

.hero-panel,
.control-panel,
.status-panel {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  min-height: 22rem;
}

.hero-copy {
  padding: clamp(1.5rem, 4vw, 3rem);
  align-self: center;
  display: grid;
  gap: 1rem;
}

.hero-copy h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  max-width: 10ch;
}

.hero-visual {
  position: relative;
  min-height: 18rem;
  background:
    linear-gradient(135deg, rgba(28, 140, 125, 0.18), rgba(28, 140, 125, 0.02)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(214, 203, 183, 0.08));
}

.sheet {
  position: absolute;
  width: clamp(11rem, 24vw, 17rem);
  aspect-ratio: 0.75;
  right: 14%;
  top: 12%;
  border-radius: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 26px 60px rgba(28, 34, 31, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 244, 233, 0.88));
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 1.35rem;
  border-radius: 1rem;
  background:
    linear-gradient(rgba(31, 43, 36, 0.06) 1px, transparent 1px);
  background-size: 100% 1.45rem;
}

.sheet-a {
  transform: rotate(-7deg) translateY(1rem);
}

.sheet-b {
  right: 22%;
  top: 18%;
  transform: rotate(5deg);
}

.sheet-c {
  right: 6%;
  top: 28%;
  transform: rotate(13deg) scale(0.92);
  opacity: 0.88;
}

.control-panel,
.status-panel {
  padding: 1.35rem;
}

.job-form {
  display: grid;
  gap: 1.25rem;
}

.field-group {
  display: grid;
  gap: 0.7rem;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 600;
}

.dropzone {
  display: grid;
  gap: 0.35rem;
  padding: 1.2rem 1.2rem 1.3rem;
  border: 1px dashed rgba(31, 43, 36, 0.22);
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.dropzone:hover {
  transform: translateY(-2px);
  border-color: rgba(28, 140, 125, 0.45);
  background: rgba(255, 255, 255, 0.78);
}

.dropzone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.dropzone-meta,
.field-note code,
.detail-value {
  font-family: "IBM Plex Mono", monospace;
}

.mode-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-pill {
  position: relative;
  display: grid;
}

.mode-pill input {
  position: absolute;
  opacity: 0;
}

.mode-pill span {
  display: block;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
  font-weight: 600;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mode-pill input:checked + span {
  background: var(--accent-soft);
  border-color: rgba(28, 140, 125, 0.4);
  transform: translateY(-1px);
}

input[type="text"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  padding: 0.95rem 1rem;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.field-note-strong {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.48);
  border-left: 3px solid var(--accent);
}

.submit-row {
  display: grid;
  gap: 0.6rem;
  align-items: start;
}

.primary-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 1.3rem;
  border: 0;
  background: var(--ink);
  color: #f8f4ec;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  background: #111813;
}

.primary-action.is-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.status-head,
.status-grid,
.download-row {
  display: grid;
  gap: 0.9rem;
}

.status-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.status-head h3 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0 0.85rem;
  background: rgba(28, 140, 125, 0.12);
  color: var(--accent);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.progress-track {
  width: 100%;
  height: 0.7rem;
  background: rgba(31, 43, 36, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 6%;
  background: linear-gradient(90deg, var(--accent), #67b7ac);
  transform-origin: left center;
  transition: width 240ms ease;
}

.status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-value {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
  word-break: break-word;
}

.log-block {
  display: grid;
  gap: 0.55rem;
}

.log-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.log-list li {
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.44);
  border-left: 2px solid rgba(31, 43, 36, 0.12);
  font-size: 0.92rem;
  line-height: 1.45;
}

.download-row {
  margin-top: 0.6rem;
}

.is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100vw - 1rem, 1180px);
    padding-top: 1rem;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-copy h2 {
    max-width: none;
  }

  .hero-visual {
    min-height: 14rem;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .page-shell {
    width: calc(100vw - 0.5rem);
    padding-bottom: 2rem;
  }

  .control-panel,
  .status-panel {
    padding: 1rem;
  }

  .brand-block h1 {
    font-size: 2.65rem;
  }

  .hero-copy {
    padding: 1rem;
  }

  .sheet {
    width: 9rem;
    border-radius: 1rem;
  }
}
