@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600&display=swap');

:root {
  --bg: #eef1f0;
  --panel: #ffffff;
  --panel-soft: #f6f7f6;
  --text: #101513;
  --muted: #6a746f;
  --brand: #1f6f4a;
  --brand-dark: #0f3b2a;
  --brand-soft: #e3f0ea;
  --accent: #0c2e21;
  --border: #e1e6e3;
  --shadow: 0 24px 60px rgba(17, 24, 21, 0.1);
  --shadow-soft: 0 16px 36px rgba(17, 24, 21, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 10%, #f7f8f7 0%, #eef1f0 45%, #e6eae8 100%);
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 48px auto 80px;
  padding: 36px;
  display: grid;
  gap: 26px;
  background: #f5f7f5;
  border-radius: 36px;
  border: 1px solid #e1e6e3;
  box-shadow: var(--shadow);
}

.hero {
  background: var(--panel);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.hero h1 {
  margin: 12px 0 8px;
  font-size: 34px;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 420px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.card {
  background: var(--panel);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.card.soft {
  background: var(--panel-soft);
}

.card.highlight {
  background: linear-gradient(145deg, #1f6f4a, #145238);
  color: #fff;
  border: none;
}

h2, h3 {
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
}

.dropzone {
  border: 2px dashed #c4d2c9;
  border-radius: 22px;
  padding: 22px;
  background: #f3f6f3;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.dropzone.drag {
  border-color: var(--brand);
  background: #eaf3ee;
  box-shadow: 0 12px 24px rgba(31, 111, 74, 0.12);
}

.dropzone.busy {
  opacity: 0.75;
}

.dropzone-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.drop-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f6f4a, #2f8b60);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(31, 111, 74, 0.25);
}

.dropzone input {
  display: none;
}

.file-button {
  margin-left: auto;
  border: 1px solid #c4d7cd;
  color: var(--brand-dark);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.file-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 24, 21, 0.12);
}

.file-meta {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  border-radius: 999px;
  padding: 12px 20px;
  border: 1px solid #c4d7cd;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--brand-dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 10px 20px rgba(31, 111, 74, 0.2);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 24, 21, 0.12);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.status {
  margin-top: 18px;
  padding: 16px 18px 28px;
  border-radius: 18px;
  background: #f3f6f4;
  border: 1px solid #e0e6e2;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  min-height: 64px;
  --progress: 0%;
}

.status::before {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  height: 6px;
  border-radius: 999px;
  background: #e0e6e2;
}

.status::after {
  content: '';
  position: absolute;
  left: 18px;
  bottom: 12px;
  height: 6px;
  width: var(--progress);
  border-radius: 999px;
  background: linear-gradient(90deg, #1f6f4a, #2f8b60);
  box-shadow: 0 6px 14px rgba(31, 111, 74, 0.3);
  transition: width 0.35s ease;
}

.status[data-state="error"] {
  color: #7b2b2b;
  background: #fbf0f0;
  border-color: #f1caca;
}

.status[data-state="working"] {
  color: #2d3b35;
}

.status[data-state="success"] {
  color: #1a5b3d;
  background: #edf6f0;
  border-color: #d0e7d7;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.stat {
  font-size: 36px;
  font-weight: 700;
  margin: 12px 0 4px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.field > span,
.field legend {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.field select {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.radio-field {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px 14px;
}

.radio-field legend {
  padding: 0 6px;
}

.radio-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f6f3;
  border: 1px solid #dbe3de;
  font-weight: 600;
  color: var(--brand-dark);
}

.radio-option input {
  accent-color: var(--brand);
}

@media (min-width: 980px) {
  .page {
    grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.4fr);
    align-items: start;
  }

  .hero {
    position: sticky;
    top: 32px;
    height: fit-content;
  }

  .config-card {
    grid-column: 1;
  }

  .upload-card {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 720px) {
  .page {
    margin: 24px 16px 60px;
    padding: 24px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .dropzone-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-button {
    margin-left: 0;
  }
}
