:root {
  color-scheme: light;
  --bg: #f4efe1;
  --surface: #ffffff;
  --surface-2: #f8f6f1;
  --text: #241f19;
  --muted: #6d665c;
  --line: #ded7c8;
  --accent: #b97a13;
  --accent-dark: #87570c;
  --danger: #c7362e;
  --focus: #2563eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)),
    var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(980px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(57, 43, 18, 0.08);
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-top: 8px solid #d9a21c;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.3;
}

h1 {
  max-width: 720px;
  font-size: 30px;
}

h2 {
  font-size: 18px;
}

.intro {
  max-width: 690px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.status-pill {
  align-self: flex-start;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 13px;
}

form {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: var(--surface-2);
}

.section-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
}

.section-heading {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

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

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

.full {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span,
.choice-group legend {
  color: var(--text);
  font-weight: 650;
  line-height: 1.45;
}

b {
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfc7b8;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(37, 99, 235, 0.16);
  border-color: var(--focus);
}

select:disabled {
  background: #eeeae2;
  color: #8c8479;
}

.choice-group {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.choice-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.choice-group input {
  width: 18px;
  min-height: 18px;
}

.file-field input {
  padding: 9px;
}

.notice {
  margin-bottom: 18px;
  border-left: 4px solid #d9a21c;
  padding: 14px 16px;
  background: #fff7df;
  color: #493813;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 4px 0;
}

button {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 18px;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  color: var(--accent-dark);
  border: 1px solid var(--line);
  background: #fff;
}

button.secondary:hover {
  background: #f3ead8;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.is-error input,
.is-error select,
.is-error textarea {
  border-color: var(--danger);
}

.error-text {
  color: var(--danger);
  font-size: 13px;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 980px);
    margin-top: 10px;
  }

  .page-header {
    display: grid;
    padding: 22px;
  }

  h1 {
    font-size: 24px;
  }

  form {
    padding: 12px;
  }

  .section-block {
    padding: 18px;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .form-actions {
    display: grid;
  }
}
