:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", sans-serif;
  line-height: 1.5;
  font-weight: 400;
  background: #f3f5ef;
  color: #192126;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(243, 245, 239, 0.96), rgba(243, 245, 239, 1)),
    #f3f5ef;
}

a {
  color: #146c43;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1100px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: end;
}

.hero-copy h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.05;
}

.hero-text,
.history-meta,
.status-text,
.dropzone-text {
  color: #425159;
}

.eyebrow {
  margin: 0;
  color: #146c43;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.hero-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

.workspace {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.composer,
.history {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(25, 33, 38, 0.1);
  border-radius: 8px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.composer form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid #b7c2be;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfcfa;
}

.dropzone {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 22px;
  border: 2px dashed #7d9890;
  border-radius: 8px;
  background: #eef6f2;
  cursor: pointer;
}

.dropzone[data-dragging="true"] {
  border-color: #146c43;
  background: #e4f0ec;
}

.dropzone[data-busy="true"] {
  opacity: 0.7;
}

.dropzone-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.selected-file {
  margin: 0;
  color: #192126;
  font-weight: 600;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-button,
.secondary-button,
.error-dismiss {
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
}

.primary-button {
  background: #146c43;
  color: #fff;
}

.secondary-button {
  background: #192126;
  color: #fff;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.error-bubble {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 8px;
  background: #fbe5e5;
  border: 1px solid #d54e4e;
  color: #6b1717;
}

.error-title,
.error-message {
  margin: 0;
}

.error-title {
  font-weight: 700;
}

.error-dismiss {
  background: #6b1717;
  color: #fff;
  flex-shrink: 0;
}

.section-heading h2 {
  margin: 6px 0 0;
}

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

.history-item {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(20, 108, 67, 0.18);
  background: #f9fcfb;
}

.history-item h3 {
  margin: 0;
  font-size: 1rem;
}

.csv-list {
  margin: 12px 0;
  padding-left: 18px;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100vw - 24px, 1100px);
    padding-top: 16px;
  }

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

  .hero-image {
    height: 220px;
  }

  .composer-actions,
  .error-bubble {
    flex-direction: column;
    align-items: stretch;
  }
}
