:root {
  color-scheme: light;
  --page: #f2f2f2;
  --surface: #ffffff;
  --surface-soft: #f7f7f7;
  --ink: #050505;
  --muted: #5e5e5e;
  --line: #111111;
  --soft-line: #d6d6d6;
  --inverse: #050505;
  --inverse-ink: #ffffff;
  --accent: #9a1a1a;
  --accent-soft: #fff2f1;
  --ready: #0d6f37;
  --ready-soft: #edf8f1;
  --warning: #9b5f00;
  --warning-soft: #fff8e8;
  --blocked: #b42318;
  --blocked-soft: #fff1ef;
  --info: #1f5d8f;
  --info-soft: #eef7ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  border-radius: 0;
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1;
}

h2 {
  font-size: 22px;
  line-height: 1.15;
}

.app-shell {
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.loading {
  padding: 18px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  background: var(--surface);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  filter: grayscale(1) contrast(1.15);
  object-fit: contain;
}

.topbar-copy {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.topbar-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.topbar-refresh {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.logout-button,
.ghost-button,
.print-button,
.segmented button,
.queue-tabs button,
.order-row,
.order-card,
.item-card,
.action-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.logout-button,
.ghost-button,
.print-button,
.segmented button {
  min-height: 42px;
  padding: 0 14px;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.logout-button:hover,
.ghost-button:hover,
.segmented button:hover,
.queue-tabs button:hover,
.order-row:hover,
.order-card:hover,
.item-card:hover {
  background: var(--surface-soft);
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.warning,
.success,
.warning-box,
.login-error,
.errors {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.success {
  border-width: 2px;
  border-color: var(--ready);
  background: var(--ready-soft);
}

.errors {
  margin-top: 14px;
  padding-left: 30px;
}

.errors p,
.errors li,
.warning-box p {
  margin: 4px 0;
}

.warning-box {
  margin-top: 12px;
  border-color: var(--warning);
  background: var(--warning-soft);
}

.warning-box strong {
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.auth-shell {
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(100%, 480px);
  padding: 22px;
  border: 2px solid var(--line);
  background: var(--surface);
}

.login-lockup {
  margin-bottom: 22px;
}

.login-form,
.printer-profile-fields,
.editor {
  display: grid;
  gap: 14px;
}

label span,
.select-label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
}

input:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.orders-home,
.product-step,
.print-step,
.tool-panel,
.order-detail-header,
.selected-product,
.print-quantity-control {
  border: 1px solid var(--line);
  background: var(--surface);
}

.orders-home {
  min-height: calc(100vh - 118px);
  padding: 18px;
}

.home-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.home-heading p:not(.eyebrow) {
  max-width: 620px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.home-heading strong,
.order-detail-header > div:last-child strong {
  font-size: 26px;
  line-height: 1;
}

.quiet-status,
.printer-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.queue-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.queue-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 13px;
  text-align: left;
}

.queue-tabs button.active,
.segmented button.active,
.print-button,
.action-button,
.row-action,
.status-packaging,
.readiness-ready {
  background: var(--inverse);
  color: var(--inverse-ink);
}

.queue-tabs span {
  font-size: 14px;
  font-weight: 800;
}

.queue-tabs strong {
  font-size: 22px;
}

.queue-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 0.38fr) minmax(170px, 0.38fr);
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  background: var(--surface-soft);
}

.queue-controls label {
  min-width: 0;
}

.order-table,
.order-list,
.item-list {
  display: grid;
  gap: 10px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.45fr) minmax(150px, 0.72fr) minmax(130px, 0.65fr) minmax(124px, 0.6fr) minmax(104px, 0.42fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 88px;
  padding: 16px;
  text-align: left;
}

.order-row strong,
.order-row small,
.order-card strong,
.order-card span,
.order-card small,
.item-card strong,
.item-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-row strong {
  font-size: 20px;
  line-height: 1.15;
}

.order-row small,
.order-card span,
.order-card small,
.item-card span,
.selected-product small,
.selected-product-heading > span:first-child,
.order-detail-header .detail-meta,
.order-detail-header p,
.order-detail-header > div:last-child span {
  color: var(--muted);
  font-size: 12px;
}

.row-status {
  display: grid;
  gap: 7px;
  justify-items: start;
}

.order-row-field {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-width: 0;
}

.order-row-labels {
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 7px;
}

.order-row-labels .readiness-badge {
  grid-column: 1 / -1;
}

.row-action {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.status-chip,
.readiness-badge {
  display: inline-grid;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-paid {
  border-color: var(--ready);
  background: var(--ready-soft);
  color: var(--ready);
}

.status-packaging {
  border-color: var(--line);
  background: var(--inverse);
  color: var(--inverse-ink);
}

.status-scheduled,
.status-submitted {
  border-color: var(--info);
  background: var(--info-soft);
  color: var(--info);
}

.status-done,
.status-neutral {
  background: var(--surface-soft);
}

.readiness-ready {
  border-color: var(--ready);
  background: var(--ready);
  color: var(--inverse-ink);
}

.readiness-warning {
  border-color: var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
}

.readiness-blocked {
  border-color: var(--blocked);
  background: var(--blocked-soft);
  color: var(--blocked);
}

.empty-queue {
  display: grid;
  gap: 6px;
  min-height: 140px;
  place-items: center;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-queue strong {
  color: var(--ink);
  font-size: 22px;
}

.detail-nav {
  margin: 0 0 12px;
}

.order-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px;
}

.order-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.order-detail-header p {
  margin-top: 7px;
  font-size: 14px;
}

.order-detail-header > div:last-child {
  display: grid;
  min-width: 126px;
  padding: 12px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.workflow-tracker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.2fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.workflow-tracker p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.progress-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.progress-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--soft-line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-step b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid currentColor;
  font-size: 12px;
}

.progress-step.done {
  border-color: var(--ready);
  background: var(--ready-soft);
  color: var(--ready);
}

.progress-step.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.tracker-meta {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 7px;
  row-gap: 2px;
  align-items: baseline;
  min-width: 120px;
  padding: 10px;
  border: 1px solid var(--soft-line);
}

.tracker-meta strong {
  font-size: 20px;
  line-height: 1;
}

.tracker-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.production-flow {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(380px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.product-step,
.print-step,
.tool-panel {
  padding: 16px;
}

.product-step h2,
.print-step h2,
.tool-panel h2 {
  margin-bottom: 14px;
}

.item-card,
.order-card {
  width: 100%;
  padding: 13px 14px;
  text-align: left;
}

.item-card.active,
.order-card.active {
  border-left-width: 6px;
}

.item-card-top,
.selected-product-heading,
.tool-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.item-card .item-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.item-card .item-card-top .readiness-badge {
  overflow: visible;
  justify-self: end;
}

.item-card strong {
  min-width: 0;
  font-size: 17px;
  line-height: 1.2;
}

.selected-product {
  margin-bottom: 14px;
  padding: 14px;
}

.selected-product strong {
  display: block;
  margin: 6px 0;
  font-size: 24px;
  line-height: 1.1;
}

.primary-actions {
  display: grid;
  grid-template-columns: minmax(104px, 0.48fr) 1fr 1fr;
  gap: 10px;
}

.primary-actions.unit-only {
  grid-template-columns: minmax(104px, 0.42fr) minmax(220px, 1fr);
}

.print-quantity-control {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 12px;
}

.print-quantity-control input {
  align-self: end;
  font-size: 22px;
  font-weight: 900;
}

.action-button {
  min-height: 120px;
  padding: 16px;
  text-align: left;
}

.action-button.box-action {
  background: var(--surface);
  color: var(--ink);
}

.action-button span,
.action-button small {
  display: block;
}

.action-button span {
  font-size: 23px;
  font-weight: 900;
  line-height: 1.05;
}

.action-button small {
  margin-top: 9px;
  font-size: 14px;
  font-weight: 800;
  opacity: 0.8;
}

.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tool-panel {
  margin-top: 14px;
}

.tool-panel-heading {
  align-items: center;
  margin-bottom: 14px;
}

.tool-panel-heading h2 {
  margin: 0;
}

.compact-tool {
  max-width: 520px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-packageId {
  grid-column: 1 / -1;
}

.ready-copy {
  margin-top: 12px;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.box-artwork-switch {
  margin-bottom: 12px;
}

.print-button {
  width: 100%;
  margin: 10px 0 12px;
}

.preview-frame {
  overflow: auto;
  display: grid;
  place-items: start center;
  min-height: 440px;
  max-height: 580px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #ededed;
}

.preview-frame.is-box {
  padding: 8px;
}

.preview-frame.is-unit .unit-label {
  width: min(100%, 4in);
  height: auto;
  min-height: 2in;
  margin-bottom: 0;
}

.preview-frame.is-box .box-sticker {
  transform: scale(0.92);
  transform-origin: top center;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.unit-label {
  position: relative;
  width: 4in;
  height: 2in;
  overflow: hidden;
  display: grid;
  grid-template-rows: 0.3in minmax(0, 1fr) 0.24in;
  gap: 0.03in;
  padding: 0.08in 0.09in 0.055in;
  border: 0.01in solid #111111;
  background-color: #ffffff;
  color: #111111;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.unit-label-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  padding-bottom: 0.045in;
  border-bottom: 0.006in solid #d0d0d0;
}

.unit-package-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 0.04in;
  min-width: 0;
}

.unit-package-line span {
  flex: 0 0 auto;
  color: #606060;
  font-size: 0.076in;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.unit-package-line strong {
  min-width: 0;
  overflow: visible;
  color: #111111;
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.104in;
  font-weight: 700;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.unit-label-body {
  display: grid;
  grid-template-columns: minmax(0, 2.24in) minmax(0, 1.46in);
  gap: 0.09in;
  min-height: 0;
}

.unit-info-panel {
  display: grid;
  align-content: start;
  gap: 0.02in;
  min-width: 0;
  padding-top: 0.025in;
}

.unit-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 0.66in minmax(0, 1fr);
  gap: 0.04in;
  align-items: baseline;
  min-height: 0.14in;
}

.unit-field span {
  color: #666666;
  font-size: 0.072in;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.unit-value {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #111111;
  font-size: 0.128in;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-value.is-long {
  font-size: 0.104in;
}

.unit-value.is-xlong {
  font-size: 0.086in;
}

.unit-value-strain,
.unit-value-batch {
  font-size: 0.145in;
  font-weight: 760;
}

.unit-value-strain.is-long,
.unit-value-batch.is-long {
  font-size: 0.118in;
}

.unit-value-strain.is-xlong,
.unit-value-batch.is-xlong {
  font-size: 0.094in;
}

.unit-value-metrc,
.unit-value-date,
.unit-value-total-thc {
  font-size: 0.11in;
  overflow: visible;
  text-overflow: clip;
}

.unit-value-metrc.is-long {
  flex: 0 0 auto;
  overflow: visible;
  font-size: 0.1in;
  letter-spacing: 0;
  text-overflow: clip;
}

.unit-value-metrc.is-xlong {
  flex: 0 0 auto;
  overflow: visible;
  font-size: 0.088in;
  letter-spacing: 0;
  text-overflow: clip;
}

.unit-results-panel {
  display: grid;
  align-content: start;
  gap: 0.012in;
  min-width: 0;
  padding-top: 0.02in;
  padding-left: 0.085in;
  border-left: 0.006in solid #d0d0d0;
}

.unit-major-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.025in;
  align-items: baseline;
  min-width: 0;
  color: #a51b1b;
}

.unit-major-metric span,
.unit-major-metric strong {
  color: #a51b1b;
  font-size: 0.148in;
  font-weight: 760;
  line-height: 0.96;
}

.unit-coa-panel {
  display: grid;
  gap: 0.006in;
  min-width: 0;
  margin-top: 0.004in;
}

.unit-coa-row {
  display: grid;
  grid-template-columns: 0.5in minmax(0, 1fr);
  gap: 0.03in;
  min-width: 0;
  align-items: start;
}

.unit-coa-row span {
  overflow: visible;
  color: #666666;
  font-size: 0.076in;
  font-weight: 700;
  line-height: 1.02;
  text-transform: uppercase;
  white-space: normal;
}

.unit-coa-row strong {
  overflow: hidden;
  color: #111111;
  font-size: 0.102in;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-weight-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1in);
  gap: 0.05in;
  align-items: center;
  justify-content: end;
  min-width: 0;
  margin-top: 0.06in;
  padding-left: 2.42in;
}

.unit-weight-row::after {
  display: none;
  content: "";
}

.unit-weight-row span {
  color: #666666;
  font-size: 0.086in;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.unit-value-weight {
  overflow: visible;
  font-size: 0.128in;
  font-weight: 760;
  text-overflow: clip;
  white-space: nowrap;
}

.box-sticker {
  position: relative;
  width: 4in;
  aspect-ratio: 1;
  background-color: #ffffff;
  color: #111111;
  font-family: Arial, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.box-sticker-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.box-sticker-logo {
  position: absolute;
  z-index: 2;
  top: 2.98in;
  left: 0.15in;
  width: 0.9in;
  height: 0.9in;
  border-radius: 50%;
  object-fit: contain;
}

.box-value {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 0.12in;
  max-width: 2.35in;
  overflow: hidden;
  color: #111111;
  font-family: Arial, sans-serif;
  font-size: 0.084in;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.box-value.has-value {
  padding: 0.004in 0.025in;
  background: rgba(239, 225, 192, 0.82);
}

.box-value-metrc {
  top: 1.19in;
  left: 1.64in;
  max-width: 1.44in;
}

.box-value-dispensary {
  top: 1.41in;
  left: 1.58in;
  max-width: 1.5in;
}

.box-value-strain {
  top: 1.64in;
  left: 1.46in;
  max-width: 1.62in;
}

.box-value-qty {
  top: 1.88in;
  left: 1.28in;
  max-width: 0.55in;
}

.box-value-unit-weight {
  top: 2.11in;
  left: 1.72in;
  max-width: 1.35in;
}

.box-value-empty-weight {
  top: 2.34in;
  left: 2.19in;
  max-width: 0.88in;
}

.box-value-signoff-one {
  top: 2.57in;
  left: 1.51in;
  max-width: 1.56in;
}

.box-value-signoff-two {
  top: 2.81in;
  left: 1.51in;
  max-width: 1.56in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-sticker-logo {
  top: 1.58in;
  left: 0.17in;
  width: 0.94in;
  height: 0.94in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value {
  font-size: 0.076in;
  max-width: 1.55in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value-metrc {
  top: 2.73in;
  left: 0.93in;
  max-width: 0.9in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value-dispensary {
  top: 2.94in;
  left: 1.1in;
  max-width: 0.74in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value-strain {
  top: 3.14in;
  left: 0.93in;
  max-width: 0.9in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value-qty {
  top: 3.34in;
  left: 0.81in;
  max-width: 0.35in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value-unit-weight {
  top: 2.73in;
  left: 2.83in;
  max-width: 0.72in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value-empty-weight {
  top: 2.94in;
  left: 3.14in;
  max-width: 0.42in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value-signoff-one {
  top: 3.14in;
  left: 2.74in;
  max-width: 0.82in;
}

.box-sticker--mexicanhaze-bottom-certificate .box-value-signoff-two {
  top: 3.34in;
  left: 2.74in;
  max-width: 0.82in;
}

.print-body {
  margin: 0;
  background: #ffffff;
  color: #111111;
}

.print-body .unit-label,
.print-body .box-sticker {
  margin: 0;
}

.unit-print-sheet {
  display: grid;
  gap: 0;
  width: 1in;
}

.unit-print-page {
  position: relative;
  width: 1in;
  height: 4in;
  overflow: hidden;
}

.unit-two-up-row {
  position: absolute;
  top: 4in;
  left: 0;
  display: grid;
  grid-template-columns: 2in 2in;
  width: 4in;
  height: 1in;
  overflow: hidden;
  transform: rotate(-90deg);
  transform-origin: top left;
}

.unit-print-slot {
  position: relative;
  width: 2in;
  height: 1in;
  overflow: hidden;
}

.unit-print-slot .unit-label {
  width: 2in;
  height: 1in;
  grid-template-rows: 0.145in minmax(0, 0.69in) 0.108in;
  gap: 0.006in;
  padding: 0.023in 0.026in 0.016in;
  border-width: 0.006in;
  transform: none;
}

.unit-print-slot .unit-label-header {
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 0.016in;
  border-bottom-width: 0.003in;
}

.unit-print-slot .unit-package-line {
  gap: 0.012in;
}

.unit-print-slot .unit-package-line span {
  font-size: 0.033in;
}

.unit-print-slot .unit-package-line strong {
  font-size: 0.044in;
}

.unit-print-slot .unit-label-body {
  grid-template-columns: minmax(0, 1.07in) minmax(0, 0.8in);
  gap: 0.028in;
}

.unit-print-slot .unit-info-panel {
  gap: 0.004in;
  padding-top: 0.01in;
}

.unit-print-slot .unit-field {
  grid-template-columns: 0.31in minmax(0, 1fr);
  gap: 0.012in;
  min-height: 0.066in;
}

.unit-print-slot .unit-field span {
  font-size: 0.033in;
  line-height: 1;
}

.unit-print-slot .unit-value {
  font-size: 0.056in;
  line-height: 1;
}

.unit-print-slot .unit-value-strain,
.unit-print-slot .unit-value-batch {
  font-size: 0.064in;
}

.unit-print-slot .unit-value-strain.is-long,
.unit-print-slot .unit-value-batch.is-long {
  font-size: 0.056in;
}

.unit-print-slot .unit-value-strain.is-xlong,
.unit-print-slot .unit-value-batch.is-xlong {
  font-size: 0.047in;
}

.unit-print-slot .unit-value-metrc,
.unit-print-slot .unit-value-date,
.unit-print-slot .unit-value-total-thc {
  font-size: 0.05in;
}

.unit-print-slot .unit-value-metrc.is-long,
.unit-print-slot .unit-value-metrc.is-xlong {
  overflow: visible;
  font-size: 0.038in;
  letter-spacing: 0;
  text-overflow: clip;
}

.unit-print-slot .unit-results-panel {
  gap: 0.003in;
  padding-top: 0.008in;
  padding-left: 0.024in;
  border-left-width: 0.003in;
}

.unit-print-slot .unit-major-metric {
  gap: 0.008in;
}

.unit-print-slot .unit-major-metric span,
.unit-print-slot .unit-major-metric strong {
  font-size: 0.073in;
  line-height: 0.94;
}

.unit-print-slot .unit-coa-panel {
  gap: 0.002in;
  margin-top: 0.002in;
}

.unit-print-slot .unit-coa-row {
  grid-template-columns: 0.26in minmax(0, 1fr);
  gap: 0.008in;
}

.unit-print-slot .unit-coa-row span,
.unit-print-slot .unit-coa-row strong {
  font-size: 0.045in;
  line-height: 0.94;
}

.unit-print-slot .unit-coa-row span {
  font-size: 0.034in;
}

.unit-print-slot .unit-weight-row {
  grid-template-columns: auto minmax(0, 0.42in);
  gap: 0.018in;
  margin-top: 0;
  padding-left: 1.28in;
}

.unit-print-slot .unit-weight-row span {
  font-size: 0.036in;
}

.unit-print-slot .unit-value-weight {
  font-size: 0.056in;
}

.unit-print-slot .unit-weight-row::after {
  display: none;
}

.unit-print-slot.is-empty {
  background: #ffffff;
}

@media screen and (max-width: 980px) {
  .topbar,
  .order-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-status {
    width: 100%;
    justify-content: flex-start;
  }

  .production-flow {
    grid-template-columns: 1fr;
  }

  .workflow-tracker {
    grid-template-columns: 1fr;
  }

  .order-row {
    grid-template-columns: minmax(210px, 1fr) minmax(130px, 0.7fr) minmax(110px, 0.58fr) minmax(110px, 0.52fr);
  }

  .order-row .row-action {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 620px) {
  .app-shell {
    padding: 12px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  h1 {
    font-size: 26px;
  }

  .field-grid,
  .queue-tabs,
  .queue-controls,
  .primary-actions {
    grid-template-columns: 1fr;
  }

  .home-heading,
  .item-card-top,
  .selected-product-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .orders-home {
    padding: 12px;
  }

  .order-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .row-action {
    width: 100%;
  }

  .preview-frame {
    padding: 8px;
  }

  .preview-frame.is-unit .unit-label {
    width: min(100%, 4in);
    height: auto;
    min-height: 2in;
    margin-bottom: 0;
  }

  .preview-frame.is-box .box-sticker {
    margin-bottom: -0.4in;
    transform: scale(0.68);
    transform-origin: top center;
  }

  .action-button {
    min-height: 92px;
  }

  .unit-label,
  .box-sticker {
    margin-bottom: -0.4in;
    transform: scale(0.78);
    transform-origin: top center;
  }
}

@media print {
  @page {
    size: 1in 4in;
    margin: 0;
  }

  body,
  .print-body {
    margin: 0;
    background: #ffffff;
  }

  .print-body.print-unit {
    width: 1in;
  }

  .print-body.print-unit .unit-print-page,
  .print-body.print-box .box-sticker {
    break-after: page;
  }

  .print-body.print-unit .unit-print-page:last-child,
  .print-body.print-box .box-sticker:last-child {
    break-after: auto;
  }

  .print-body.print-unit .unit-label {
    break-after: auto;
  }

  .print-body.print-box .box-sticker {
    width: 4in;
  }
}

/* self-hosted fonts (CSP-safe, /src/fonts). 2026-06-27 */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/src/fonts/fraunces-var.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/src/fonts/inter-var.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/src/fonts/ibmplexmono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/src/fonts/ibmplexmono-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/src/fonts/ibmplexmono-600.woff2") format("woff2");
}
/* ============================================================
   CREAM EDITORIAL PASS — appended 2026-06-27 (supersedes PREMIUM PASS).
   AC "modern luxury minimal (cream)" register, chosen by Randy from the
   GPT-Image direction set. Warm ivory paper, espresso ink, refined
   dispensary gold #B8892F as FLAT hairline accents only (no gold slop),
   Fraunces serif headlines (Canela stand-in), IBM Plex Mono for all data,
   a thin greca (Aztec stepped-key) rule, and a BLACK (espresso) Print
   button — never green.
   SAFE: chrome selectors only. The label/print CSS above (inch units,
   hardcoded #111) is compliance-critical and untouched.
   ============================================================ */
:root {
  /* colors measured from the mockup pixels (cream set) */
  --page: #f7f2ea;            /* very light warm paper (mockup #fbf7f1; a hair darker so cards read) */
  --surface: #fdfbf7;         /* card — mockup #fdfaf4 (page & card nearly identical, separated by shadow) */
  --surface-soft: #f3eee4;
  --surface-warm: #f8f1e2;
  --gold-tint: #f9efde;       /* selected-card wash — measured */

  --ink: #15110b;             /* near-black warm (mockup text reads ~black) */
  --ink-soft: #4a443c;
  --muted: #8c8275;           /* warm gray */
  --faint: #b0a895;

  --line: #ece4d6;            /* light warm hairline */
  --line-strong: #ddd3c0;
  --soft-line: #efe8da;

  --gold: #c8902f;            /* dispensary gold — measured stat rule */
  --gold-rule: #d2a867;       /* antique gold hairline — measured */
  --gold-bright: #d4af37;

  --ink-btn: #0e0c09;         /* near-black print button — measured */

  /* functional signals — soft outline on cream, kept for staff clarity */
  --ready: #1c6b4c;
  --warning: #946312;
  --blocked: #a8432c;
  --info: #2b5f86;
  --info-soft: #eef4f9;
  --ready-soft: #eef4ef;
  --warning-soft: #f7efdd;
  --blocked-soft: #f7e9e2;

  --accent: #c8902f;
  --accent-soft: #f9efde;
  --inverse: #0e0c09;
  --inverse-ink: #f7f2ea;

  --radius: 13px;
  --radius-sm: 9px;
  --shadow-soft: 0 1px 2px rgba(60, 47, 24, 0.05), 0 4px 14px -7px rgba(60, 47, 24, 0.12);
  --shadow-card: 0 1px 2px rgba(60, 47, 24, 0.06), 0 14px 30px -16px rgba(60, 47, 24, 0.20);

  /* greca (Aztec stepped-key) rule, flat gold */
  --greca: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 8H2V5H4V2H6V5H8V8H10V5H12V2H14V5H16V8' fill='none' stroke='%23b8892f' stroke-width='1' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
}

html,
body {
  background: var(--page);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- SERIF headlines (Fraunces ≈ Canela) ---- */
h1,
.home-heading h2,
.order-detail-header h2,
.order-row-main strong,
.item-card strong,
.order-card strong,
.selected-product strong,
.empty-queue strong,
.next-copy strong {
  font-family: Fraunces, "Playfair Display", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-weight: 560;
  letter-spacing: -0.005em;
  color: var(--ink);
}
h1 { font-size: 27px; line-height: 1.04; }

/* ---- IBM Plex Mono for all data, codes, metrics, labels ---- */
.eyebrow,
.topbar-copy,
.topbar-refresh,
.product-step h2,
.print-step h2,
.tool-panel h2,
label span,
.select-label span,
.order-row-main small,
.order-row-field small,
.order-row-field strong,
.home-heading strong,
.order-detail-header > div:last-child strong,
.order-detail-header > div:last-child span,
.queue-tabs span,
.queue-tabs strong,
.status-chip,
.readiness-badge,
.selected-product small,
.selected-product-heading > span:first-child,
.item-card span,
.order-card span,
.order-card small,
.tracker-meta strong,
.tracker-meta span,
.print-quantity-control input,
.printer-note,
.quiet-status,
.detail-meta {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* tabular metric figures */
.order-row-field strong,
.home-heading strong,
.order-detail-header > div:last-child strong,
.queue-tabs strong,
.print-quantity-control input,
.tracker-meta strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

.eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.topbar-copy {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.topbar-refresh { color: var(--muted); font-size: 11px; letter-spacing: 0.05em; }

label span,
.select-label span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* section labels "1. Choose Product" — small tracked mono caps, not serif */
.product-step h2,
.print-step h2,
.tool-panel h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* invoice / METRC codes read as gold-brown data */
.order-row-main small { color: var(--gold); font-size: 12px; letter-spacing: 0.01em; }
.item-card span,
.order-card span,
.selected-product small { color: var(--muted); }

/* ---- controls: Inter, calm ---- */
.logout-button,
.ghost-button,
.print-button,
.segmented button,
.action-button,
.row-action,
.queue-tabs button {
  font-family: Inter, system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.logout-button,
.ghost-button,
.segmented button {
  min-height: 46px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
  color: var(--ink-soft);
  background: var(--surface);
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.logout-button:hover,
.ghost-button:hover,
.segmented button:hover { border-color: var(--ink); color: var(--ink); background: var(--surface-soft); }

/* inputs */
input,
select {
  min-height: 46px;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
}
input::placeholder { color: var(--faint); }
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(184, 137, 47, 0.4);
  outline-offset: 2px;
  border-color: var(--gold);
}

/* ---- panels = warm cream cards ---- */
.topbar,
.orders-home,
.product-step,
.print-step,
.tool-panel,
.order-detail-header,
.selected-product,
.print-quantity-control,
.workflow-tracker,
.queue-controls,
.login-panel,
.next-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

/* topbar: warm, gold hairline underline */
.topbar {
  position: relative;
  align-items: center;
  padding: 16px 22px;
  background: linear-gradient(180deg, #fffdf8, var(--surface-warm));
  box-shadow: var(--shadow-soft);
}
.topbar h1 { font-size: 23px; }
.topbar .brand-lockup { gap: 14px; }
.topbar::after {
  content: "";
  position: absolute;
  left: 22px; right: 22px; bottom: -1px;
  height: 2px;
  background: var(--gold-rule);
  opacity: 0.5;
}

.brand-mark {
  filter: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong), 0 1px 3px rgba(60, 47, 24, 0.18);
}
.login-lockup .brand-mark { width: 54px; height: 54px; }
.logout-button { min-height: 42px; }

/* ---- orders home + greca rule under the heading ---- */
.orders-home { padding: 22px; }
.home-heading {
  position: relative;
  align-items: flex-end;
  padding-bottom: 18px;
  border-bottom: none;
}
.home-heading::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: var(--greca) repeat-x left center;
  background-size: auto 8px;
  opacity: 0.85;
}
.home-heading h2 { font-size: 27px; }
.home-heading p:not(.eyebrow) { color: var(--muted); }
.home-heading strong { font-size: 21px; font-weight: 600; color: var(--ink); }

/* queue tabs: cream segmented, active = ink */
.queue-tabs button {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.queue-tabs button:hover { border-color: var(--line-strong); }
.queue-tabs span {
  color: var(--muted);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.queue-tabs strong { font-size: 21px; color: var(--ink); }
.queue-tabs button.active {
  background: var(--ink-btn);
  border-color: var(--ink-btn);
  box-shadow: var(--shadow-card);
}
.queue-tabs button.active span { color: rgba(244, 239, 230, 0.7); }
.queue-tabs button.active strong { color: var(--gold-bright); }

.queue-controls { background: var(--surface-soft); box-shadow: none; }

/* ---- order rows ---- */
.order-table { gap: 12px; }
.order-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.order-row:hover { border-color: var(--gold-rule); box-shadow: var(--shadow-card); }
.order-row-main strong { font-size: 20px; line-height: 1.1; }
.order-row-field small {
  color: var(--faint);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.order-row-field strong { font-size: 17px; color: var(--ink); }

.row-action {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.order-row:hover .row-action { border-color: var(--gold); color: var(--gold); }

/* ---- status + readiness: soft OUTLINE pills, mono micro-type ---- */
.status-chip,
.readiness-badge {
  border-radius: 999px;
  min-height: 25px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.status-paid { border-color: rgba(28, 107, 76, 0.45); background: transparent; color: var(--ready); }
.status-packaging { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.status-scheduled,
.status-submitted { border-color: rgba(43, 95, 134, 0.4); background: transparent; color: var(--info); }
.status-done,
.status-neutral { border-color: var(--line-strong); background: transparent; color: var(--muted); }
.readiness-ready { border-color: rgba(28, 107, 76, 0.5); background: transparent; color: var(--ready); }
.readiness-warning { border-color: rgba(148, 99, 18, 0.5); background: transparent; color: var(--warning); }
.readiness-blocked { border-color: rgba(168, 67, 44, 0.5); background: transparent; color: var(--blocked); }

/* ---- order detail ---- */
.order-detail-header { position: relative; padding: 20px; }
.order-detail-header h2 { font-size: 27px; }
.order-detail-header p { color: var(--muted); }
.order-detail-header .detail-meta { color: var(--faint); }
.order-detail-header > div:last-child {
  min-width: 132px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-rule);
  border-radius: var(--radius-sm);
  background: var(--surface-warm);
  box-shadow: none;
}
.order-detail-header > div:last-child strong { font-size: 32px; color: var(--ink); }
.order-detail-header > div:last-child span {
  color: var(--muted);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* greca divider above the production columns (matches the mockup) */
.production-flow::before {
  content: "";
  grid-column: 1 / -1;
  height: 8px;
  margin-bottom: 4px;
  background: var(--greca) repeat-x left center;
  background-size: auto 8px;
  opacity: 0.85;
}

/* ---- product / print steps ---- */
.product-step,
.print-step { padding: 20px; }

.item-card,
.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.item-card:hover,
.order-card:hover { border-color: var(--gold-rule); box-shadow: var(--shadow-card); }
.item-card strong { font-size: 18px; }
.item-card-spec { margin-top: 5px; }
.item-card-metrc { margin-top: 2px; color: var(--faint); }
.item-card.active,
.order-card.active {
  border-color: var(--gold);
  border-left-width: 5px;
  background: var(--gold-tint);
}

.selected-product { background: var(--surface-warm); box-shadow: none; }
.selected-product-heading > span:first-child {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.selected-product strong { font-size: 23px; }

.print-quantity-control { background: var(--surface); border-color: var(--line-strong); box-shadow: none; }
.print-quantity-control input { border-color: var(--line-strong); }

/* ---- PRINT = BLACK (espresso), the single strong element ---- */
.action-button { border-radius: var(--radius); }
.action-button.unit-action {
  background: var(--ink-btn);
  border-color: var(--ink-btn);
  color: var(--inverse-ink);
  box-shadow: var(--shadow-soft);
}
.action-button.unit-action:hover { background: #000; }
.action-button.unit-action span { font-size: 20px; font-weight: 700; letter-spacing: 0; }
.action-button.unit-action small { font-weight: 500; opacity: 0.82; }
.action-button.box-action { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }

.print-button {
  background: var(--ink-btn);
  border-color: var(--ink-btn);
  color: var(--inverse-ink);
  min-height: 50px;
  font-size: 15px; font-weight: 700;
  box-shadow: var(--shadow-soft);
}
.print-button:hover { background: #000; }

.secondary-actions .ghost-button { font-size: 13.5px; }

/* ---- login ---- */
.login-panel { padding: 28px; }
.login-lockup { margin-bottom: 24px; }

/* ---- progress / meta / empty ---- */
.progress-step,
.tracker-meta,
.empty-queue { border-radius: var(--radius-sm); border-color: var(--soft-line); }
.empty-queue { border-style: dashed; border-color: var(--line-strong); }
.progress-step.active { border-color: var(--gold); background: var(--gold-tint); color: var(--gold); }

.app-shell { padding: 22px; }

/* ---- next-step banner (re-cream'd) ---- */
.next-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.next-banner .next-mark {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 18px; font-weight: 700;
}
.next-copy { display: grid; gap: 2px; }
.next-copy strong { font-size: 18px; }
.next-copy span { color: var(--muted); font-size: 14px; }
.next-ready { border-color: #d8cba8; background: #faf4e6; }
.next-ready .next-mark { background: var(--ink-btn); border-color: var(--ink-btn); color: var(--inverse-ink); }
.next-warning { border-color: #e6d3a4; background: #fbf3e0; }
.next-warning .next-mark { background: var(--warning); border-color: var(--warning); color: #fff; }
.next-blocked { border-color: #e6c2b4; background: #f8ece6; }
.next-blocked .next-mark { background: var(--blocked); border-color: var(--blocked); color: #fff; }
.next-neutral .next-mark { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ============================================================
   iPad portrait & narrow: one clear column, big targets.
   ============================================================ */
@media (max-width: 900px) {
  .production-flow { grid-template-columns: 1fr; }
  .order-detail-header { flex-direction: column; align-items: stretch; }
  .order-detail-header > div:last-child { justify-self: start; width: 100%; }
  .primary-actions,
  .primary-actions.unit-only { grid-template-columns: 1fr; }
  .print-quantity-control { min-height: 0; }
  .print-quantity-control input { font-size: 28px; }
  .action-button { min-height: 88px; }
  .secondary-actions .ghost-button { flex: 1 1 auto; }
  .topbar { flex-wrap: wrap; }
}

/* ============================================================
   MEASURED SCALE — type sizes, padding & gaps pulled from the
   mockup pixels (2026-06-27). The concept uses a large editorial
   type scale + generous padding on a centered ~1024 column, so
   cap the width and scale up to read 1:1 on desktop too.
   ============================================================ */
.app-shell { max-width: 1048px; padding: 24px; }

/* topbar — large serif title */
.topbar { padding: 22px 30px; }
.topbar h1 { font-size: 42px; line-height: 1.0; }
.topbar-copy { font-size: 12px; }

/* headings */
h1 { font-size: 40px; }
.home-heading h2,
.order-detail-header h2 { font-size: 40px; line-height: 1.04; }

/* metric figures */
.order-detail-header > div:last-child strong { font-size: 52px; }
.home-heading strong { font-size: 28px; }
.order-row-field strong { font-size: 20px; }

/* serif names */
.order-row-main strong { font-size: 25px; }
.item-card strong { font-size: 22px; }
.selected-product strong { font-size: 30px; }

/* eyebrows / labels a touch larger */
.eyebrow { font-size: 12px; }

/* generous card padding (mockup ~45px at 1024) */
.orders-home { padding: 30px; }
.order-detail-header { padding: 28px 32px; }
.product-step,
.print-step,
.tool-panel { padding: 26px 28px; }
.order-row { padding: 24px 28px; min-height: 0; }
.item-card,
.order-card { padding: 20px 22px; }
.selected-product { padding: 22px 24px; }
.next-banner { padding: 22px 26px; }
.queue-controls { padding: 18px 20px; }

/* rhythm */
.order-table { gap: 14px; }
.item-list,
.order-list { gap: 12px; }
.home-heading { padding-bottom: 22px; }
.queue-tabs { gap: 12px; margin-bottom: 14px; }

/* ============================================================
   DETAIL MATCH (2nd pass) — bigger editorial scale measured from
   the mockup, and the Print column stacked full-width like it.
   ============================================================ */
.topbar h1 { font-size: 54px; }
.home-heading h2,
.order-detail-header h2 { font-size: 44px; }
.order-detail-header > div:last-child { min-width: 152px; }
.order-detail-header > div:last-child strong { font-size: 74px; line-height: 0.92; }
.item-card strong { font-size: 24px; }
.selected-product strong { font-size: 32px; }
.order-row-main strong { font-size: 26px; }

/* Print column stacks full-width (mockup): AMOUNT over PRINT, actions stacked */
.primary-actions,
.primary-actions.unit-only { grid-template-columns: 1fr; }
.print-quantity-control { min-height: 0; }
.secondary-actions { flex-direction: column; align-items: stretch; }
.secondary-actions .ghost-button { width: 100%; }

/* ============================================================
   DETAIL SCREEN UX (2026-06-28) — iPad-landscape master-detail:
   the product list scrolls in place so the page never runs on,
   the print pane stays put; product done-toggles; preview-by-
   default; pill text centering; decluttered secondary actions.
   ============================================================ */

/* product list = a contained scroll pane (fallback for stacked/narrow) */
.item-list { max-height: 50vh; overflow-y: auto; }

/* mark-as-done: a small checkbox in the card's top-right corner (NOT a left column) */
.item-row { position: relative; }
.item-row .item-card { width: 100%; }
.item-card strong { padding-right: 38px; }   /* keep the name clear of the corner box */
.item-done-check {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: transparent;            /* hide the check until done */
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.item-done-check:hover { border-color: var(--ink); }
.item-row.is-done .item-done-check { background: var(--ink-btn); border-color: var(--ink-btn); color: #fff; }
.item-row.is-done .item-card { opacity: 0.5; }
.item-row.is-done .item-card strong { text-decoration: line-through; text-decoration-thickness: 1px; }

/* pills: center the text inside the border (was sitting high) */
.status-chip,
.readiness-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-height: 0;
  padding: 6px 11px;
}

/* give the print/preview pane more room than the product list so the
   compliance-scaled (1.45x) preview label fits without clipping */
.preview-frame { place-items: start center; }
.preview-frame.is-unit { zoom: 0.9; }

/* declutter the secondary actions into one compact row */
.secondary-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.secondary-actions .ghost-button { flex: 1 1 0; width: auto; min-height: 42px; font-size: 13px; padding: 0 10px; }

/* iPad-landscape & desktop: a master-detail that fits the screen —
   left list scrolls, right pane scrolls, no infinite page scroll */
@media (min-width: 901px) {
  /* two-pane work area: the product list scrolls in place (so the page
     never runs on), columns top-align, print/preview pane sits beside it */
  .production-flow { align-items: start; }
  .product-step .item-list { max-height: 58vh; }
  .product-step .item-list { margin-right: -8px; padding-right: 8px; }
}

/* let product names wrap to a second line instead of truncating to "Agave …" */
.item-card strong { white-space: normal; overflow: visible; text-overflow: clip; }
.item-card-top { align-items: start; }

/* ============================================================
   DETAIL COMPACT — the detail screen is a work surface (kiosk on
   an iPad stand), so trim the chrome height and let the choose/
   print work area own the screen. (Queue keeps the big scale.)
   ============================================================ */
.detail-nav { margin: 0 0 10px; }
.order-detail-header { padding: 18px 26px; margin-bottom: 12px; }
.order-detail-header h2 { font-size: 34px; }
.order-detail-header > div:last-child { min-width: 128px; padding: 10px 16px; }
.order-detail-header > div:last-child strong { font-size: 48px; }
.order-detail-header p { margin-top: 5px; }
.next-banner { padding: 12px 18px; margin-bottom: 12px; }
.next-banner .next-mark { width: 36px; height: 36px; font-size: 17px; }
.next-copy strong { font-size: 16px; }
.next-copy span { font-size: 13px; }

/* topbar: a clear serif title, not a screen-eating hero (work kiosk) */
.topbar { padding: 12px 26px; }
.topbar h1 { font-size: 34px; }

/* item card: full-width wrapping name (max ~2 lines), spec + readiness pill
   on one line below; rebalanced columns so names breathe + preview still fits.
   Only split into 2 columns on wide screens; narrow (iPad portrait/phone) stacks. */
@media (min-width: 901px) {
  .production-flow { grid-template-columns: minmax(300px, 0.88fr) minmax(500px, 1.12fr); }
}
.item-card strong { line-height: 1.16; }
.item-card-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.item-card-line .item-card-spec { margin-top: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card-line .readiness-badge { flex: 0 0 auto; }
