:root {
  --navy: #0b1b31;
  --navy-light: #162b45;
  --orange: #ff713d;
  --paper: #f4f3ef;
  --white: #fff;
  --ink: #14273e;
  --muted: #59697c;
  --line: #dce1e7;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #23456b; text-underline-offset: 4px; }
a:hover { color: #a63e17; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; }
h1 { font-size: clamp(32px, 4vw, 50px); font-weight: 800; letter-spacing: -2px; margin: 22px 0 14px; overflow-wrap: anywhere; }
h2 { font-size: 23px; letter-spacing: -.7px; font-weight: 750; }
h3 { font-size: 17px; letter-spacing: -.3px; }
p { margin-top: 0; }
main { max-width: 1300px; margin: 38px auto; padding: 0 36px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 25px max(4vw, 24px); background: var(--navy); color: var(--white); }
.brand { color: var(--white); text-decoration: none; font-size: 29px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { color: var(--white); }
.brand-symbol { color: var(--orange); font-size: 35px; font-weight: 400; }
.brand small { display: block; font-size: 10px; letter-spacing: .5px; font-weight: 400; color: #b7c1ce; margin-top: 9px; }
.app-header { flex-wrap: wrap; gap: 22px; }
.app-top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.app-top-nav a { color: #e0e5ec; font-size: 12px; font-weight: 600; padding: 9px 12px; border-radius: 24px; text-decoration: none; }
.app-top-nav a:hover, .app-top-nav a[aria-current="page"] { background: #ffffff13; color: var(--white); }
.app-top-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--orange); }
.account { display: flex; align-items: center; gap: 15px; font-size: 11px; }
.account > span { max-width: 220px; overflow-wrap: anywhere; }
.account form { margin: 0; }
.account .secondary { background: transparent; border: 1px solid #ffffff65; color: var(--white); padding: 8px 17px; }
.eyebrow { font-size: 10px; letter-spacing: 1.7px; font-weight: 700; color: #a43c15; margin: 30px 0 15px; }
.eyebrow:before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--orange); border-radius: 50%; margin-right: 9px; vertical-align: 1px; }
.grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 28px; }
.grid > *, .metric-grid > *, .page-heading > * { min-width: 0; }
.surface { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 4px 20px #0b1b3103; }
.narrow { max-width: 530px; margin: 55px auto; padding: 36px; }
.narrow > h1 { font-size: 37px; }
.narrow .eyebrow { margin-top: 0; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #98a5b5; border-radius: 8px; background: var(--white); color: var(--ink); max-width: 100%; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; min-height: auto; accent-color: var(--navy); }
button, .button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 10px; font-size: 13px; font-weight: 700; border: 1px solid transparent; border-radius: 26px; background: var(--orange); color: var(--navy); padding: 12px 22px; text-decoration: none; cursor: pointer; line-height: 1.4; transition: background .15s; }
button:hover, .button-link:hover { background: #ff8a60; color: var(--navy); }
button:disabled { opacity: .55; cursor: wait; }
.secondary { background: #eef1f5; color: var(--navy); border: 1px solid #dce1e7; }
.secondary:hover { background: #e1e7ef; }
.notice { padding: 16px 20px; border-radius: 10px; background: #e7f3ef; border-left: 3px solid #27745d; color: #1b513f; }
.error, .errorlist { color: #a12535; }
.errorlist { font-size: 13px; }
.notice.error { background: #fff0ec; color: #922f20; border-left-color: #ba452b; }
.muted, .helptext { color: var(--muted); font-size: 13px; }
.helptext { display: block; line-height: 1.6; margin-top: 8px; }
.stats { display: flex; flex-wrap: wrap; gap: 24px 38px; margin: 28px 0; }
.stats strong { display: block; color: var(--navy); font-size: 36px; line-height: 1.2; letter-spacing: -1px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats span { display: block; color: var(--muted); font-size: 12px; margin-top: 7px; }
.operation { margin: 20px 0; border-top: 1px solid var(--line); padding-top: 20px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
video { display: block; width: 100%; border-radius: 14px; background: var(--navy); max-height: 380px; }
#lookup { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 10px; }
#camera-status { color: var(--muted); font-size: 13px; margin: 18px 0; }
#start-camera:before { content: '⌗'; font-size: 22px; line-height: 1; }
ul { padding-left: 20px; }
li { margin-bottom: 9px; overflow-wrap: anywhere; }
.manage-nav { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 28px; }
.manage-nav a { padding: 10px 16px; font-size: 12px; font-weight: 600; text-decoration: none; border-radius: 22px; }
.manage-nav a:hover { background: #f1f3f6; color: var(--navy); }
.manage-nav a[aria-current="page"] { background: var(--navy); color: var(--white); }
.metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 24px 0 32px; }
.metric { position: relative; padding: 26px; overflow: hidden; }
.metric:before { content: ''; display: block; width: 23px; height: 3px; border-radius: 4px; background: var(--orange); margin-bottom: 18px; }
.metric span { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.metric strong { display: block; font-size: 43px; line-height: 1.2; margin-top: 12px; font-weight: 800; letter-spacing: -1.8px; font-variant-numeric: tabular-nums; }
.filter-form { margin: 25px 0; padding: 22px; background: #e9ecf0; border: 0; box-shadow: none; }
.filter-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.filter-fields > div { flex: 1; min-width: 155px; }
.filter-fields a { padding: 12px 0; font-size: 12px; }
.program-summary { margin-top: 30px; border-top: 3px solid var(--orange); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; font-size: 13px; }
th, td { padding: 19px 14px; border-bottom: 1px solid #e6eaf0; }
th { color: var(--muted); font-size: 11px; font-weight: 600; white-space: normal; line-height: 1.5; }
td { vertical-align: top; }
td:first-child { white-space: normal; min-width: 155px; }
td small { display: block; color: var(--muted); margin: 4px 0; }
td form { margin: 5px 0; }
td img { display: block; background: white; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8f9fa; }
.pagination { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: center; margin: 26px 0; font-size: 13px; }
.status-badge { display: inline-block; padding: 4px 11px; background: #eef1f5; border-radius: 20px; font-size: 11px; margin-bottom: 8px; font-weight: 600; }
.wallet-intro { text-align: center; max-width: 490px; margin: 28px auto; }
.wallet-intro h1 { font-size: 36px; }
.wallet-intro .eyebrow { margin-top: 0; }
.wallet-intro > p { font-size: 14px; color: var(--muted); }
.wallet-invitation { max-width: 520px; margin: 70px auto; text-align: center; overflow-wrap: anywhere; }
.wallet-invitation h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.12; letter-spacing: -1.1px; }
.wallet-invitation > p:not(.eyebrow) { color: var(--muted); font-size: 15px; line-height: 1.7; }
.wallet-invitation-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 30px 0 18px; }
.wallet-invitation-actions form { margin: 0; }
.wallet-availability { padding: 14px 20px; border-radius: 16px; background: var(--white); color: var(--muted); font-size: 14px; }
.wallet-platform-switch a, .wallet-recovery-link a { color: var(--muted); font-size: 12px; }
.wallet-recovery-link { text-align: center; }
.wallet-pass { position: relative; max-width: 410px; margin: 30px auto; background: var(--navy); color: var(--white); border-radius: 24px; box-shadow: 0 18px 45px #0b1b3120; padding: 28px; overflow: hidden; border-top: 5px solid var(--orange); }
.wallet-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 11px; color: #c1ccd9; margin-bottom: 28px; }
.wallet-top span:first-child { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.wallet-top span:last-child { color: var(--orange); font-size: 9px; letter-spacing: 1.3px; }
.wallet-pass h2 { font-size: 32px; line-height: 1.05; color: var(--white); letter-spacing: -1px; margin: 0 0 12px; }
.wallet-pass > p { font-size: 13px; color: #c1ccd9; }
.wallet-pass .stats { margin: 28px 0 23px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.wallet-pass .stats strong { color: var(--orange); font-size: 36px; }
.wallet-pass .stats span { color: #c1ccd9; font-size: 11px; }
.wallet-pass .wallet-reward { padding: 17px 0; margin-bottom: 4px; border-top: 1px solid #ffffff35; font-size: 14px; color: var(--white); }
.wallet-code { background: var(--white); color: var(--navy); border-radius: 16px; padding: 18px; text-align: center; }
.wallet-code img { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto 10px; }
.wallet-code span { font-size: 11px; color: #4e6077; }
.wallet-signature { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; color: #b7c1ce; font-size: 9px; letter-spacing: .4px; }
.wallet-signature strong { color: white; font-size: 17px; letter-spacing: -.8px; }
.wallet-signature strong span { color: var(--orange); margin-left: 5px; }
.wallet-intro .surface { overflow-wrap: anywhere; }
.poster-qr { display: block; width: 100%; max-width: 300px; height: auto; margin: auto; }
.public-shell main { max-width: 780px; }
.public-header { justify-content: center; }
.public-footer { text-align: center; font-size: 11px; color: var(--muted); padding: 25px; }
.app-footer { border-top: 1px solid var(--line); max-width: 1228px; margin: 55px auto 0; padding: 25px 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 11px; color: var(--muted); }
.app-footer > span { font-size: 17px; color: var(--navy); font-weight: 800; letter-spacing: -.7px; }
.skip-link { position: absolute; top: -100px; left: 15px; padding: 10px; background: white; z-index: 10; }
.skip-link:focus { top: 10px; }
:focus-visible { outline: 3px solid #b5471c; outline-offset: 4px; }
header :focus-visible, .wallet-pass :focus-visible { outline-color: #ff9e79; }
[hidden] { display: none !important; }
@media(max-width:1050px) {
  .app-top-nav { order: 3; width: 100%; margin: 0; border-top: 1px solid #ffffff25; padding-top: 14px; }
  .account { margin-left: auto; }
}
@media(max-width:700px) {
  header { padding: 20px 22px; gap: 18px; }
  .brand { font-size: 26px; }
  .brand-symbol { font-size: 31px; }
  .account { font-size: 10px; gap: 10px; }
  .account > span { max-width: 130px; }
  .account .secondary { padding: 7px 13px; }
  .app-top-nav { gap: 4px; }
  .app-top-nav a { padding: 9px 10px; font-size: 11px; }
  main { margin: 26px auto; padding: 0 20px; }
  h1 { font-size: 33px; letter-spacing: -1.3px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .surface { padding: 22px; }
  .narrow { margin: 30px auto; padding: 26px; }
  .narrow > h1 { font-size: 32px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .metric { padding: 20px; }
  .metric strong { font-size: 35px; }
  .metric span { font-size: 11px; }
  .filter-fields { gap: 12px; }
  .filter-fields > div { min-width: 130px; }
  .table-wrap { padding: 0 12px; }
  .manage-nav { gap: 3px; padding: 7px; }
  .manage-nav a { padding: 9px 12px; font-size: 11px; }
  .wallet-intro h1 { font-size: 32px; }
  .wallet-pass { padding: 23px; }
  .wallet-pass .stats strong { font-size: 32px; }
  .wallet-code { padding: 16px; }
  .app-footer { margin-top: 38px; padding: 22px 20px; }
}
@media(max-width:380px) { .metric-grid { grid-template-columns: 1fr; } .brand small { max-width: 130px; } .account > span { max-width: 95px; } }
@media(prefers-reduced-motion:reduce) { button, .button-link { transition: none; } }

.lp-icon { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -.12em; }
.privacy-notice { margin: 30px auto; }
.privacy-notice h2 { margin-top: 30px; }
.privacy-notice p { overflow-wrap: anywhere; }
.program-summary { overflow-wrap: anywhere; }

/* Per-business card styling is scoped to the pass, never to QR contrast. */
.wallet-pass.visual-stamps { background:var(--card-bg); color:var(--card-ink); border-top-color:var(--card-accent); }
.visual-stamps .wallet-top, .visual-stamps h2, .visual-stamps > p, .visual-stamps .wallet-reward,
.visual-stamps .stats span, .visual-stamps .wallet-signature, .visual-stamps .wallet-signature strong { color:var(--card-ink); }
.visual-stamps .wallet-top span:last-child, .visual-stamps .stats strong, .visual-stamps .wallet-signature strong span { color:var(--card-accent); }
.visual-stamps .wallet-reward { border-color:currentColor; }
.stamp-grid { display:grid; grid-template-columns:repeat(var(--stamp-columns,5),minmax(0,1fr)); gap:12px; margin:26px 0 20px; }
.stamp-slot { min-width:0; position:relative; aspect-ratio:1; display:flex; align-items:center; justify-content:center; color:#8b929c; }
.stamp-slot svg, .stamp-slot img, .preview-built-in { display:block; width:100%; height:100%; object-fit:contain; }
.preview-built-in svg { width:100%; height:100%; }
.stamp-slot img { filter:grayscale(1); opacity:.35; transition:filter .25s,opacity .25s; }
.stamp-slot svg { opacity:.5; }
.stamp-slot.is-filled { color:var(--card-accent,var(--orange)); }
.stamp-slot.is-filled img { filter:none; opacity:1; }
.stamp-slot.is-filled svg { opacity:1; }
.stamp-tick { display:none; position:absolute; bottom:-3px; right:-2px; font-size:10px; line-height:15px; width:15px; height:15px; border-radius:50%; background:var(--card-ink,#0b1b31); color:var(--card-bg,#fff); text-align:center; }
.is-filled .stamp-tick { display:block; }
.visual-stamps .stamp-remaining { font-size:12px; }
.design-preview { padding:20px; border-radius:18px; margin:22px 0; background:var(--card-bg,#0b1b31); color:var(--card-ink,#fff); }
.design-preview p { font-size:12px; color:inherit; }
.palette { display:flex; flex-wrap:wrap; gap:8px; border:1px solid var(--line); border-radius:12px; padding:12px; }
.palette button { margin:0; }
input[type=color] { width:90px; height:48px; padding:4px; }
input[type=file] { max-width:100%; padding:8px; }
@media(prefers-reduced-motion:reduce) { .stamp-slot img { transition:none; } }

/* Dashboard: shared by business administrators and the platform operator. */
.dashboard-heading { display:flex; justify-content:space-between; align-items:center; gap:25px; flex-wrap:wrap; margin:15px 0 28px; }
.dashboard-heading > div { min-width:0; flex:1 1 260px; }
.dashboard-heading h1 { margin:0 0 9px; }
.dashboard-heading p { color:var(--muted); font-size:14px; margin:0; }
.dashboard-filter { flex:1 1 520px; margin:0; }
.dashboard-filter .filter-fields { justify-content:flex-end; gap:12px; }
.dashboard-filter .filter-fields > div { min-width:145px; }
.dashboard-filter input, .dashboard-filter select { min-width:0; }
.filter-label { display:block; font-size:13px; font-weight:600; margin-bottom:7px; }
.business-filter { position:relative; }
.business-picker > summary { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:48px; padding:11px 13px; background:var(--white); border:1px solid #98a5b5; border-radius:8px; cursor:pointer; list-style:none; }
.business-picker > summary::-webkit-details-marker { display:none; }
.business-picker > summary > span:first-child { overflow-wrap:anywhere; min-width:0; }
.business-picker-panel { position:absolute; z-index:5; top:100%; left:0; width:max(100%,280px); max-width:min(360px,calc(100vw - 40px)); padding:14px; margin-top:6px; border:1px solid var(--line); border-radius:12px; background:var(--white); box-shadow:0 12px 30px #0b1b3120; }
.business-picker-panel select { width:100%; min-height:190px; padding:4px; }
.business-picker-panel option { padding:10px 8px; white-space:normal; overflow-wrap:anywhere; }
.business-picker-panel label { margin-bottom:10px; }
.business-picker-panel > label[for=id_business] { font-size:11px; color:var(--muted); }
.business-picker-panel p { margin:10px 0 0; }
.retention-panel { border-top:3px solid var(--orange); margin:0 0 32px; }
.retention-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; }
.dashboard-kicker { color:#a43c15; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:1.7px; margin:0 0 7px; }
.retention-heading h2 { margin:0; }
.revisit-control { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.revisit-control label { margin:0; font-size:12px; }
.revisit-control select { width:auto; min-width:115px; }
.retention-body { display:grid; grid-template-columns:minmax(210px,1fr) minmax(0,2fr); align-items:center; gap:36px; margin:22px 0; }
.retention-stat { text-align:center; }
.retention-stat > strong { display:block; font-size:72px; letter-spacing:-3px; line-height:1.1; font-variant-numeric:tabular-nums; }
.retention-stat h3 { font-size:16px; margin:12px 0 8px; }
.retention-stat p { font-size:12px; color:var(--muted); margin:0; }
.retention-note { border-top:1px solid var(--line); padding-top:16px; font-size:12px; color:var(--muted); margin:0; }
.metric-definition { font-size:12px; color:var(--muted); margin-top:12px; }
.metric-definition p { margin:12px 0 0; }
.dashboard-empty { padding:35px 20px; text-align:center; color:var(--muted); background:#f5f6f8; border-radius:12px; font-size:14px; }
.checkout-result { text-align:center; }
.checkout-result-check { display:block; width:112px; height:112px; margin:0 auto 26px; }
.checkout-result-check circle { fill:#e7f5ec; }
.checkout-result-check path { fill:none; stroke:#168548; stroke-width:9; stroke-linecap:round; stroke-linejoin:round; }
.checkout-result h1 { font-size:clamp(28px,5vw,42px); }
.checkout-result .button-link { display:inline-block; margin:18px 0 12px; }
.dashboard-section-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.dashboard-section-heading h2 { margin:0; }
.dashboard-section-heading p { margin:0; color:var(--muted); font-size:12px; }
.dashboard-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-bottom:22px; }
.dashboard-score { min-width:0; padding:26px 18px 16px; }
.dashboard-value { display:block; font-size:48px; line-height:1.15; letter-spacing:-1.8px; font-variant-numeric:tabular-nums; text-align:center; overflow-wrap:anywhere; }
.dashboard-score h3 { font-size:14px; text-align:center; margin:10px 0 24px; font-weight:700; }
.dashboard-chart { min-width:0; }
.dashboard-chart svg { display:block; width:100%; max-height:265px; }
.dashboard-chart text { font:14px Arial,Helvetica,sans-serif; fill:var(--muted); }
.chart-gridline { stroke:var(--line); stroke-width:1; }
.chart-line { stroke:#b34620; stroke-width:2.5; stroke-linejoin:round; fill:none; }
.chart-area { fill:var(--orange); opacity:.1; }
.chart-dot { fill:#b34620; }
.chart-data { font-size:11px; color:var(--muted); margin-top:14px; overflow-wrap:anywhere; }
.chart-data summary, .metric-definition summary { cursor:pointer; }
.chart-data table { font-size:12px; white-space:normal; table-layout:fixed; }
.chart-data th, .chart-data td { padding:10px 5px; }
.chart-data td:first-child { min-width:0; }
.dashboard-balances { display:flex; flex-wrap:wrap; gap:24px 55px; padding:20px 0; margin-bottom:20px; border-top:1px solid var(--line); }
.dashboard-balances strong { display:block; font-size:30px; line-height:1.2; font-variant-numeric:tabular-nums; }
.dashboard-balances span { display:block; font-size:12px; color:var(--muted); margin-top:8px; }
@media(max-width:1000px) { .dashboard-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
  .dashboard-grid { grid-template-columns:minmax(0,1fr); }
  .dashboard-heading { gap:20px; }
  .dashboard-filter { flex-basis:100%; min-width:0; }
  .dashboard-filter .filter-fields > div { min-width:125px; }
  .dashboard-filter .filter-fields { justify-content:flex-start; }
  .retention-body { grid-template-columns:minmax(0,1fr); gap:22px; }
  .retention-stat > strong { font-size:64px; }
  .revisit-control { width:100%; justify-content:space-between; }
  .dashboard-score { padding:25px 18px 16px; }
  .dashboard-filter input, .dashboard-filter select, .revisit-control select { font-size:16px; }
}
