:root {
  --paper: #f4f1ea;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #ded8cc;
  --blue: #124559;
  --green: #3f6f4e;
  --amber: #c97f1a;
  --red: #a13d3d;
  --shadow: 0 18px 45px rgba(28, 35, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  min-height: 108px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar h1,
.panel h2 {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-pill {
  min-width: 118px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill[data-status="approved"] {
  color: var(--green);
}

.status-pill[data-status="rejected"],
.status-pill[data-status="missing"] {
  color: var(--red);
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 28px auto 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-panel,
.review-panel {
  padding: clamp(20px, 3vw, 34px);
}

.side-panel {
  position: sticky;
  top: 22px;
  padding: 24px;
}

.side-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.form-section + .form-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 20px;
}

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

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

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfc7b8;
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 69, 89, 0.16);
}

[aria-invalid="true"] {
  border-color: var(--red);
}

.field-error {
  color: var(--red);
  font-size: 13px;
}

.actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.actions.split {
  justify-content: space-between;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button {
  background: var(--blue);
  color: white;
}

.secondary-button {
  background: #f7e8dc;
  color: var(--red);
}

.result-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}

.result-box.success {
  border-color: rgba(63, 111, 78, 0.4);
  background: rgba(63, 111, 78, 0.1);
}

.result-box.error {
  border-color: rgba(161, 61, 61, 0.4);
  background: rgba(161, 61, 61, 0.1);
}

.review-shell {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.empty-state {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  color: var(--muted);
  background: #fffdf8;
}

.request-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.request-header strong {
  color: var(--blue);
  white-space: nowrap;
}

.detail-list {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  border-top: 1px solid var(--line);
  margin: 0 0 28px;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  overflow-wrap: anywhere;
}

.decision-form {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: grid;
  gap: 18px;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 24px, 1180px);
    margin-top: 16px;
  }

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

  .request-header,
  .actions.split {
    flex-direction: column;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .detail-list dt {
    padding-bottom: 3px;
    border-bottom: 0;
  }

  .detail-list dd {
    padding-top: 3px;
  }

  button {
    width: 100%;
  }
}
