:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #172c3c;
  background: #f4f7f8;
  font-size: 14px;
  --ink: #172c3c;
  --muted: #657784;
  --teal: #087e82;
  --line: #dce5e8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 11px 17px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.3;
}
button:hover,
.button:hover {
  background: #eef5f5;
  text-decoration: none;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
.primary:hover {
  background: #05696e;
}
.danger {
  color: #a23838;
  border-color: #e9c7c7;
}
.small {
  padding: 7px 11px;
  font-size: 12px;
}
:focus-visible {
  outline: 3px solid #20abae;
  outline-offset: 3px;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 222px;
  background: #142b3c;
  color: #b9cbd6;
  display: flex;
  flex-direction: column;
  padding: 30px 16px;
  z-index: 3;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: white;
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 700;
  padding: 0 13px;
}
.brand:hover {
  text-decoration: none;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  color: #95afbf;
  font-weight: 500;
  margin-top: 7px;
}
nav {
  margin-top: 44px;
  display: grid;
  gap: 6px;
}
nav a {
  color: #c2d0d9;
  padding: 13px 15px;
  border-radius: 6px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13px;
}
nav a:hover {
  background: #1e3a4b;
  text-decoration: none;
}
nav a.active {
  background: #234556;
  color: #fff;
  box-shadow: inset 3px 0 #41c4bf;
}
nav a span {
  font-size: 19px;
  min-width: 18px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 12px;
  font-size: 12px;
}
.sidebar-bottom small {
  display: block;
  color: #819baa;
  font-size: 10px;
  line-height: 1.9;
  margin-top: 12px;
}
.local-dot,
.local-tag i {
  width: 7px;
  height: 7px;
  background: #56b7a2;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.workspace {
  margin-left: 222px;
}
header {
  height: 65px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  background: #fff;
  color: #768792;
  font-size: 10px;
  letter-spacing: 1.3px;
}
header b {
  font-weight: 400;
  margin: 0 12px;
  color: #c7d3d9;
}
.local-tag {
  letter-spacing: 0;
  font-size: 12px;
  color: #536b77;
}
main {
  padding: 35px 38px 45px;
  max-width: 1550px;
  margin: auto;
  min-height: calc(100vh - 113px);
}
footer {
  height: 48px;
  padding: 0 38px;
  color: #8a99a2;
  font-size: 11px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 27px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #64828b;
  margin: 0 0 9px;
  text-transform: uppercase;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.9px;
  line-height: 1.2;
  margin: 0 0 9px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.2px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0 0 15px;
}
p {
  line-height: 1.65;
}
p.sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 0 29px;
}
.card,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.stat {
  padding: 22px 24px;
}
.stat .label {
  font-size: 12px;
  color: #607684;
}
.stat strong {
  font-size: 32px;
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
  letter-spacing: -1px;
}
.stat small {
  font-size: 11px;
  color: #83939d;
}
.panel {
  padding: 25px;
  margin-bottom: 22px;
}
.panel.table-panel {
  padding: 0;
  overflow: hidden;
}
.panel-head {
  padding: 20px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.panel-head a {
  font-size: 12px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  padding: 12px 19px;
  background: #f6f8f9;
  font-size: 10px;
  color: #687e8a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 16px 19px;
  border-bottom: 1px solid #edf1f3;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td.name {
  max-width: 290px;
  min-width: 160px;
  overflow-wrap: anywhere;
}
td small {
  display: block;
  color: #8797a1;
  font-size: 10px;
  margin-top: 5px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.chip {
  display: inline-block;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  background: #e8eff2;
  color: #5f7581;
}
.chip.finalized {
  background: #e0f2ec;
  color: #287b61;
}
.chip.sent {
  background: #e5edf9;
  color: #42699b;
}
.chip.void {
  background: #faeaea;
  color: #b65353;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.toolbar input {
  flex: 1;
  max-width: 450px;
}
.toolbar select {
  width: 180px;
}
.muted {
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 55px 25px;
  color: var(--muted);
}
.empty b {
  font-size: 17px;
  color: var(--ink);
  display: block;
  margin-bottom: 8px;
}
.empty p {
  margin-bottom: 20px;
}
.empty-icon {
  font-size: 35px;
  margin-bottom: 17px;
  color: #aac2c9;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
}
.form-panel {
  max-width: 790px;
}
.field {
  margin-bottom: 23px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 8px;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cad7dd;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  min-height: 41px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
}
input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  accent-color: var(--teal);
  flex-shrink: 0;
}
input[type="file"] {
  padding: 8px;
  font-size: 12px;
}
textarea {
  resize: vertical;
  min-height: 85px;
}
.hint {
  font-size: 11px;
  color: #80939d;
  margin-top: 7px;
  line-height: 1.5;
}
.field-error {
  color: #b33b3b;
  font-size: 12px;
  margin-top: 7px;
  line-height: 1.6;
}
.invalid {
  border-color: #ba5252;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.actions.end {
  justify-content: flex-end;
}
.form-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.notice {
  padding: 14px 17px;
  border-radius: 6px;
  background: #edf6f5;
  color: #4a716c;
  font-size: 12px;
  line-height: 1.65;
  margin-bottom: 21px;
}
.notice.warn {
  background: #fff6e7;
  border: 1px solid #ecdcba;
  color: #806130;
}
.notice.error {
  background: #fff0ee;
  border: 1px solid #edccc5;
  color: #9e4436;
}
.notice.success {
  background: #e9f5ed;
  color: #32704b;
}
.steps {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  color: #81939c;
  font-size: 11px;
}
.steps b {
  color: var(--teal);
}
.steps i {
  height: 1px;
  width: 40px;
  background: #cddadf;
}
.review-list {
  margin: 5px 0 0;
}
.review-list > div {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 15px;
  border-bottom: 1px solid #eaf0f2;
  padding: 16px 0;
}
.review-list > div:last-child {
  border-bottom: 0;
}
.review-list dt {
  font-size: 12px;
  color: #768b96;
}
.review-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.barcode-card {
  text-align: center;
}
.barcode-card h3 {
  text-align: left;
}
.barcode-card img {
  width: 290px;
  max-width: 100%;
  image-rendering: auto;
}
.preview-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 1px;
  background: #f2f5f7;
  color: #7a8d98;
  padding: 5px 10px;
  border-radius: 4px;
  margin: 10px;
}
.detail-top {
  display: flex;
  gap: 15px;
  align-items: center;
}
.detail-top h1 {
  margin-bottom: 0;
}
.check-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.6;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #7b8e98;
  margin-top: 16px;
}
.audit {
  font-size: 12px;
}
.audit > div {
  padding: 13px 0;
  border-bottom: 1px solid #edf1f3;
}
.audit time {
  display: block;
  color: #8c9da6;
  font-size: 10px;
  margin-top: 5px;
}
.audit pre {
  font:
    11px ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #647b86;
}
.export-note {
  font-size: 11px;
  color: #7a8c96;
  line-height: 1.65;
  margin-top: 18px;
}
.product-search-results {
  border: 1px solid var(--line);
  border-radius: 5px;
  max-height: 220px;
  overflow: auto;
  margin-top: 5px;
}
.product-option {
  border: 0;
  border-bottom: 1px solid #edf1f3;
  border-radius: 0;
  display: block;
  text-align: left;
  width: 100%;
  white-space: normal;
  font-weight: 400;
}
.product-option small {
  display: block;
  margin-top: 5px;
  color: #738993;
}
.selected-product {
  padding: 12px 15px;
  background: #edf5f5;
  border-radius: 5px;
  margin-top: 10px;
  font-size: 13px;
}
.selected-product small {
  display: block;
  margin-top: 5px;
  color: #64858b;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 26px;
  z-index: 10;
  max-width: 480px;
  padding: 14px 20px;
  background: #173e46;
  color: white;
  border-radius: 6px;
  box-shadow: 0 6px 22px #1233;
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  width: 480px;
  max-width: 95vw;
  color: var(--ink);
  box-shadow: 0 20px 100px #1234;
}
dialog::backdrop {
  background: #122a3a88;
}
dialog h2 {
  font-size: 21px;
  margin-bottom: 15px;
}
dialog .actions {
  justify-content: flex-end;
  margin-top: 22px;
}
.loading {
  padding: 60px;
  text-align: center;
  color: #718893;
}
progress {
  width: 100%;
  accent-color: var(--teal);
  height: 10px;
  margin: 15px 0;
}
.skip {
  position: fixed;
  top: -50px;
  left: 240px;
  background: white;
  padding: 10px;
  z-index: 20;
}
.skip:focus {
  top: 5px;
}
.inline-code {
  padding: 2px 5px;
  background: #f1f5f6;
  border-radius: 3px;
  font-family: monospace;
}
.help-list {
  padding-left: 18px;
  color: #6f848e;
  line-height: 2.1;
  font-size: 12px;
}
.link-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--teal);
  font-size: 12px;
}
.long-path {
  overflow-wrap: anywhere;
  font-size: 12px;
}
.section-gap {
  margin-top: 28px;
}
@media (min-width: 1550px) {
  main {
    padding-top: 45px;
  }
}
@media (max-width: 1000px) {
  aside {
    width: 190px;
  }
  .workspace {
    margin-left: 190px;
  }
  main {
    padding: 25px 24px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .barcode-card img {
    width: 230px;
  }
  .cards {
    gap: 10px;
  }
  .stat {
    padding: 19px;
  }
}
@media (max-width: 650px) {
  aside {
    position: static;
    width: auto;
    padding: 15px;
  }
  nav {
    margin: 15px 0 0;
    display: flex;
    overflow: auto;
  }
  nav a {
    padding: 10px;
    white-space: nowrap;
  }
  nav a span,
  .sidebar-bottom {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  header {
    padding: 0 20px;
  }
  main {
    padding: 25px 16px;
  }
  .page-head {
    align-items: flex-start;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .review-list > div {
    grid-template-columns: 120px 1fr;
  }
  h1 {
    font-size: 25px;
  }
}
main[data-view="review"] {
  padding-top: 28px;
  padding-bottom: 25px;
}
main[data-view="review"] .review-list > div {
  padding: 12px 0;
}
main[data-view="review"] .steps {
  margin-bottom: 18px;
}
main[data-view="review"] .page-head {
  margin-bottom: 22px;
}
main[data-view="review"] .barcode-card img {
  width: 235px;
}
#toast {
  pointer-events: none;
}

/* Honor permission-controlled visibility even on styled navigation/buttons. */
[hidden] {
  display: none !important;
}
.sidebar-bottom {
  overflow-wrap: anywhere;
}
