:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #172b3a;
  background: #f4f6f7;
  font-size: 16px;
  line-height: 1.5;
  --green: #075e54;
  --muted: #52606d;
  --border: #c7d0d6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  color: #172b3a;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover,
.button:hover {
  background: #e8eeeb;
}
button.primary,
.button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
a {
  color: var(--green);
}
:focus-visible {
  outline: 3px solid #155eef;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: -60px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
.layout {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
aside {
  background: #102f2d;
  color: #e6f0ed;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.brand {
  font-size: 27px;
  letter-spacing: 0.12em;
  font-weight: 800;
  display: block;
}
.brand small {
  font-size: 11px;
  letter-spacing: 0.23em;
  display: block;
  font-weight: 500;
}
nav {
  display: grid;
  gap: 8px;
}
nav a {
  padding: 12px 16px;
  color: #dbe8e2;
  text-decoration: none;
  border-radius: 6px;
}
nav a[aria-current='page'] {
  background: #244d45;
  color: white;
  font-weight: 650;
}
.aside-foot {
  margin-top: auto;
  font-size: 13px;
  color: #c1d4cc;
}
.workspace {
  min-width: 0;
}
.topbar {
  min-height: 74px;
  border-bottom: 1px solid var(--border);
  background: white;
  padding: 14px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar select {
  max-width: 260px;
}
main#main {
  max-width: 1400px;
  margin: auto;
  padding: 36px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 8px 0 14px;
}
h2 {
  font-size: 21px;
  margin: 0 0 18px;
}
h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 26px;
}
.page-head p {
  margin: 0;
  max-width: 750px;
  color: var(--muted);
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 24px;
}
.columns .card {
  margin-bottom: 24px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  background: #e8eeec;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.badge.approved,
.badge.confirmed,
.badge.ordered,
.badge.requirements_ready {
  background: #d8eee4;
  color: #15593d;
}
.badge.pending_approval {
  background: #fff0c2;
  color: #6a4700;
}
.badge.rejected,
.badge.inactive {
  background: #fde3e0;
  color: #842619;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #f7f9f9;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid #e1e6e9;
  vertical-align: top;
}
td.numeric,
th.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.empty {
  padding: 42px 20px;
  text-align: center;
}
.empty p {
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.flow {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex-wrap: wrap;
}
.flow li {
  padding: 8px 12px;
  background: #e6ebeb;
  border-radius: 5px;
  font-size: 13px;
}
.flow li.current {
  background: var(--green);
  color: white;
}
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #9facb4;
  border-radius: 5px;
  background: white;
  color: #172b3a;
  min-height: 44px;
}
textarea {
  min-height: 95px;
  resize: vertical;
}
input[readonly] {
  background: #f4f6f7;
}
fieldset {
  border: 1px solid var(--border);
  border-radius: 7px;
  margin: 18px 0;
  padding: 18px;
}
legend {
  font-weight: 650;
  padding: 0 8px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.full {
  grid-column: 1/-1;
}
.error {
  background: #fff0ed;
  color: #852d22;
  padding: 16px;
  border: 1px solid #e9aaa1;
  border-radius: 6px;
  margin: 14px 0;
}
.notice {
  background: #edf4f1;
  border-left: 3px solid var(--green);
  padding: 14px;
  margin: 16px 0;
}
.login {
  max-width: 530px;
  margin: 12vh auto;
  padding: 36px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.login .brand {
  color: var(--green);
  margin-bottom: 40px;
}
dialog {
  width: min(850px, calc(100% - 32px));
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  color: #172b3a;
}
dialog::backdrop {
  background: #102f2da6;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 24px;
}
.dialog-head h2 {
  margin: 4px 0;
}
.dialog-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
.note {
  border-left: 3px solid #c7d9d1;
  padding: 4px 0 4px 14px;
  margin: 18px 0;
}
.note p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.audit {
  list-style: none;
  padding: 0;
}
.audit li {
  padding: 12px 0;
  border-bottom: 1px solid #e5e9e7;
}
.audit strong {
  display: block;
  font-size: 14px;
}
.audit details {
  font-size: 13px;
}
.audit pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.total {
  font-size: 26px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  margin-top: 20px;
}
.search {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  max-width: 580px;
}
.search input {
  flex: 1;
}
.preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.quote-line {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.quote-line label {
  margin: 10px 0;
}
.caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  aside {
    padding: 16px 20px;
    gap: 14px;
  }
  .brand {
    font-size: 21px;
  }
  .brand small {
    display: inline;
    font-size: 10px;
    margin-left: 12px;
  }
  nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }
  nav a {
    padding: 10px;
  }
  .aside-foot {
    display: none;
  }
  .topbar {
    padding: 12px 20px;
  }
  main#main {
    padding: 24px 16px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .page-head {
    flex-direction: column;
  }
  h1 {
    font-size: 28px;
  }
  .card {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  dialog {
    padding: 20px;
  }
  dl {
    grid-template-columns: 100px 1fr;
  }
  .login {
    margin: 8vh 16px;
  }
}
