:root {
  --ink: #182117;
  --muted: #667064;
  --paper: #f5f3ea;
  --card: #fffef8;
  --green: #245b36;
  --green2: #173f27;
  --gold: #d99a2b;
  --line: #d8d6c9;
  --red: #9f2f2f;
  --shadow: 0 10px 30px #1e351012;
}
* {
  box-sizing: border-box;
}
html {
  font:
    16px/1.45 system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
body {
  margin: 0;
}
a {
  color: var(--green2);
}
button,
.button {
  appearance: none;
  border: 1px solid var(--green);
  border-radius: 0.65rem;
  background: #fff;
  color: var(--green2);
  font: inherit;
  font-weight: 750;
  padding: 0.7rem 1rem;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
}
button:hover,
.button:hover {
  background: #edf3eb;
}
.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover {
  background: var(--green2);
}
.ghost {
  border-color: #ffffff55;
  background: transparent;
  color: #fff;
}
.small {
  padding: 0.45rem 0.7rem;
  min-height: 36px;
  font-size: 0.86rem;
}
.wrap {
  width: min(1280px, calc(100% - 2rem));
  margin: auto;
}
.skip {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 99;
  background: #fff;
  padding: 1rem;
}
.skip:focus {
  top: 1rem;
}
header {
  background: linear-gradient(120deg, var(--green2), var(--green));
  color: #fff;
  box-shadow: var(--shadow);
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0.03em;
}
.brand > span:first-child {
  font-size: 2rem;
}
.brand small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: #dae8d7;
}
nav {
  display: flex;
  gap: 0.25rem;
  overflow: auto;
  padding-bottom: 0.7rem;
}
nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}
nav a:hover {
  background: #ffffff1d;
}
main {
  padding: 2rem 0 4rem;
  min-height: 75vh;
}
footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}
.page-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.2rem;
}
.page-title h1,
.auth h1 {
  margin: 0.1rem 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.06;
}
.page-title p {
  margin: 0.25rem 0;
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 850;
  color: var(--green);
}
.card,
.auth {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.auth,
.narrow {
  max-width: 620px;
  margin: 4rem auto;
}
.card h2 {
  margin: 0.1rem 0 1rem;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.detail-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
}
.stack-gap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.section-head span {
  color: var(--muted);
  font-size: 0.85rem;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}
.metrics > * {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.metrics strong {
  display: block;
  font-size: 1.8rem;
}
.metrics span {
  color: var(--muted);
  font-size: 0.8rem;
}
.metrics .attention {
  border-color: #d98b46;
}
.pipeline {
  display: flex;
  flex-direction: column;
}
.pipeline a {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.clean {
  list-style: none;
  margin: 0;
  padding: 0;
}
.clean li {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
}
.clean span,
.record span,
.record small,
.file small {
  display: block;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sticky-actions {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--paper);
  padding: 0.6rem 0;
  margin-bottom: 1rem;
}
.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.summary > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.8rem;
}
.summary span,
.summary small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}
.summary .wide {
  grid-column: span 2;
}
.status,
.pill {
  display: inline-block;
  border-radius: 999px;
  background: #e4eee1;
  color: var(--green2);
  padding: 0.22rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 800;
}
.alert {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.8rem;
  margin-bottom: 1rem;
}
.danger {
  background: #fbe4e2;
  color: #762020;
}
.warning {
  color: #8a5611;
  font-weight: 750;
}
.flash {
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  margin-bottom: 1rem;
  background: #e4eee1;
}
.flash.warning {
  background: #fff0cb;
}
.flash.danger {
  background: #fbe4e2;
}
.facts {
  display: grid;
  grid-template-columns: minmax(100px, 0.35fr) 1fr;
  gap: 0.55rem 1rem;
}
.facts dt {
  color: var(--muted);
  font-size: 0.8rem;
}
.facts dd {
  margin: 0;
  word-break: break-word;
}
.record {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.record:last-of-type {
  border-bottom: 0;
}
.record.pending {
  border-left: 4px solid var(--gold);
  padding-left: 0.7rem;
}
.record.received {
  border-left: 4px solid var(--green);
  padding-left: 0.7rem;
}
.timeline article {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline time {
  color: var(--muted);
  font-size: 0.78rem;
}
.timeline p {
  margin: 0.3rem 0;
}
.file {
  display: block;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.stack,
.form-grid {
  display: grid;
  gap: 0.75rem;
}
.form-grid {
  grid-template-columns: 1fr 1fr;
}
.span2 {
  grid-column: span 2;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #384237;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #b8bdaf;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.65rem;
  font: inherit;
  color: var(--ink);
  min-height: 42px;
}
textarea {
  min-height: 80px;
  resize: vertical;
}
.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.check input {
  width: 1.15rem;
  min-height: 1.15rem;
}
.inline-form {
  display: flex;
  gap: 0.45rem;
  align-items: end;
  margin-top: 0.55rem;
}
.compact {
  margin-top: 0.5rem;
}
.accent {
  border-top: 5px solid var(--gold);
}
details {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}
summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--green2);
  padding: 0.35rem 0;
}
details form {
  margin-top: 0.8rem;
}
.search {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}
.search input {
  flex: 1;
}
.filters {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.filters a {
  color: var(--green2);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.8rem;
}
.filters a.active {
  background: var(--green);
  color: #fff;
}
.table-wrap {
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
th,
td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: #eeede4;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
td {
  font-size: 0.86rem;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 0.2rem;
}
.user-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto auto auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.user-row small {
  display: block;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
:focus-visible {
  outline: 3px solid #f2b94f;
  outline-offset: 2px;
}
@media (max-width: 850px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .two,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .summary .wide {
    grid-column: span 2;
  }
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .sticky-actions {
    position: static;
  }
  .user-row {
    grid-template-columns: 1fr 1fr;
  }
  .user-row > div {
    grid-column: span 2;
  }
}
@media (max-width: 560px) {
  .wrap {
    width: min(100% - 1rem, 1280px);
  }
  main {
    padding-top: 1rem;
  }
  .top {
    padding: 0.7rem 0;
  }
  .brand {
    font-size: 0.9rem;
  }
  .brand > span:first-child {
    font-size: 1.5rem;
  }
  .metrics {
    gap: 0.5rem;
  }
  .metrics > * {
    padding: 0.75rem;
  }
  .metrics strong {
    font-size: 1.4rem;
  }
  .summary {
    display: block;
  }
  .summary > div {
    margin-bottom: 0.45rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
  .timeline article {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .card {
    padding: 0.9rem;
  }
  .actions > * {
    flex: 1 1 45%;
  }
  footer {
    flex-direction: column;
    gap: 0.4rem;
  }
}
