:root {
  --bg: #f3efe6;
  --ink: #1a1f1c;
  --muted: #5c655e;
  --card: #fffdf8;
  --line: #d7d0c2;
  --accent: #0f6b4c;
  --accent-ink: #f4fff9;
  --warn: #8a3b12;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #e7f3ec 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #efe6d4 0%, transparent 50%),
    var(--bg);
}

.page {
  width: min(640px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.header { margin-bottom: 1.75rem; }
.brand {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
h1 {
  margin: 0 0 0.5rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
}
.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 36rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px -18px rgba(26, 31, 28, 0.35);
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.9rem;
}
.label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.value { font-weight: 600; text-align: right; }

.upload-row, .actions, .fields {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.fields {
  margin-bottom: 1rem;
}
.fields label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
input[type="number"] {
  appearance: textfield;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
}
input[type="number"]:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, white);
  border-color: var(--accent);
}

.file-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: #faf7f0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

button {
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.primary:hover:not(:disabled) { filter: brightness(1.05); }
.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.ghost:hover:not(:disabled) { background: #f5f1e8; }

.actions { justify-content: flex-end; }
.hint {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.hint.error { color: var(--warn); }
.hint.ok { color: var(--accent); }

.foot {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 520px) {
  .actions { width: 100%; }
  .actions button { flex: 1; justify-content: center; }
}
