:root {
  --ink: #1b2430;
  --muted: #5d6b7a;
  --line: #e4ddd2;
  --paper: #f6f1e8;
  --card: #fffdf9;
  --teal: #0e7c66;
  --teal-dark: #0a5c4c;
  --stamp: #c23b22;
  --amber: #f4e2c4;
  --shadow: 0 16px 40px rgba(48, 36, 18, 0.08);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #fff 0, transparent 28%),
    var(--paper);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 56px; }
.top { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 22px; }
.brand { display: flex; gap: 14px; align-items: center; }
.brand h1 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
.brand p { margin: 4px 0 0; color: var(--muted); }
.mark { width: 58px; height: 58px; flex: none; }
.fields { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.fields span {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}

.drop {
  background: var(--card);
  border: 1.5px dashed #c9bfb1;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.drop.over { border-color: var(--teal); background: #f3fbf8; }
.drop h2 { margin: 0 0 6px; font-size: 22px; }
.drop p { margin: 0; color: var(--muted); max-width: 46ch; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
}
.btn.primary { background: var(--teal); color: white; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.quiet { background: transparent; border: 1px solid var(--line); }
.btn:disabled { opacity: 0.55; cursor: wait; }

.board { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.board-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.board-head h2 { margin: 0; font-size: 18px; }
.board-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.empty { padding: 36px 18px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
td input {
  width: 100%;
  min-width: 120px;
  border: 1px solid transparent;
  background: #faf7f2;
  border-radius: 8px;
  padding: 8px 10px;
}
td input:focus { outline: 2px solid rgba(14, 124, 102, 0.25); border-color: var(--teal); background: white; }
.file { font-weight: 700; }
.vendor { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--teal-dark); background: #e7f6f2; border-radius: 999px; padding: 2px 8px; }
.note { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; max-width: 24ch; }
.amount input { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--stamp); }
.status { margin: 0 18px 16px; padding: 10px 12px; border-radius: 12px; background: var(--amber); }
.status.error { background: #fde8e4; color: #8d2414; }

@media (max-width: 800px) {
  .top, .drop, .board-head { flex-direction: column; align-items: stretch; }
  .fields { justify-content: flex-start; }
  .brand p { max-width: 28ch; }
  .wrap { width: min(100% - 20px, 1120px); }
  table, thead, tbody, tr, th, td { display: block; width: 100%; }
  thead { display: none; }
  tr { padding: 8px 14px 14px; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 8px 0 0; }
  td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }
  td[data-label=""]::before { display: none; }
  td input { min-width: 0; }
  .note { max-width: none; }
}
