:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #213a42;
  background: #f3f6f5;
  font-size: 15px;
  --primary: #17685c;
  --line: #dce5e1;
}
.nav-group {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #b6d0c9;
  margin: 15px 10px 4px;
}
.menu-toggle {
  display: none;
}
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #607570;
  font-size: 0.9rem;
}
.steps span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e2eae6;
  flex-shrink: 0;
}
.steps [aria-current] {
  color: #17685c;
  font-weight: 700;
}
.steps [aria-current] span,
.steps .done span {
  background: #17685c;
  color: white;
}
.wizard {
  max-width: 1050px;
}
.wizard h2 {
  margin-top: 0;
}
.wizard-actions,
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.wizard-actions {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  justify-content: flex-end;
}
.wizard-actions button:first-child {
  margin-right: auto;
}
.lookup {
  padding: 10px;
  max-height: 410px;
  overflow: auto;
}
.lookup-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.lookup-row:last-child {
  border-bottom: 0;
}
.lookup-row:has(input:checked) {
  background: #edf6f1;
}
.lookup-row input {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: #17685c;
}
.recipient-options {
  margin-bottom: 24px;
  display: grid;
  gap: 14px;
}
.recipient-options input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: #17685c;
}
.lookup-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.lookup-row small,
.chosen span {
  display: block;
  color: #607570;
  margin-top: 5px;
  font-weight: 400;
}
.selection,
.chosen {
  padding: 16px;
  background: #edf6f1;
  border-radius: 8px;
  margin-top: 18px;
  overflow-wrap: anywhere;
}
.review-value {
  font-size: 1.5rem;
  font-weight: 700;
}
.review dd small {
  display: block;
  margin-top: 5px;
  color: #607570;
}
.search {
  align-items: flex-end;
}
.draft-help {
  color: #607570;
  font-size: 0.86rem;
}
.search label {
  min-width: 180px;
  flex: 1;
}
.search label:first-child {
  flex: 3;
}
.wizard .form-grid > small {
  grid-column: 1 / -1;
}
.wizard dd {
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
    position: absolute;
    right: 16px;
    top: 12px;
    background: transparent;
    color: white;
  }
  .sidebar .nav {
    display: none;
  }
  .sidebar.menu-open .nav {
    display: grid;
    overflow: visible;
  }
  .sidebar .brand {
    padding-right: 100px;
  }
}
@media (max-width: 540px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 14px;
  }
  .wizard-actions button {
    flex: 1 1 140px;
  }
  .search {
    flex-wrap: wrap;
  }
  .search label {
    min-width: 100%;
  }
  .lookup {
    max-height: 350px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 10px 15px;
  color: inherit;
}
button.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
button.danger {
  color: #a02b34;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:hover {
  filter: brightness(0.96);
}
:focus-visible {
  outline: 3px solid #319c91;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #bccdc5;
  border-radius: 6px;
  padding: 10px;
  background: white;
  color: #173a43;
}
textarea {
  min-height: 80px;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}
label small {
  font-weight: 400;
  color: #58706a;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
h1 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin: 0 0 10px;
}
h2 {
  font-size: 1.2rem;
  margin: 0 0 16px;
}
p {
  line-height: 1.6;
  color: #58706a;
}
a {
  color: var(--primary);
}
.login {
  max-width: 440px;
  margin: 8vh auto;
  padding: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px #173a430a;
}
.brand {
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  color: #d5eee6;
}
.eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #58706a;
  font-weight: 700;
}
.shell {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 100vh;
}
.sidebar {
  min-width: 0;
  background: #173a43;
  color: #e5eee9;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.sidebar p {
  color: #acc6bd;
  font-size: 0.86rem;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  text-align: left;
  border: 0;
  color: #d5e8df;
  background: transparent;
}
.nav button.selected {
  background: #2b5157;
  color: white;
}
.sidebar footer {
  margin-top: auto;
  font-size: 0.8rem;
  color: #9fbdb3;
}
.content {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 18px 32px;
}
.topbar select {
  max-width: 360px;
}
.topbar .user {
  display: flex;
  align-items: center;
  gap: 12px;
}
main.workspace {
  padding: 32px;
  max-width: 1450px;
  margin: auto;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 10px;
  margin-bottom: 22px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stat strong {
  font-size: 2rem;
  display: block;
  margin: 12px 0 4px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.full {
  grid-column: 1/-1;
}
.stack {
  display: grid;
  gap: 16px;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.table-wrap {
  overflow: auto;
  max-height: 65vh;
  border: 1px solid var(--line);
  border-radius: 7px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.91rem;
}
th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #f5f8f6;
  color: #5a716a;
  font-size: 0.8rem;
  z-index: 1;
}
td.wrap {
  white-space: normal;
  min-width: 200px;
}
td small {
  display: block;
  color: #60766f;
  margin-top: 5px;
}
td .actions {
  margin: 0;
  justify-content: flex-start;
}
td button {
  padding: 6px 10px;
}
.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  background: #e9f2ed;
  color: #17685c;
  font-size: 0.78rem;
  font-weight: 650;
}
.badge.warning {
  background: #fff2d8;
  color: #866119;
}
.notice {
  padding: 14px 18px;
  border: 1px solid #e5d8b4;
  background: #fffaed;
  color: #76581e;
  border-radius: 8px;
  margin-bottom: 22px;
  font-size: 0.9rem;
  line-height: 1.55;
}
.error {
  color: #a02b34;
  white-space: pre-wrap;
}
.empty {
  padding: 35px;
  text-align: center;
  color: #61766e;
}
.muted {
  color: #687d75;
}
.links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.87rem;
  margin-top: 24px;
}
.links button {
  border: 0;
  padding: 0;
  color: var(--primary);
  background: transparent;
}
dialog {
  width: min(740px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  color: #213a42;
  box-shadow: 0 20px 90px #0003;
}
dialog::backdrop {
  background: #152d3970;
}
dialog.wide {
  width: min(880px, 94vw);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.dialog-head h2 {
  margin: 0;
}
dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  margin: 20px 0;
}
dt {
  color: #62756f;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.87rem;
}
#feedback:not(:empty) {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 460px;
  background: #173a43;
  color: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 30px #0002;
  z-index: 20;
}
.progress {
  padding: 20px;
  color: #62756f;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
legend {
  padding: 0 7px;
}
.local-link {
  overflow-wrap: anywhere;
  background: #eef6f1;
  padding: 16px;
  border-radius: 8px;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .sidebar {
    padding: 16px;
    gap: 10px;
  }
  .sidebar p,
  .sidebar footer {
    display: none;
  }
  .nav {
    min-width: 0;
    max-width: 100%;
    display: flex;
    overflow: auto;
  }
  .nav button {
    white-space: nowrap;
  }
  .topbar {
    padding: 14px 18px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat strong {
    font-size: 1.5rem;
  }
  main.workspace {
    padding: 20px;
  }
  .page-head {
    align-items: flex-start;
  }
  .user span {
    display: none;
  }
}
@media (max-width: 540px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .topbar {
    gap: 10px;
  }
  .panel {
    padding: 18px;
  }
  .login {
    margin: 20px 14px;
    padding: 24px;
  }
  .page-head {
    flex-direction: column;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  dd {
    margin-bottom: 8px;
  }
  .user button {
    padding: 8px;
  }
  .topbar select {
    max-width: 240px;
  }
}
