:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --bg-grid: rgba(23, 33, 29, 0.045);
  --surface: #ffffff;
  --surface-2: #f2f2ed;
  --surface-3: #cfe7dc;
  --ink: #17211d;
  --muted: #5f6d66;
  --line: #d7ddd9;
  --line-strong: #b9c3bd;
  --sidebar: #17211d;
  --sidebar-2: #24332c;
  --teal: #1e6b55;
  --teal-dark: #14503f;
  --blue: #285c91;
  --amber: #8a6514;
  --red: #a33b32;
  --green: #1e6b55;
  --ink-shadow: 0 18px 44px rgba(18, 28, 27, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", Manrope, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 296px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  background: var(--sidebar);
  color: #f7f3ea;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: #e8fff8;
  color: #0d4842;
  font-weight: 950;
  box-shadow: inset 0 -3px 0 rgba(13, 72, 66, 0.16);
}

.platform-logo {
  display: block;
  width: 178px;
  max-width: 100%;
  height: auto;
}

.auth-brand .platform-logo {
  width: 190px;
}

.wizard-brand .platform-logo,
.sidebar .platform-logo {
  width: 172px;
}

.brand strong {
  display: block;
  letter-spacing: 0;
}

.brand span,
.compliance-note span,
.workspace-card span,
.workspace-card small,
.subtle {
  color: var(--muted);
  font-size: 0.9rem;
}

.sidebar .brand span,
.sidebar .compliance-note span,
.sidebar .workspace-card span,
.sidebar .workspace-card small {
  color: #aebbb6;
}

.workspace-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.workspace-card strong {
  color: #ffffff;
}

.nav {
  display: grid;
  gap: 5px;
  overflow: auto;
  padding-right: 2px;
}

.nav-section-title {
  margin: 12px 0 3px;
  color: #71807b;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 12px;
  background: transparent;
  color: #dce4df;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  background: var(--sidebar-2);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 #75d7c9;
}

.compliance-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #182422;
}

main {
  width: min(1520px, 100%);
  padding: 26px 30px 36px;
}

.topbar,
.topbar-actions,
.button-row,
.panel-header,
.toolbar,
.workspace-meta,
.ops-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  justify-content: space-between;
  margin: -26px -30px 22px;
  padding: 18px 30px;
  border-bottom: 1px solid rgba(201, 193, 179, 0.72);
  background: rgba(244, 242, 236, 0.88);
  backdrop-filter: blur(12px);
}

.page-title-block {
  display: grid;
  gap: 4px;
}

.topbar h1,
.section-heading h2,
.ops-command h2 {
  margin: 0;
  letter-spacing: 0;
}

.workspace-meta span {
  color: #4f5a56;
  font-size: 0.86rem;
}

.workspace-meta span + span::before {
  content: "/";
  margin-right: 10px;
  color: #9a9489;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view {
  display: none;
  min-width: 0;
}

.view.active {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: grid;
  gap: 3px;
  padding: 4px 0 2px;
}

.ops-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px 250px;
  gap: 14px;
  align-items: stretch;
}

.ops-primary,
.readiness-card,
.policy-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--ink-shadow);
}

.ops-primary {
  display: grid;
  gap: 16px;
  align-content: center;
  padding: 22px;
  border-left: 5px solid var(--teal);
}

.ops-primary h2 {
  max-width: 820px;
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  line-height: 1.08;
}

.readiness-card,
.policy-card {
  display: grid;
  gap: 9px;
  align-content: center;
  padding: 18px;
}

.readiness-card span,
.policy-card span,
.metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.readiness-card strong {
  font-size: 2.4rem;
}

.policy-card strong {
  color: var(--teal-dark);
  font-size: 1.3rem;
}

.readiness-card small,
.policy-card small {
  color: var(--muted);
  line-height: 1.45;
}

progress {
  width: 100%;
  height: 9px;
  accent-color: var(--teal);
}

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

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric {
  position: relative;
  min-height: 104px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(24, 32, 31, 0.055);
}

.metric::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--line-strong);
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  line-height: 1;
}

.panel {
  padding: 18px;
  box-shadow: 0 8px 22px rgba(24, 32, 31, 0.045);
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.panel-header {
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

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

.form-grid {
  display: grid;
  gap: 13px;
}

.wide-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.full-span {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: #303b38;
  font-size: 0.92rem;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fffefa;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 111, 104, 0.14);
}

textarea {
  resize: vertical;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.primary-button,
.secondary-button,
.ghost-button,
.small-button,
.status-chip {
  min-height: 40px;
  border-radius: var(--radius);
  padding: 9px 14px;
  border: 1px solid transparent;
  font-weight: 850;
}

.primary-button {
  background: var(--teal);
  color: #ffffff;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  background: #e6f0eb;
  color: var(--teal-dark);
  border-color: #c8d8d1;
}

.ghost-button,
.small-button {
  background: #fffefa;
  color: var(--ink);
  border-color: var(--line-strong);
}

.small-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.86rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  background: #fff4df;
  color: #7f4a0c;
  border-color: #e8cb9a;
}

.status-chip.ready {
  background: #dff0e5;
  color: var(--green);
  border-color: #b8d8c3;
}

.summary-list {
  display: grid;
  gap: 0;
}

.summary-row,
.checklist-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.summary-row:last-child,
.checklist-item:last-child {
  border-bottom: 0;
}

.summary-row span,
.checklist-item span {
  color: #4e5a56;
}

.warning {
  margin-top: 14px;
  border-left: 4px solid var(--amber);
  padding: 12px;
  background: #fff7e9;
  color: #5f3c12;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.warning.hidden,
.hidden-input {
  display: none !important;
}

.public-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(22, 31, 29, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(22, 31, 29, 0.035) 1px, transparent 1px),
    #f4f2ec;
  background-size: 28px 28px;
}

.public-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 254, 250, 0.86);
  backdrop-filter: blur(12px);
}

.public-brand .brand-mark {
  background: var(--teal);
  color: #ffffff;
}

.public-main {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 6vw, 68px) 18px;
}

.public-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

#public-card.public-screen,
#public-review.public-screen {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

.public-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(18px, 4vw, 28px);
  box-shadow: var(--ink-shadow);
}

.public-card h1,
.public-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.public-card h1 {
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 0.98;
}

.public-card h2 {
  font-size: 1.15rem;
}

.public-hero-card {
  display: grid;
  gap: 18px;
  border-left: 5px solid var(--teal);
}

.public-hero-card p {
  color: #4f5a56;
  line-height: 1.6;
}

.public-stamp-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.public-stamp-strip .stamp {
  background: #fffefa;
}

.activity-feed {
  display: grid;
  gap: 9px;
  max-height: 340px;
  overflow: auto;
}

.activity-feed.compact {
  max-height: 430px;
}

.activity-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfaf4;
}

.activity-item time {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.qr-row > div {
  display: grid;
  gap: 10px;
}

.qr-box {
  display: grid;
  width: 164px;
  aspect-ratio: 1;
  border: 10px solid #fffefa;
  outline: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-cell {
  background: #ffffff;
}

.qr-cell.dark {
  background: var(--sidebar);
}

code {
  display: block;
  overflow-wrap: anywhere;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f0eee6;
  color: #23413c;
  font-size: 0.86rem;
}

.stamp-card,
.customer-card,
.review-landing,
.scan-result {
  min-height: 180px;
  border: 1px solid #d4ddd5;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface-3);
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.stamp {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 2px dashed #95aba2;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 950;
}

.stamp.filled {
  border-style: solid;
  background: var(--teal);
  color: #ffffff;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #3f4f4b;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbf7ec;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #ece9df;
  color: #31423e;
  font-size: 0.8rem;
  font-weight: 850;
}

.pill.green {
  background: #dff0e5;
  color: var(--green);
}

.pill.blue {
  background: #e1ebf6;
  color: var(--blue);
}

.pill.red {
  background: #f6e4e2;
  color: var(--red);
}

.review-landing {
  display: grid;
  gap: 12px;
  align-content: start;
}

.review-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.permission-grid span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfaf4;
}

.toolbar input,
.toolbar select {
  width: auto;
  min-width: 180px;
}

#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--sidebar);
  color: #ffffff;
  box-shadow: var(--ink-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-section-title {
    grid-column: 1 / -1;
  }

  .ops-command {
    grid-template-columns: 1fr 1fr;
  }

  .ops-primary {
    grid-column: 1 / -1;
  }

  .metric-grid,
  .wide-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

.recovery-card {
  margin-top: 16px;
}

.recovery-card > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.recovery-card form {
  margin-top: 18px;
}

.customer-scan-code {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.customer-scan-code .qr-box {
  width: 184px;
  height: 184px;
}

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

.template-option {
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  display: grid;
  align-content: start;
  gap: 5px;
}

.template-option:hover,
.template-option.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.template-option span,
.template-option small,
.milestone-row small {
  display: block;
  color: var(--muted);
}

.milestone-builder {
  margin-top: 18px;
}

.inline-form {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1fr) 140px minmax(210px, auto) auto;
  gap: 12px;
  align-items: end;
}

.milestone-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.milestone-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.milestone-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--brand);
  font-weight: 900;
}

.staff-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-left: 4px solid var(--brand);
  background: var(--surface-3);
}

.staff-session-bar span,
.staff-session-bar strong {
  display: block;
}

.staff-unlock-form,
.scan-adjustments {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
}

.scan-adjustments {
  grid-template-columns: 130px minmax(220px, 1fr);
  margin: 16px 0;
}

.reward-redeem-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  text-align: left;
}

.reward-redeem-row small {
  color: inherit;
  opacity: .75;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.staff-mode .nav-item:not([data-view="scanner"]),
.staff-mode .compliance-note,
.staff-mode .utility-menu {
  display: none;
}

.staff-mode .nav {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  .template-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inline-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .template-list,
  .inline-form,
  .staff-unlock-form,
  .scan-adjustments { grid-template-columns: 1fr; }
  .reward-redeem-row { grid-template-columns: 1fr; }
  main {
    padding: 18px;
  }

  .sidebar {
    padding: 18px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    margin: -18px -18px 18px;
    padding: 16px 18px;
  }

  .nav,
  .ops-command,
  .metric-grid,
  .wide-form,
  .qr-row,
  .review-options,
  .permission-grid,
  .public-screen {
    grid-template-columns: 1fr;
  }

  .ops-primary {
    grid-column: auto;
  }

  .ops-primary h2 {
    font-size: 1.65rem;
  }

  .toolbar,
  .toolbar input,
  .toolbar select {
    width: 100%;
  }
}

/* Simplified merchant and customer experience */
body {
  background: #f4f6f2;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #eaf0e9;
}

.auth-panel {
  display: grid;
  gap: 26px;
  width: min(430px, 100%);
  border: 1px solid #d3dbd2;
  border-top: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: clamp(24px, 6vw, 38px);
  background: #fffefa;
  box-shadow: 0 22px 60px rgba(18, 32, 29, 0.12);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.auth-brand span:last-child {
  display: grid;
}

.auth-brand small,
.auth-copy,
.auth-help {
  color: var(--muted);
}

.auth-panel h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
}

.auth-copy {
  margin: 10px 0 0;
  line-height: 1.55;
}

.auth-preview-note {
  margin: 12px 0 0;
  border-left: 3px solid var(--teal);
  padding: 9px 11px;
  background: var(--surface-3);
  color: #315046;
  font-size: 0.82rem;
  line-height: 1.45;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 0.88rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: #e8ede7;
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tabs button.active {
  background: #fffefa;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(18, 32, 29, 0.12);
}

.auth-help {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  line-height: 1.5;
}

body.wizard-open {
  overflow: hidden;
}

.setup-wizard {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  overflow: auto;
  background: #f5f7f3;
}

.wizard-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  min-height: 100vh;
  gap: 30px;
  padding: 28px 24px;
  background: var(--sidebar);
  color: #ffffff;
}

.wizard-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wizard-brand > div {
  display: grid;
  gap: 2px;
}

.wizard-brand small,
.wizard-time span {
  color: #aebcb7;
}

.wizard-time {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 16px 0;
}

.wizard-time span {
  font-size: 0.76rem;
}

.wizard-step-list {
  display: grid;
}

.wizard-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 54px;
  border: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.14);
  padding: 8px 10px 8px 16px;
  background: transparent;
  color: #aebcb7;
  text-align: left;
}

.wizard-step:disabled {
  cursor: default;
}

.wizard-step > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #60706a;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 900;
}

.wizard-step.active {
  border-left-color: #8fe2d4;
  background: #1b2b28;
  color: #ffffff;
}

.wizard-step.active > span {
  border-color: #8fe2d4;
  background: #8fe2d4;
  color: #17302b;
}

.wizard-step.complete {
  color: #d8e5e0;
}

.wizard-step.complete > span {
  border-color: #5eb7a8;
  color: #8fe2d4;
}

.wizard-main {
  display: grid;
  grid-template-rows: auto 5px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.wizard-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(28px, 6vw, 76px) 22px;
  background: #ffffff;
}

.wizard-topbar h1 {
  max-width: 760px;
  margin: 5px 0 0;
  font-size: 2rem;
  line-height: 1.1;
}

.wizard-close-button {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #cbd3ce;
  border-radius: 50%;
  background: #ffffff;
  color: #52605b;
  font-size: 1.45rem;
  line-height: 1;
}

#wizard-progress {
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 0;
  accent-color: var(--teal);
}

.wizard-content {
  display: grid;
  align-content: start;
  width: min(980px, 100%);
  padding: clamp(28px, 6vw, 64px) clamp(28px, 6vw, 76px);
}

.wizard-form {
  display: grid;
  gap: 26px;
}

.wizard-intro {
  max-width: 680px;
  border-left: 3px solid var(--teal);
  padding: 3px 0 3px 14px;
}

.wizard-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.wizard-form-grid label {
  display: grid;
  gap: 8px;
  color: #46534f;
  font-size: 0.84rem;
  font-weight: 800;
}

.wizard-form-grid .wizard-wide {
  grid-column: 1 / -1;
}

.wizard-form-grid input,
.wizard-form-grid select,
.wizard-form-grid textarea {
  width: 100%;
  min-height: 48px;
  border-color: #bec9c3;
  background: #ffffff;
  font-size: 0.96rem;
}

.wizard-form-grid input[type="color"] {
  padding: 7px;
}

.wizard-form-grid .checkbox-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  line-height: 1.5;
}

.wizard-form-grid .checkbox-line input {
  min-height: 20px;
}

.wizard-rule-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.wizard-rule-preview span {
  color: var(--muted);
  font-size: 0.8rem;
}

.wizard-rule-preview strong {
  text-align: right;
}

.wizard-brand-step {
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
}

.wizard-qr-preview {
  --wizard-accent: #1e6b55;
  display: grid;
  justify-items: center;
  min-height: 410px;
  overflow: hidden;
  border: 1px solid #ccd4cf;
  padding: 22px;
  background: #f7f3ea;
  text-align: center;
}

.wizard-qr-preview > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 4px;
  background: var(--wizard-accent);
  color: #ffffff;
  font-weight: 950;
}

.wizard-qr-preview h3 {
  margin: 22px 0 14px;
  font-size: 1.45rem;
  line-height: 1.08;
}

.wizard-qr-preview img {
  width: 168px;
  aspect-ratio: 1;
  border: 7px solid #ffffff;
}

.wizard-qr-preview b {
  margin-top: 9px;
}

.wizard-launch-step {
  display: grid;
  gap: 26px;
}

.wizard-launch-summary {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.wizard-launch-summary h2 {
  margin: 5px 0 7px;
  font-size: 2rem;
}

.wizard-launch-summary p:last-child,
.wizard-launch-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.wizard-launch-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.wizard-launch-checks > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 76px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.wizard-launch-checks span {
  display: grid;
  grid-row: 1 / 3;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 950;
}

.wizard-launch-checks span.ready {
  background: #dcece2;
  color: var(--green);
}

.wizard-launch-checks span.open {
  background: #fae9d5;
  color: var(--amber);
}

.wizard-launch-checks small {
  color: var(--muted);
}

.wizard-launch-step > .secondary-button {
  justify-self: start;
}

.wizard-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #d2d9d4;
  padding: 16px clamp(28px, 6vw, 76px);
  background: rgba(255, 255, 255, 0.96);
}

.wizard-footer > div {
  display: flex;
  gap: 9px;
}

.wizard-footer button {
  min-width: 110px;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  gap: 22px;
  padding: 24px 18px;
  background: #15201e;
}

.sidebar .brand {
  padding: 0 6px;
}

.workspace-card {
  padding: 13px 14px;
  background: #1d2b28;
}

.workspace-card span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav {
  gap: 8px;
  overflow: visible;
}

.nav-item {
  position: relative;
  min-height: 44px;
  padding: 11px 14px;
  font-weight: 760;
}

.nav-item.active {
  background: #f4f6f2;
  color: #13211f;
  box-shadow: none;
}

.nav-item-primary:not(.active) {
  border-color: rgba(117, 215, 201, 0.35);
  color: #bdf4e9;
}

.compliance-note {
  display: grid;
  gap: 7px;
  padding: 14px;
  background: transparent;
}

.sidebar-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #8fe2d4;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.app-shell > main {
  width: min(1380px, 100%);
  padding: 24px 32px 48px;
}

.topbar {
  margin: -24px -32px 28px;
  padding: 17px 32px;
  background: rgba(244, 246, 242, 0.94);
}

.topbar h1 {
  font-size: 1.5rem;
}

.topbar .eyebrow {
  margin: 0;
}

.status-chip {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.utility-menu {
  position: relative;
}

.utility-menu summary {
  display: grid;
  width: 36px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.utility-menu summary::-webkit-details-marker {
  display: none;
}

.utility-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--ink-shadow);
}

.utility-menu-popover button {
  border: 0;
  border-radius: 5px;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.utility-menu-popover button:hover {
  background: #eef2ed;
}

.view.active {
  gap: 22px;
}

.section-heading {
  max-width: 760px;
  gap: 6px;
  padding: 0 0 4px;
}

.section-heading h2 {
  font-size: 1.7rem;
}

.section-heading > p:last-child:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.ops-command {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

.ops-primary,
.readiness-card {
  box-shadow: none;
}

.ops-primary {
  gap: 10px;
  padding: 24px 26px;
  border: 0;
  border-left: 5px solid #d95f45;
  background: #fffefa;
}

.ops-primary h2 {
  max-width: 720px;
  font-size: 1.8rem;
  line-height: 1.15;
}

.ops-primary > p:not(.eyebrow) {
  margin: 0 0 5px;
  color: var(--muted);
}

.readiness-card {
  padding: 18px;
  border-color: #d8ded7;
  background: #e9f2eb;
}

.readiness-card strong {
  font-size: 2rem;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.metric {
  min-height: 96px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.metric::after {
  display: none;
}

.metric strong {
  font-size: 1.85rem;
}

.dashboard-grid,
.scanner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.stamp-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef2ed;
}

.stamp-methods button {
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.stamp-methods button.active {
  background: #fffefa;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(18, 32, 29, 0.12);
}

.stamp-method-panel {
  display: grid;
  gap: 12px;
}

.camera-reader {
  position: relative;
  display: grid;
  min-height: 220px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #17211d;
  color: #dce8e4;
}

.camera-reader video {
  display: none;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.camera-reader.camera-active video {
  display: block;
}

.camera-reader.camera-active .camera-placeholder {
  display: none;
}

.camera-placeholder {
  max-width: 260px;
  padding: 18px;
  color: #c7d5d1;
  line-height: 1.45;
  text-align: center;
}

.panel {
  border-color: #d9ded8;
  box-shadow: none;
}

.plain-note {
  margin-top: 14px;
  border-left: 3px solid #d95f45;
  padding: 11px 13px;
  background: #fff2ec;
  color: #60382f;
  font-size: 0.9rem;
  line-height: 1.5;
}

.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  width: 100%;
  max-width: none;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e9ece7;
}

.settings-nav button {
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 7px 12px;
  background: transparent;
  color: #4e5955;
  font-weight: 760;
  white-space: nowrap;
}

.settings-nav button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(18, 28, 27, 0.12);
}

.print-studio-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(460px, 1fr);
  gap: 24px;
  align-items: start;
}

.print-studio-controls {
  display: grid;
  gap: 16px;
}

.print-studio-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.format-fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.format-fieldset legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.format-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e9ece7;
}

.format-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  padding: 7px 6px;
  background: transparent;
  color: #52605b;
  font-size: 0.78rem;
  font-weight: 800;
}

.format-switch button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(18, 28, 27, 0.13);
}

.brand-upload {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.brand-upload p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.brand-upload input[type="file"] {
  width: 100%;
  padding: 8px;
  background: #ffffff;
  font-size: 0.8rem;
}

.brand-upload .small-button {
  justify-self: start;
}

.print-preview-column {
  min-width: 0;
}

.print-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.print-preview-toolbar .button-row {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.print-preview-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.print-preview-toolbar span {
  color: var(--muted);
  font-size: 0.82rem;
}

.print-stage {
  display: grid;
  min-height: 680px;
  overflow: auto;
  place-items: start center;
  border: 1px solid #ccd2cc;
  padding: 32px;
  background: #dfe4df;
}

.print-artwork {
  --print-accent: #1e6b55;
  display: grid;
  width: min(100%, 520px);
  aspect-ratio: 210 / 297;
  overflow: hidden;
  border: 1px solid rgba(24, 35, 32, 0.16);
  padding: 32px;
  background: #f7f3ea;
  box-shadow: 0 18px 42px rgba(28, 37, 35, 0.16);
  color: #17211d;
}

.print-artwork.format-menu {
  grid-template-columns: minmax(0, 1.1fr) minmax(160px, 0.72fr);
  grid-template-rows: auto 1fr auto;
  gap: 22px 26px;
  width: min(100%, 660px);
  aspect-ratio: 1;
}

.print-artwork.format-counter {
  width: min(100%, 470px);
  aspect-ratio: 3 / 4;
}

.print-artwork.format-a5 {
  width: min(100%, 470px);
}

.print-artwork.format-a4 {
  width: min(100%, 520px);
}

.print-brand-lockup {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: -32px -32px 0;
  padding: 22px 32px;
  background: var(--print-accent);
  color: #ffffff;
}

.format-menu .print-brand-lockup,
.format-menu .print-footnote {
  grid-column: 1 / -1;
}

.print-brand-lockup img,
.print-brand-fallback {
  display: none;
  width: 58px;
  height: 58px;
  border-radius: 4px;
  background: #ffffff;
  object-fit: contain;
}

.print-brand-lockup img.visible {
  display: block;
}

.print-brand-fallback {
  display: grid;
  place-items: center;
  color: var(--print-accent);
  font-weight: 900;
}

.print-brand-lockup strong {
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.print-message {
  align-self: center;
}

.print-kicker {
  margin: 0 0 10px;
  color: var(--print-accent);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.print-message h3 {
  margin: 0;
  font-size: 2.35rem;
  line-height: 1.02;
}

.print-message > p:not(.print-kicker) {
  margin: 15px 0;
  color: #4b5854;
  line-height: 1.5;
}

.print-reward {
  display: inline-block;
  border-radius: 4px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--print-accent) 13%, white);
  color: #244b45;
  font-size: 0.82rem;
  font-weight: 850;
}

.print-qr-lockup {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.print-qr-lockup img {
  width: min(100%, 230px);
  aspect-ratio: 1;
  border: 8px solid #ffffff;
  background: #ffffff;
}

.print-qr-lockup strong {
  font-size: 1.18rem;
}

.print-qr-lockup span {
  max-width: 240px;
  color: #596560;
  font-size: 0.61rem;
  overflow-wrap: anywhere;
}

.print-footnote {
  align-self: end;
  margin: 18px 0 0;
  border-top: 1px solid rgba(37, 55, 50, 0.16);
  padding-top: 13px;
  color: #5c6864;
  font-size: 0.69rem;
  line-height: 1.45;
  text-align: center;
}

.print-artwork:not(.format-menu) {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 24px;
}

.print-artwork:not(.format-menu) .print-brand-lockup {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  margin: -24px -24px 0;
  padding: 14px 24px;
}

.print-artwork:not(.format-menu) .print-brand-lockup img,
.print-artwork:not(.format-menu) .print-brand-fallback {
  width: 46px;
  height: 46px;
}

.print-artwork:not(.format-menu) .print-brand-lockup strong {
  font-size: 1rem;
}

.print-artwork:not(.format-menu) .print-message {
  align-self: center;
  padding-top: 12px;
  text-align: center;
}

.print-artwork:not(.format-menu) .print-message h3 {
  max-width: 390px;
  margin: 0 auto;
  font-size: 1.72rem;
  line-height: 1.06;
}

.print-artwork:not(.format-menu) .print-message > p:not(.print-kicker) {
  margin: 9px 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.print-artwork:not(.format-menu) .print-kicker {
  margin-bottom: 6px;
  font-size: 0.62rem;
}

.print-artwork:not(.format-menu) .print-reward {
  padding: 7px 10px;
  font-size: 0.69rem;
}

.print-artwork:not(.format-menu) .print-qr-lockup img {
  width: min(48%, 184px);
}

.print-artwork:not(.format-menu) .print-qr-lockup {
  align-self: center;
  gap: 5px;
}

.print-artwork:not(.format-menu) .print-qr-lockup strong {
  font-size: 0.94rem;
}

.print-artwork:not(.format-menu) .print-qr-lockup span {
  font-size: 0.52rem;
}

.print-artwork:not(.format-menu) .print-footnote {
  margin-top: 0;
  padding-top: 9px;
  font-size: 0.6rem;
}

.journey-readiness {
  display: grid;
  grid-template-columns: 170px minmax(180px, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}

.journey-readiness > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.journey-readiness span {
  color: var(--muted);
  font-size: 0.82rem;
}

.journey-readiness strong {
  color: var(--ink);
  font-size: 1.15rem;
}

.journey-readiness progress {
  width: 100%;
  height: 9px;
  border: 0;
  border-radius: 0;
  accent-color: var(--teal);
}

.journey-workbench {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.journey-stage-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.journey-stage-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.journey-stage-button:hover {
  background: #edf2ed;
}

.journey-stage-button.active {
  background: #e5efea;
  box-shadow: inset 3px 0 0 var(--teal);
}

.journey-step-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #aeb9b4;
  border-radius: 50%;
  color: #4f5e59;
  font-size: 0.72rem;
  font-weight: 900;
}

.journey-stage-button.active .journey-step-number {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.journey-stage-button > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.journey-stage-button strong,
.journey-stage-button small {
  overflow-wrap: anywhere;
}

.journey-stage-button small {
  color: var(--muted);
  font-size: 0.72rem;
}

.journey-step-state {
  font-size: 0.68rem;
  font-weight: 850;
}

.journey-step-state.ready {
  color: var(--green);
}

.journey-step-state.open {
  color: var(--amber);
}

.journey-stage-detail {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.journey-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.journey-detail-header h3 {
  margin: 5px 0 7px;
  font-size: 1.4rem;
}

.journey-detail-header p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.journey-detail-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.journey-preview-area {
  display: grid;
  min-height: 650px;
  border: 1px solid #cfd6d0;
  background: #dfe5df;
}

.journey-preview-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  align-self: start;
  border-bottom: 1px solid #cbd2cc;
  padding: 11px 14px;
  background: #f5f7f3;
}

.journey-preview-caption span {
  color: var(--muted);
  font-size: 0.78rem;
}

.journey-customer-preview {
  --journey-accent: #1e6b55;
  display: grid;
  place-items: center;
  min-height: 600px;
  padding: 26px;
}

.journey-mobile-preview,
.journey-poster-preview {
  display: grid;
  align-content: start;
  width: min(100%, 360px);
  min-height: 550px;
  overflow: hidden;
  border: 1px solid rgba(30, 45, 41, 0.14);
  border-radius: 8px;
  padding: 24px;
  background: #fffefa;
  box-shadow: 0 18px 44px rgba(24, 36, 32, 0.13);
}

.journey-mobile-bar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: -24px -24px 26px;
  padding: 14px 20px;
  background: var(--journey-accent);
  color: #ffffff;
}

.journey-mobile-bar span,
.journey-preview-brand span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 4px;
  background: #ffffff;
  color: var(--journey-accent);
  font-size: 0.76rem;
  font-weight: 950;
}

.journey-mobile-preview h4,
.journey-poster-preview h4 {
  margin: 7px 0 10px;
  font-size: 1.65rem;
  line-height: 1.08;
}

.journey-mobile-preview > p:not(.eyebrow) {
  margin: 0 0 18px;
  color: #53605c;
  line-height: 1.5;
}

.journey-mobile-preview > button {
  min-height: 44px;
  border: 0;
  border-radius: 5px;
  padding: 10px 14px;
  background: var(--journey-accent);
  color: #ffffff;
  font-weight: 850;
  pointer-events: none;
}

.journey-mobile-preview > button.journey-preview-secondary {
  margin-top: 9px;
  border: 1px solid #b9c4be;
  background: #ffffff;
  color: #24332f;
}

.journey-mobile-preview > small {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.journey-stamp-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 22px;
}

.journey-stamp-grid span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px dashed #aebbb5;
  border-radius: 50%;
  color: #70807a;
  font-size: 0.66rem;
  font-weight: 850;
}

.journey-stamp-grid span.filled {
  border-color: var(--journey-accent);
  background: var(--journey-accent);
  color: #ffffff;
}

.journey-form-skeleton {
  display: grid;
  gap: 9px;
  margin: 2px 0 16px;
}

.journey-form-skeleton span {
  border: 1px solid #c9d1cc;
  border-radius: 5px;
  padding: 12px;
  color: #7a8782;
  font-size: 0.76rem;
}

.journey-member-code,
.journey-reward-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.journey-member-code span,
.journey-reward-ticket span {
  color: var(--muted);
  font-size: 0.76rem;
}

.journey-member-code strong {
  font-size: 1.45rem;
  letter-spacing: 0;
}

.journey-reward-preview .journey-reward-ticket {
  align-items: flex-start;
  flex-direction: column;
  margin: auto 0 20px;
  border: 1px solid #c8d6ce;
  padding: 15px;
  background: #eaf2ed;
}

.journey-review-preview > p:not(.eyebrow) {
  min-height: 130px;
}

.journey-poster-preview {
  justify-items: center;
  min-height: 520px;
  background: #f7f3ea;
  text-align: center;
}

.journey-preview-brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  justify-self: stretch;
  margin: -24px -24px 25px;
  padding: 15px 24px;
  background: var(--journey-accent);
  color: #ffffff;
  text-align: left;
}

.journey-poster-preview > p {
  margin: 0;
  color: var(--journey-accent);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.journey-preview-reward {
  margin: 5px 0 16px;
  border-radius: 4px;
  padding: 8px 10px;
  background: #e4eee9;
  color: #284d47;
  font-size: 0.76rem;
  font-weight: 850;
}

.journey-poster-preview > img {
  width: 190px;
  aspect-ratio: 1;
  margin: 5px 0 10px;
  border: 7px solid #ffffff;
}

.setup-checklist {
  max-width: 900px;
}

.review-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.review-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.review-summary .summary-row {
  display: grid;
  align-content: start;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  padding: 12px;
}

.review-summary .summary-row:last-child {
  border-right: 0;
}

.review-summary .summary-row strong {
  margin-top: 5px;
}

.review-overview .plain-note {
  margin: 8px 0;
}

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

.scan-token-label input {
  min-height: 52px;
  font-size: 1rem;
}

.scan-result {
  border-style: dashed;
  background: #f5f8f4;
}

.public-page {
  background: #edf2eb;
}

.public-topbar {
  padding: 16px clamp(16px, 5vw, 48px);
  background: rgba(255, 255, 255, 0.9);
}

.public-topbar .ghost-button {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.public-main {
  width: min(720px, 100%);
  padding: clamp(24px, 5vw, 52px) 16px;
}

.public-screen,
#public-card.public-screen,
#public-review.public-screen {
  grid-template-columns: minmax(0, 1fr);
}

.public-card {
  padding: clamp(20px, 5vw, 36px);
  box-shadow: 0 20px 60px rgba(24, 32, 31, 0.1);
}

.public-join-card {
  gap: 20px;
  border-top: 5px solid var(--teal);
}

.public-join-intro {
  display: grid;
  gap: 14px;
}

.public-card h1 {
  max-width: 560px;
  font-size: clamp(2rem, 7vw, 3.35rem);
  line-height: 1.02;
}

.public-join-intro > p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.public-stamp-strip {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px;
}

.stamp-how {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: #edf4ee;
}

.stamp-how p {
  margin: 3px 0;
  color: #40504b;
  line-height: 1.45;
}

.step-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
}

.form-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.form-section-heading span,
.public-trust {
  color: var(--muted);
  font-size: 0.82rem;
}

.marketing-options {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.marketing-options summary {
  color: #43514d;
  font-size: 0.9rem;
  font-weight: 760;
  cursor: pointer;
}

.marketing-options[open] {
  display: grid;
  gap: 12px;
}

.marketing-options[open] summary {
  margin-bottom: 4px;
}

.public-submit {
  min-height: 50px;
  font-size: 1rem;
}

.public-trust {
  text-align: center;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    height: 100vh;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .scanner-grid,
  .review-overview,
  .print-studio-layout {
    grid-template-columns: 1fr;
  }

  .print-studio-controls {
    max-width: 680px;
  }

  .journey-workbench {
    grid-template-columns: 1fr;
  }

  .journey-stage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 1px solid var(--line);
  }

  .journey-stage-button {
    border-right: 1px solid var(--line);
  }

  .review-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .setup-wizard {
    grid-template-columns: 1fr;
  }

  .wizard-sidebar {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: auto;
    gap: 14px;
    padding: 14px 16px;
  }

  .wizard-time {
    align-content: center;
    border: 0;
    padding: 0;
    text-align: right;
  }

  .wizard-time span,
  .wizard-step-list {
    display: none;
  }

  .wizard-main {
    min-height: calc(100vh - 76px);
  }

  .wizard-topbar {
    padding: 22px 18px 18px;
  }

  .wizard-topbar h1 {
    font-size: 1.55rem;
  }

  .wizard-content {
    padding: 24px 18px 110px;
  }

  .wizard-form-grid,
  .wizard-brand-step,
  .wizard-launch-checks {
    grid-template-columns: 1fr;
  }

  .wizard-form-grid .wizard-wide {
    grid-column: auto;
  }

  .wizard-rule-preview {
    align-items: flex-start;
    flex-direction: column;
  }

  .wizard-rule-preview strong {
    text-align: left;
  }

  .wizard-qr-preview {
    width: 100%;
  }

  .wizard-footer {
    padding: 13px 16px;
  }

  .wizard-footer > div {
    margin-left: auto;
  }

  #wizard-save-later {
    display: none;
  }

  .wizard-footer button {
    min-width: 86px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 14px;
    padding: 16px;
  }

  .workspace-card,
  .compliance-note {
    display: none;
  }

  .sidebar .brand {
    display: flex;
    padding-bottom: 4px;
  }

  .sidebar .platform-logo {
    width: 142px;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }

  .nav-item {
    min-height: 40px;
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
  }

  .app-shell > main {
    padding: 18px 16px 36px;
  }

  .topbar {
    margin: -18px -16px 20px;
    padding: 14px 16px;
  }

  .workspace-meta,
  .topbar .eyebrow {
    display: none;
  }

  .ops-command,
  .metric-grid,
  .review-summary,
  .scan-context,
  .field-pair {
    grid-template-columns: 1fr;
  }

  .ops-primary {
    padding: 21px 18px;
  }

  .ops-primary h2 {
    font-size: 1.5rem;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 86px;
  }

  .review-summary .summary-row {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-nav {
    width: 100%;
  }

  .journey-readiness {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .journey-readiness > div {
    justify-content: flex-start;
  }

  .journey-stage-list {
    grid-template-columns: 1fr;
  }

  .journey-detail-header {
    flex-direction: column;
    gap: 10px;
  }

  .journey-preview-area {
    min-height: 600px;
  }

  .journey-customer-preview {
    min-height: 550px;
    padding: 14px;
  }

  .journey-mobile-preview,
  .journey-poster-preview {
    min-height: 520px;
    padding: 20px;
  }

  .journey-mobile-bar,
  .journey-preview-brand {
    margin-right: -20px;
    margin-left: -20px;
  }

  .print-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .print-stage {
    min-height: 420px;
    padding: 12px;
  }

  .print-artwork {
    padding: 18px;
  }

  .print-artwork.format-menu {
    grid-template-columns: minmax(0, 1fr) 106px;
    gap: 10px 12px;
    padding: 18px;
  }

  .print-brand-lockup {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    margin: -18px -18px 0;
    padding: 11px 18px;
  }

  .print-brand-lockup img,
  .print-brand-fallback {
    width: 38px;
    height: 38px;
  }

  .print-brand-lockup strong {
    font-size: 0.78rem;
  }

  .print-kicker {
    margin-bottom: 5px;
    font-size: 0.5rem;
  }

  .print-message h3 {
    font-size: 1.2rem;
  }

  .print-message > p:not(.print-kicker) {
    margin: 7px 0;
    font-size: 0.64rem;
    line-height: 1.35;
  }

  .print-reward {
    padding: 5px 7px;
    font-size: 0.53rem;
  }

  .print-qr-lockup {
    gap: 4px;
  }

  .print-qr-lockup img {
    border-width: 4px;
  }

  .print-qr-lockup strong {
    font-size: 0.72rem;
  }

  .print-qr-lockup span {
    font-size: 0.43rem;
  }

  .print-footnote {
    margin-top: 5px;
    padding-top: 6px;
    font-size: 0.46rem;
  }

  .public-topbar {
    align-items: center;
  }

  .public-topbar .brand span {
    display: none;
  }

  .public-stamp-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .form-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #customers .table-wrap {
    overflow: visible;
  }

  #customers table,
  #customers tbody {
    display: block;
  }

  #customers thead {
    display: none;
  }

  #customers tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px;
    background: #ffffff;
  }

  #customers tbody td {
    border: 0;
    padding: 0;
  }

  #customers tbody td:first-child {
    grid-column: 1 / -1;
    font-weight: 850;
  }

  #customers tbody td:first-child code,
  #customers tbody td:nth-child(2),
  #customers tbody td:nth-child(5),
  #customers tbody td:nth-child(6) {
    display: none;
  }

  #customers tbody td:nth-child(3)::before {
    content: "Stamps ";
    color: var(--muted);
    font-size: 0.78rem;
  }

  #customers tbody td:nth-child(4)::before {
    content: "Reward ";
    color: var(--muted);
    font-size: 0.78rem;
  }

  #customers tbody td:last-child {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 4px;
  }
}

@media print {
  @page {
    margin: 0;
  }

  body * {
    visibility: hidden !important;
  }

  #print-artwork,
  #print-artwork * {
    visibility: visible !important;
  }

  #print-artwork {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    border: 0;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  #print-artwork.format-menu {
    width: 180mm;
    height: 180mm;
  }

  #print-artwork.format-counter {
    width: 105mm;
    height: 140mm;
  }

  #print-artwork.format-a5 {
    width: 148mm;
    height: 210mm;
  }

  #print-artwork.format-a4 {
    width: 210mm;
    height: 297mm;
  }
}
