:root {
  --ink: #192d30;
  --muted: #6c7775;
  --paper: #f5f5ef;
  --line: #dce1d9;
  --teal: #176657;
  --amber: #9b6210;
  --white: #fff;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #dc9e39;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: var(--ink);
  color: #dce6df;
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.6px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #a9bbb4;
  margin-top: 3px;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: #d5e8bb;
  color: var(--ink);
  width: 37px;
  height: 43px;
  font-size: 30px;
  border-radius: 5px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #95aaa2;
  margin: 54px 12px 14px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 7px;
  color: #b6c7c1;
  padding: 13px;
  margin: 4px 0;
  font-size: 17px;
}
.nav span {
  font-size: 14px;
}
.nav:hover {
  background: #284044;
}
.nav.active {
  background: #d8e8c6;
  color: var(--ink);
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 11px;
  color: #9db3aa;
  border-top: 1px solid #36504e;
  padding-top: 23px;
}
.sidebar-bottom a {
  color: #cee0d6;
  text-decoration: none;
}
.health {
  color: #b6d8a3;
}
.health.bad {
  color: #ffd297;
}
main {
  margin-left: 238px;
  padding: 0 40px;
  max-width: 1750px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 23px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--muted);
}
h1 {
  font-size: 23px;
  letter-spacing: -0.6px;
  line-height: 1.3;
  margin: 3px 0 0;
}
h2 {
  font-size: 27px;
  font-weight: 550;
  letter-spacing: -0.8px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0;
  font-weight: 650;
}
p {
  color: var(--muted);
  margin: 8px 0 15px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 29px 0 24px;
}
.section-heading p {
  margin: 6px 0 0;
  font-size: 13px;
}
.pill {
  border: 1px solid #ccd7c8;
  color: #52664e;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.1px;
  border-radius: 20px;
  padding: 5px 12px;
  white-space: nowrap;
}
.button {
  min-height: 44px;
  border-radius: 6px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.primary:hover {
  background: #104c41;
}
.secondary {
  background: white;
  color: var(--ink);
}
.secondary:hover {
  background: #edf2e8;
}
.danger {
  color: #a33b32;
}
.full {
  width: 100%;
  justify-content: space-between;
  margin-top: 20px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bdc7c1;
}
.dot.connected {
  background: var(--teal);
}
.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
  min-width: 0;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eef0ea;
  padding-bottom: 17px;
  margin-bottom: 22px;
}
.panel-heading > span {
  font-size: 9px;
  color: #657164;
  letter-spacing: 1px;
}
.dropzone {
  min-height: 292px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #b9c9bb;
  border-radius: 8px;
  background: #fafbf7;
  cursor: pointer;
  text-align: center;
  padding: 25px;
  gap: 9px;
}
.dropzone:hover,
.dropzone.drag {
  border-color: var(--teal);
  background: #f1f7eb;
}
.dropzone > span:last-of-type {
  font-size: 11px;
  color: var(--muted);
}
.upload-icon {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  font-size: 33px;
  color: var(--teal);
  background: #e9efdf;
  border-radius: 12px;
  margin-bottom: 10px;
}
.dropzone input {
  max-width: 100%;
  font-size: 11px;
  margin-top: 8px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 15px 0 7px;
}
input,
select {
  width: 100%;
  min-height: 44px;
  background: white;
  border: 1px solid #cfd7cd;
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink);
}
.optional {
  color: #657164;
  font-weight: 400;
  font-size: 10px;
  margin-left: 7px;
}
.footnote {
  font-size: 11px;
  line-height: 1.8;
  margin: 16px 0 0;
}
.result-panel {
  min-height: 535px;
}
.empty {
  text-align: center;
  padding: 70px 12px;
  color: var(--muted);
}
.empty h3 {
  color: var(--ink);
  font-size: 17px;
}
.empty p {
  font-size: 12px;
  max-width: 275px;
  margin: 9px auto;
}
.empty-symbol {
  display: block;
  font-size: 46px;
  color: #a2b3a4;
  margin-bottom: 16px;
  font-weight: 200;
}
.result-banner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  align-items: center;
}
.badge {
  display: inline-flex;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 600;
  text-transform: capitalize;
}
.amber,
.pending {
  background: #fcf0d8;
  color: #8c5e14;
}
.confirmed {
  background: #e6f1df;
  color: #386431;
}
.rejected,
.merged {
  background: #f4e9e7;
  color: #89554f;
}
.amount-block {
  padding: 25px 0 22px;
  border-bottom: 1px solid #eef0ea;
}
.amount {
  font-size: 49px;
  line-height: 1.3;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.amount-block > span:last-child {
  font-size: 12px;
  color: var(--muted);
}
dl {
  margin: 18px 0;
}
.result-fields > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 0;
}
.result-fields dt {
  font-size: 12px;
  color: var(--muted);
}
.result-fields dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 65%;
}
.warnings {
  font-size: 12px;
  color: #8c5e14;
  padding-left: 18px;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0;
}
details {
  border-top: 1px solid #eef0ea;
  padding-top: 14px;
  font-size: 11px;
}
summary {
  cursor: pointer;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f2f5f0;
  padding: 15px;
  border-radius: 6px;
  font-size: 11px;
  max-height: 420px;
  overflow: auto;
  color: #3b5148;
}
.request-id {
  font-family: monospace;
  font-size: 9px;
  color: #889187;
  margin-top: 15px;
  overflow-wrap: anywhere;
}
#preview {
  width: 100%;
  height: 292px;
  object-fit: contain;
  background: #f1f0e9;
  border-radius: 6px;
}
.file-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.link-button {
  border: 0;
  background: none;
  color: var(--teal);
  font-size: 11px;
  white-space: nowrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef1e8;
}
.stats > div {
  padding: 20px 25px;
  border-right: 1px solid var(--line);
}
.stats > div:last-child {
  border: 0;
}
.stats span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.stats strong {
  font-size: 29px;
  font-weight: 500;
}
.table-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}
.table-toolbar input {
  max-width: 360px;
}
.table-toolbar select {
  width: auto;
  margin-left: auto;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
}
td {
  padding: 15px 10px;
  border-bottom: 1px solid #eef0ea;
}
.mono {
  font: 10px monospace;
  color: var(--muted);
}
.compact {
  padding: 32px 12px;
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
}
.inline-form {
  display: flex;
  gap: 9px;
}
.inline-form button {
  white-space: nowrap;
}
.profile-list {
  margin-top: 20px;
}
.profile-item {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e8ece4;
  background: white;
  padding: 15px 5px;
}
.profile-item.selected {
  border-left: 3px solid var(--teal);
  padding-left: 12px;
  background: #f3f7ef;
}
.profile-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.step-title {
  font-size: 12px;
  border-top: 1px solid #e8ece4;
  padding-top: 20px;
  margin-top: 22px;
}
.version-row {
  padding: 14px 0;
  border-bottom: 1px solid #e8ece4;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.version-row > span {
  margin-right: auto;
}
.version-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.samples-summary {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.dialog-heading h2 {
  font-size: 22px;
}
.icon-button {
  border: 0;
  background: transparent;
  min-width: 40px;
  min-height: 44px;
  font-size: 25px;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 510px;
  width: calc(100% - 32px);
  padding: 26px;
  color: var(--ink);
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #152d2fc7;
}
.wide-dialog {
  max-width: 850px;
}
dialog p {
  font-size: 12px;
}
.merchant-meta {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.action-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin: 33px 0 0;
  padding: 18px 0;
  color: #657164;
  font-size: 10px;
}
#notice {
  padding: 12px 16px;
  border-radius: 6px;
  background: #e8efdf;
  border: 1px solid #cddcc2;
  font-size: 12px;
  margin-top: 18px;
  overflow-wrap: anywhere;
}
#notice.error {
  background: #fbede6;
  border-color: #e6c5b9;
  color: #883e29;
}
@media (min-width: 1500px) {
  main {
    padding: 0 54px;
  }
  .dropzone,
  #preview {
    min-height: 350px;
    height: 350px;
  }
}
@media (max-width: 1050px) {
  .sidebar {
    width: 194px;
    padding: 27px 15px;
  }
  .brand {
    font-size: 17px;
  }
  .brand small {
    font-size: 8px;
  }
  .brand-icon {
    width: 30px;
  }
  main {
    margin-left: 194px;
    padding: 0 24px;
  }
  .panel {
    padding: 18px;
  }
  .lab-grid,
  .profile-grid {
    gap: 16px;
  }
  .amount {
    font-size: 38px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px 18px;
  }
  .brand small,
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .brand {
    font-size: 18px;
  }
  .brand-icon {
    height: 32px;
    font-size: 25px;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
    margin-top: 15px;
  }
  .nav {
    justify-content: center;
    padding: 10px 4px;
    gap: 5px;
    margin: 0;
  }
  .nav span {
    font-size: 11px;
  }
  .nav {
    font-size: 14px;
  }
  main {
    margin: 0;
    padding: 0 18px;
  }
  .topbar {
    padding: 20px 0;
    gap: 10px;
  }
  .topbar .button {
    font-size: 10px;
    padding: 8px 10px;
  }
  h1 {
    font-size: 21px;
  }
  h2 {
    font-size: 23px;
  }
  .section-heading {
    align-items: flex-start;
    margin: 23px 0 18px;
  }
  .section-heading .pill {
    display: none;
  }
  .section-heading p {
    font-size: 12px;
  }
  .lab-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .result-panel {
    min-height: 360px;
  }
  .empty {
    padding: 42px 10px;
  }
  .stats > div {
    padding: 14px 11px;
  }
  .stats span {
    font-size: 10px;
  }
  .stats strong {
    font-size: 24px;
  }
  .table-toolbar {
    flex-wrap: wrap;
  }
  .table-toolbar select {
    width: 100%;
  }
  .panel {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .amount {
    font-size: 44px;
  }
  footer {
    gap: 15px;
    font-size: 9px;
  }
  .inline-form {
    flex-wrap: wrap;
  }
  .inline-form input {
    flex: 1;
    min-width: 120px;
  }
  dialog {
    padding: 20px;
  }
  .result-actions > .button {
    flex: 1;
  }
  .file-caption {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

.link-button {
  min-height: 44px;
}

.dialog-feedback {
  color: #883e29;
  background: #fbede6;
  padding: 12px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.job-card { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 12px; margin: 12px 0; }
.job-card strong, .job-card small { display: block; overflow-wrap: anywhere; }
#job-list { max-height: 340px; overflow-y: auto; padding-right: 4px; }
#job-lookup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 12px 0; }
#job-lookup label { grid-column: 1 / -1; }

.jobs-panel { margin-top: 24px; }
.job-card.selected { border-color: var(--ink, #234); background: #f0f4e9; }
.result-panel { scroll-margin-top: 20px; }

#active-job { padding: 12px; margin-bottom: 16px; border-radius: 8px; background: #f0f4e9; overflow-wrap: anywhere; font-size: 12px; }
