:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #213330;
  background: #f3f6f4;
  font-size: 14px;
}
.wide-picker {
  max-width: 1200px;
}
.lookup-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.lookup-filters label {
  flex: 1;
  min-width: 120px;
}
.lookup-table {
  overflow-x: auto;
  margin: 16px 0;
  max-height: 55vh;
}
.lookup-table table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
  min-width: 650px;
}
.lookup-table th,
.lookup-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #dbe4df;
  text-align: left;
}
.lookup-table th {
  background: #e8efeb;
  position: sticky;
  top: 0;
}
.lookup-table tr.selected {
  background: #dcf0e4;
}
.lookup-actions {
  justify-content: flex-end;
  padding: 16px 0 0;
  position: sticky;
  bottom: 0;
  background: #f3f6f4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  padding: 22px 20px 16px;
  background: #113f36;
  color: #fff;
}
.brand {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.8px;
  margin: 0;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-weight: 700;
}
header p {
  color: #bcdacf;
  margin: 5px 0 0;
}
nav {
  display: flex;
  gap: 20px;
  padding: 0 20px;
  background: white;
  border-bottom: 1px solid #dbe4df;
}
nav button {
  border: 0;
  border-radius: 0;
  padding: 15px 0 12px;
  color: #6c7972;
  background: transparent;
}
nav button[aria-selected="true"] {
  color: #13664c;
  border-bottom: 3px solid #17825e;
}
main {
  padding: 18px;
  max-width: 720px;
  margin: auto;
}
h1 {
  font-size: 22px;
  font-weight: 650;
  margin: 0 0 8px;
}
h2 {
  font-size: 16px;
  margin: 0 0 10px;
}
h3 {
  font-size: 14px;
  margin: 0 0 5px;
}
p {
  line-height: 1.5;
  margin: 8px 0;
}
.muted,
small {
  color: #66766e;
  font-size: 12px;
}
.card {
  padding: 16px;
  margin: 14px 0;
  background: white;
  border: 1px solid #dbe4df;
  border-radius: 10px;
}
.destination {
  border-left: 4px solid #167859;
}
.connection-summary {
  border-left: 5px solid #b0781d;
  background: #fff9ec;
  margin-top: 0;
}
.connection-summary.is-connected {
  border-color: #16825e;
  background: #eaf6ef;
}
.connection-summary.is-checking {
  border-color: #7b9488;
  background: #edf2ef;
}
.connection-state,
.selection-label {
  font-size: 11px;
  letter-spacing: 0.6px;
  font-weight: 750;
  margin: 0 0 10px;
  color: #775018;
}
.is-connected .connection-state {
  color: #116044;
}
.connection-summary h2 {
  font-size: 20px;
  overflow-wrap: anywhere;
}
.connection-help {
  font-size: 13px;
}
.connection-card {
  border: 2px solid #dbe4df;
}
.connection-card.is-selected {
  border-color: #16825e;
  background: #eff9f3;
  box-shadow: 0 0 0 1px #16825e;
}
.connection-card.is-checking {
  border-color: #7b9488;
}
.selection-label {
  margin: -16px -16px 16px;
  padding: 10px 16px;
  border-radius: 7px 7px 0 0;
  background: #14654c;
  color: white;
}
.connection-select {
  font-size: 13px;
  min-height: 40px;
}
.is-selected .connection-select:disabled {
  opacity: 1;
}
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 4px 7px;
  background: #e2f1e8;
  color: #24634a;
  border-radius: 4px;
  font-weight: 700;
}
.production {
  background: #fff1d4;
  color: #80540d;
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.between {
  justify-content: space-between;
}
.identity {
  overflow-wrap: anywhere;
}
label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin: 14px 0 6px;
}
select,
input[type="text"],
input[type="url"] {
  width: 100%;
  border: 1px solid #b8c9bf;
  border-radius: 6px;
  background: white;
  color: #213330;
  padding: 10px;
  font: inherit;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  font-weight: 400;
}
input[type="checkbox"] {
  accent-color: #137553;
  margin: 3px 0 0;
}
button {
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  border: 1px solid #bdd0c5;
  border-radius: 6px;
  padding: 9px 12px;
  background: white;
  color: #235641;
}
button.primary {
  color: white;
  background: #14654c;
  border-color: #14654c;
}
button.wide {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #61a4e4;
  outline-offset: 2px;
}
.notice {
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 6px;
  background: #e5ede8;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
.error {
  background: #fff0e8;
  color: #883c21;
}
.demo {
  background: #fff1d4;
  padding: 9px 18px;
  font-size: 11px;
  color: #704b0c;
  font-weight: 600;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.step {
  border-top: 3px solid #d8e1dc;
  padding-top: 7px;
  color: #839087;
  font-size: 11px;
}
.step.active {
  border-color: #19835e;
  color: #14654c;
}
.small-button {
  font-size: 11px;
  padding: 6px 8px;
}
.code {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}
footer {
  padding: 0 18px 18px;
  font-size: 11px;
  color: #7a897f;
  max-width: 720px;
  margin: auto;
}
[hidden] {
  display: none !important;
}
.profile-purpose {
  margin: 18px 0;
  border-top: 1px solid #dbe4df;
  border-bottom: 1px solid #dbe4df;
  padding: 16px 0;
}
.profile-purpose h2,
#receipt h2 {
  margin-top: 10px;
}
.import-facts {
  margin: 14px 0;
}
.import-facts dt {
  color: #66766e;
  font-size: 11px;
  margin-top: 12px;
}
.import-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.import-targets {
  border-left: 3px solid #a7cdbd;
  padding-left: 12px;
  margin: 18px 0;
}
.import-targets > div + div {
  margin-top: 14px;
}
.import-targets p {
  margin-top: 3px;
}
.import-details {
  border-top: 1px solid #dbe4df;
  padding-top: 12px;
  margin-top: 16px;
}
.import-details summary {
  cursor: pointer;
  color: #14654c;
  font-weight: 600;
  font-size: 12px;
}
.import-details summary:focus-visible {
  outline: 3px solid #61a4e4;
  outline-offset: 3px;
}
.receipt-lead {
  font-size: 13px;
}
.receipt-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 10px;
  font-size: 12px;
  margin: 18px 0;
}
.receipt-status dt,
.receipt-status dd {
  border-bottom: 1px solid #edf1ee;
  padding: 10px 0;
  margin: 0;
}
.receipt-status dd {
  color: #687870;
}
/* Guided stages use bounded lists in the narrow Excel pane. */
.workflow-progress {
  display: flex;
  gap: 6px;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.workflow-progress li {
  flex: 1;
  min-width: 55px;
  font-size: 12px;
  padding: 8px 3px;
  border-bottom: 3px solid #d4e1dc;
}
.workflow-progress li.active {
  border-color: #147a5e;
  font-weight: 700;
  color: #12483f;
}
.workflow-list {
  max-height: 420px;
  overflow: auto;
  margin: 12px 0;
  contain: layout style;
}
.workflow-row {
  padding: 12px 0;
  border-bottom: 1px solid #dbe5e1;
  overflow-wrap: anywhere;
}
.workflow-row h4 {
  margin: 6px 0;
}
.workflow-row p {
  margin: 6px 0;
}
.receipt-counts {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 12px 0;
}
.receipt-counts th,
.receipt-counts td {
  padding: 8px 2px;
  border-bottom: 1px solid #dbe5e1;
  overflow-wrap: normal;
  text-align: center;
}
.receipt-counts th:first-child {
  width: 25%;
  text-align: left;
}
/* Guided pane: one active stage, compact destination, expandable detail. */
.pane-header {
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.pane-header .brand {
  font-size: 20px;
  flex: 1 0 auto;
}
.connection-chip {
  background: #23574b;
  border-color: #487568;
  color: #fff;
  padding: 7px 9px;
  font-size: 11px;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
}
.connection-chip[data-state="attention"] {
  background: #fff1d4;
  color: #704b0c;
}
.back-to-import {
  margin: 12px 16px 0;
  border: 0;
  background: transparent;
}
#app > main {
  padding: 14px 16px;
}
.step-nav {
  padding: 0;
  background: transparent;
  border: 0;
  gap: 3px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 18px;
}
.step-nav button {
  border: 0;
  padding: 0;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-direction: column;
  color: #54685f;
  min-width: 0;
}
.step-nav .step-number {
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #e0e9e3;
  font-size: 12px;
  font-weight: 700;
}
.step-nav button.selected {
  color: #14654c;
  font-weight: 750;
}
.step-nav button.selected .step-number {
  background: #14654c;
  color: white;
  box-shadow: 0 0 0 3px #d5e9df;
}
.step-nav button:disabled {
  opacity: 0.45;
}
.import-context {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
#step-heading {
  scroll-margin-top: 85px;
}
.step-details {
  border: 1px solid #dbe5df;
  border-radius: 7px;
  background: #fff;
  margin: 8px 0;
  padding: 0 12px;
}
.step-details > summary {
  cursor: pointer;
  padding: 12px 0;
  color: #245e49;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.step-details > summary:focus-visible {
  outline: 3px solid #61a4e4;
  outline-offset: 2px;
}
.step-details[open] > summary {
  border-bottom: 1px solid #e4ece7;
  margin-bottom: 8px;
}
.step-details .step-details {
  border-left: 0;
  border-right: 0;
}
#send-view .workflow-list {
  max-height: none;
  overflow: visible;
  contain: none;
}
#send-view .workflow-list > .step-details > .workflow-row:last-child {
  border-bottom: 0;
}
.step-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid #dbe5df;
  padding: 10px 0;
  margin-top: 12px;
}
.step-actions button.wide {
  margin-top: 0;
}
.step-actions .check {
  margin-top: 0;
}
.review-summary {
  background: #edf5f0;
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
}
.workspace-tools {
  margin-top: 20px;
  background: transparent;
}
#guided-workflow .source-evidence {
  margin: 0;
  padding: 0;
  border: 0;
}
#profile-purpose {
  padding: 10px 0;
  margin: 10px 0;
}
#profile-purpose .badge {
  font-size: 9px;
}
#profile-purpose > p {
  font-size: 12px;
}
#message:not(.error) {
  margin: 8px 0 14px;
}
#completed-step > .notice {
  margin-top: 12px;
}
#completed-step .card {
  margin-bottom: 0;
}
@media (min-width: 540px) {
  .step-nav button {
    font-size: 12px;
  }
  .pane-header {
    padding: 14px 20px;
  }
}
.bid-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bid-choice > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bid-choice button {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 8px;
}
#setup-step > label:first-child {
  margin-top: 0;
}

/* Feedback: every press is acknowledged, and a running action says so. */
button:not(:disabled):active {
  transform: translateY(1px);
  filter: brightness(0.94);
}
button.primary:not(:disabled):hover {
  background: #105640;
}
button:not(.primary):not(:disabled):hover {
  background: #f1f6f3;
}
button.is-busy,
button.is-busy:disabled {
  opacity: 1;
  cursor: progress;
  position: relative;
  padding-left: 34px;
}
button.is-busy::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
#app[data-busy="true"]::before {
  content: "";
  position: fixed;
  z-index: 5;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #2fa37a, transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: sweep 1.1s ease-in-out infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes sweep {
  from {
    background-position: -40% 0;
  }
  to {
    background-position: 140% 0;
  }
}
.run-progress {
  margin: 0 0 14px;
}
.run-progress-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.run-progress-head h2 {
  margin: 0;
  font-size: 14px;
  flex: 1;
}
.link-button,
button.link-button {
  border: 0;
  padding: 2px 4px;
  background: none;
  font-weight: 400;
  font-size: 12px;
  text-decoration: underline;
}
.run-stages {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.run-stages li {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 8px;
  align-items: start;
  padding: 5px 0;
  font-size: 13px;
  color: #6a7d76;
}
.run-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c3d3cb;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: white;
}
.run-stages li[data-state="done"] {
  color: #213330;
}
.run-stages li[data-state="done"] .run-mark {
  background: #14654c;
  border-color: #14654c;
}
.run-stages li[data-state="running"] {
  color: #14654c;
  font-weight: 600;
}
.run-stages li[data-state="running"] .run-mark {
  border-color: #14654c;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
.run-stages li[data-state="waiting"] {
  color: #6b4205;
  font-weight: 600;
}
.run-stages li[data-state="waiting"] .run-mark {
  background: #d08a1c;
  border-color: #d08a1c;
}
.run-stages li[data-state="failed"] {
  color: #883c21;
  font-weight: 600;
}
.run-stages li[data-state="failed"] .run-mark {
  background: #b4472a;
  border-color: #b4472a;
}
.run-note {
  grid-column: 2;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  button.is-busy::before,
  .run-stages li[data-state="running"] .run-mark,
  #app[data-busy="true"]::before {
    animation: none;
  }
  .run-stages li[data-state="running"] .run-mark {
    border-right-color: #14654c;
    background: #cfe5da;
  }
  #app[data-busy="true"]::before {
    background: #2fa37a;
  }
}
