/* Shared stylesheet across index.html (merchant PWA), admin.html (Lead
   Harvest control panel), and signup.html (public customer enrollment).
   Kept intentionally plain — no framework, no build step. */

:root {
  --color-bg: #f7f7f8;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-primary: #1a56db;
  --color-border: #e2e2e5;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.screen {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 20px;
  /* env(safe-area-inset-top) is 0 on a browser tab and only kicks in once
     installed standalone (index.html's viewport already sets
     viewport-fit=cover for this) — without it, a notch/dynamic-island
     phone renders .top-bar's title/buttons partly under the status bar,
     found live 2026-09-07 on the merchant PWA's punch-card screen. */
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}

button.primary,
a.primary {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

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

.muted {
  color: var(--color-muted);
  font-size: 14px;
}

/* Admin control panel — wider than the mobile-first .screen container used
   by the merchant PWA and signup page. */

.admin-shell {
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 20px 60px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.top-bar h1 {
  font-size: 20px;
  margin: 0;
}

button.secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

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

button.danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #f3caca;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

button.link,
a.link {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: underline;
}

/* Public signup page's "back to dashboard" link (2026-09-07) — a real
   navigation, so it's an <a>, not a button; needs its own display/spacing
   since a.link is inline by default and .card below it has no top margin
   of its own to create separation. */
a.link {
  display: inline-block;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.admin-table tr:hover td {
  background: #fafafa;
  cursor: pointer;
}

.admin-table.static tr:hover td {
  cursor: default;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.active {
  background: #dcfce7;
  color: #166534;
}

.badge.suspended {
  background: #fef3c7;
  color: #92400e;
}

.badge.cancelled {
  background: #f3f4f6;
  color: #4b5563;
}

.badge.draft {
  background: #dbeafe;
  color: #1e40af;
}

.badge.published {
  background: #dcfce7;
  color: #166534;
}

.badge.superseded {
  background: #f3f4f6;
  color: #4b5563;
}

.error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.success-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.section {
  margin-top: 28px;
}

.section h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

/* A merchant's own signup QR (DECISIONS.md D55) needs to stay scannable
   regardless of the surrounding theme, so its background is forced white
   the same way .wallet-preview-barcode's real-pass barcode panel already
   is — never themed. */
.qr-box {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}

.qr-box svg {
  display: block;
  width: 180px;
  height: 180px;
}

.slot-preview {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  object-fit: cover;
  background: var(--color-bg);
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* Merchant PWA — PIN entry, home, scan, mobile entry, punch card, admin
   overview (index.html/index.js). */

#pin-input {
  width: 100%;
  padding: 14px;
  font-size: 24px;
  text-align: center;
  letter-spacing: 8px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 24px;
}

.home-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 16px;
  font-size: 32px;
  cursor: pointer;
}

.home-btn span {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.template-card {
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.template-card.selected {
  border-color: var(--color-primary);
  border-width: 2px;
}

.scan-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
}

.scan-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-frame {
  position: absolute;
  inset: 15%;
  border: 3px solid #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.punch-card {
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  margin-top: 16px;
}

.punch-card-header {
  font-size: 18px;
  font-weight: 700;
}

.punch-card-sub {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 14px;
}

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

.punch-slot {
  /* No border-radius/overflow clipping here on purpose — the real Apple/
     Google Wallet strip (composite-strip-image) pastes each slot's raw
     PNG bytes with no masking at all, so this preview only matches what
     a customer actually sees on their phone if it doesn't crop either.
     A template whose art should look circular gets that by being drawn
     circular (transparent corners) in the uploaded PNG itself. */
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  user-select: none;
  cursor: pointer;
  position: relative;
}

.punch-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The reward-overlay image (DECISIONS.md D56) pastes directly on top of
   the last slot's own image, same no-masking convention as every other
   slot image — mirrors composite-strip-image's real pixel compositing. */
.punch-slot-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* Mirrors the real wallet pass's own field layout (wallet-pass-create):
   a small org-name label, then one large "PUNCHES X / Y" primary field —
   the pass has no combined "X/Y punches -> reward" line on its front. */
.wallet-preview-org {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-bottom: 10px;
}

.wallet-preview-primary {
  margin-bottom: 14px;
}

.wallet-preview-primary-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.wallet-preview-primary-value {
  font-size: 26px;
  font-weight: 700;
}

/* Mirrors secondaryFields on the real wallet pass (wallet-pass-create) —
   the merchant-settable front-of-pass CTA (DECISIONS.md D50). Dashed
   underline marks it as illustrative here, since no merchant has set a
   real one yet at this point in the funnel. */
.wallet-preview-secondary {
  margin-bottom: 14px;
  padding-top: 8px;
  border-top: 1px dashed currentColor;
  opacity: 0.85;
}

.wallet-preview-secondary-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.wallet-preview-secondary-value {
  font-size: 12px;
  font-style: italic;
}

/* The barcode always sits in its own white panel on a real Apple/Google
   Wallet pass, regardless of the pass's own background color. */
.wallet-preview-barcode {
  margin-top: 1px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.punch-slot.filled {
  background: rgba(255, 255, 255, 0.9);
}

.confirm-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 4px;
}

/* Customer signup page (signup.html/signup.js) */

.consent-group label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.consent-group input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
}

.wallet-pending {
  margin-top: 16px;
  border-style: dashed;
}

/* Merchant PWA home screen (index.html/index.js) — the approved visual
   design supplied 2026-09-07, integrated as closely to the original as
   possible. Scoped under #loyalty-app; the page-level rules from the
   original standalone prototype are scoped to body.loyalty-home-view
   instead of a bare `body` selector so they only apply while the home
   screen (the only screen this design covers) is on-screen — every other
   screen in this app (pin/scan/card/admin) keeps its existing plain
   styles.css look untouched. Preserved verbatim/minified as supplied,
   including its own layered override blocks — order matters for the
   cascade, don't reflow. */
:root { color-scheme: light; }
body.loyalty-home-view { margin: 0; padding: 16px; background: #e4e6e9; }
#loyalty-app svg { width: 20px; height: 20px; }
@media (max-width: 560px) { body.loyalty-home-view { padding: 0; } #loyalty-app { border-radius: 0; border: 0; } }
#loyalty-app{--lo-accent:#203b63;--lo-bg:light-dark(#f2f4f7,#181c23);--lo-panel:light-dark(#ffffff,#242a34);--lo-ink:light-dark(#292e36,#f1f3f6);--lo-muted:light-dark(#656e7b,#b4bcc9);--lo-line:light-dark(#dce1e8,#3c4655);font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:var(--lo-ink);background:var(--lo-bg);max-width:560px;margin:0 auto;border-radius:24px;overflow:hidden;border:1px solid var(--lo-line)}
#loyalty-app *{box-sizing:border-box}#loyalty-app button,#loyalty-app input{font:inherit}#loyalty-app button{cursor:pointer}#loyalty-app .lo-top{display:flex;align-items:center;gap:11px;padding:8px 24px;background:var(--lo-panel);border-bottom:1px solid var(--lo-line)}#loyalty-app .lo-logo{width:38px;height:38px;border-radius:12px;background:var(--lo-accent);color:white;display:grid;place-items:center;flex-shrink:0}#loyalty-app .lo-name{font-size:17px;font-weight:500;letter-spacing:-.4px}#loyalty-app .lo-logout{margin-left:auto;display:flex;align-items:center;gap:7px;color:var(--lo-muted);background:none;border:0;min-height:44px;padding:0;font-size:13px;white-space:nowrap}#loyalty-app .lo-main{padding:28px 28px 0}#loyalty-app .lo-signup{text-align:center;padding:27px 24px 24px;background:var(--lo-panel);border:1px solid var(--lo-line);border-radius:20px}#loyalty-app .lo-eyebrow{font-size:11px;letter-spacing:1.7px;text-transform:uppercase;color:var(--lo-accent);font-weight:500;margin-bottom:10px}#loyalty-app h1,#loyalty-app h2{font-weight:500;letter-spacing:-.7px;line-height:1.2;margin:0;font-size:26px}#loyalty-app p{color:var(--lo-muted);font-size:14px;line-height:1.5;margin:10px 0 0}#loyalty-app .lo-qr-wrap{display:inline-block;margin:25px 0 20px;padding:14px;background:white;border-radius:16px;border:1px solid #e0e5ed;box-shadow:0 8px 24px #172b4610}#loyalty-app .lo-qr{width:192px;height:192px;display:block}#loyalty-app .lo-link{display:flex;align-items:center;gap:8px;background:var(--lo-bg);border:1px solid var(--lo-line);border-radius:10px;padding:2px 4px 2px 13px;text-align:left}#loyalty-app .lo-link span{font-size:13px;flex:1;overflow-wrap:anywhere}#loyalty-app .lo-copy{display:grid;place-items:center;min-width:44px;min-height:44px;background:none;border:0;color:var(--lo-accent);border-radius:8px}#loyalty-app .lo-divider{display:flex;align-items:center;gap:14px;margin:27px 0;color:var(--lo-muted);font-size:11px;letter-spacing:1.3px}#loyalty-app .lo-divider:before,#loyalty-app .lo-divider:after{content:'';height:1px;background:var(--lo-line);flex:1}#loyalty-app .lo-punch h2{font-size:23px}#loyalty-app .lo-punch p{margin-top:7px}#loyalty-app .lo-scan{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:54px;border:0;border-radius:12px;background:var(--lo-accent);color:white;margin:20px 0;font-size:15px;font-weight:500;box-shadow:0 4px 8px #14274412}#loyalty-app .lo-or{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--lo-muted);margin-bottom:17px}#loyalty-app .lo-or:before,#loyalty-app .lo-or:after{content:'';height:1px;background:var(--lo-line);flex:1}#loyalty-app label{display:block;font-size:12px;font-weight:500;margin-bottom:8px}#loyalty-app .lo-field{display:flex;gap:9px}#loyalty-app input{min-width:0;flex:1;height:50px;border-radius:10px;background:var(--lo-panel);border:1px solid var(--lo-line);color:var(--lo-ink);padding:0 13px;font-size:16px}#loyalty-app input::placeholder{color:var(--lo-muted)}#loyalty-app .lo-lookup{border:1px solid var(--lo-line);border-radius:10px;background:var(--lo-panel);color:var(--lo-ink);padding:0 19px;font-size:14px;font-weight:500}#loyalty-app .lo-status{font-size:12px;color:var(--lo-muted);line-height:1.5;margin-top:12px}#loyalty-app .lo-status:empty{display:none}#loyalty-app footer{padding:25px 0 19px;text-align:center}#loyalty-app .lo-admin{background:none;border:0;color:var(--lo-muted);font-size:12px;min-height:44px;padding:0 20px}#loyalty-app .lo-scanner{background:var(--lo-panel);border:1px solid var(--lo-line);border-radius:12px;padding:22px;text-align:center;margin-bottom:20px}#loyalty-app .lo-scanner[hidden]{display:none}#loyalty-app .lo-close{margin-top:14px;background:none;border:0;color:var(--lo-accent);min-height:44px}#loyalty-app button:hover{filter:brightness(.94)}@media(max-width:380px){#loyalty-app .lo-top{padding:2px 16px}#loyalty-app .lo-main{padding:20px 16px 0}#loyalty-app .lo-signup{padding:24px 15px 19px}#loyalty-app .lo-name{font-size:15px}#loyalty-app .lo-logout{font-size:12px}#loyalty-app .lo-lookup{padding:0 13px}}
#loyalty-app .lo-link a{display:flex;align-items:center;min-height:44px;flex:1;min-width:0;font-size:14px;color:var(--lo-accent);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}#loyalty-app .lo-signup .lo-help{font-size:12px;margin-top:10px}#loyalty-app .lo-divider{margin:32px -28px 0;padding:20px 28px;background:var(--lo-accent);color:#fff;font-size:12px;font-weight:500;letter-spacing:1.6px;border-top:4px solid light-dark(#142a4a,#7f99be)}#loyalty-app .lo-divider:before,#loyalty-app .lo-divider:after{background:#ffffff50}#loyalty-app .lo-punch{margin:0 -28px;padding:27px 28px 29px;background:light-dark(#e8edf4,#1c283b);border-bottom:1px solid var(--lo-line)}@media(max-width:380px){#loyalty-app .lo-divider{margin:28px -16px 0;padding:19px 16px}#loyalty-app .lo-punch{margin:0 -16px;padding:25px 16px}}
#loyalty-app .lo-main{padding-top:16px}#loyalty-app .lo-signup{padding-top:18px}#loyalty-app .lo-signup p{margin-top:6px}#loyalty-app .lo-qr-wrap{margin-top:12px;margin-bottom:14px}#loyalty-app .lo-divider{padding-top:5px;padding-bottom:5px;min-height:32px;line-height:18px}@media(max-width:380px){#loyalty-app .lo-main{padding-top:12px}#loyalty-app .lo-signup{padding-top:16px}#loyalty-app .lo-divider{padding-top:5px;padding-bottom:5px}}
#loyalty-app .lo-main{background:light-dark(#d1d3d6,#292c31)}#loyalty-app .lo-divider{background:#292e36;border-top-color:#20242b}#loyalty-app .lo-scan{background:#292e36;color:#ffffff}

/* Real-integration additions not in the original static prototype: the
   signup QR now renders via the app's existing qr-utils.js (renderSignupQrSvg,
   the same single source of truth admin.js's own QR box already uses) instead
   of the prototype's qrious/<canvas> generator, so it's a real <svg>, not a
   canvas — sized to match the prototype's own 192x192 canvas rule above. The
   real business logo (or the app's existing default-icon fallback) fills the
   same .lo-logo chip the prototype's placeholder icon used, without changing
   its size/position. */
#loyalty-app .lo-qr-wrap svg{width:192px;height:192px;display:block}
#loyalty-app .lo-logo img{width:100%;height:100%;object-fit:contain;border-radius:12px}
/* Same safe-area fix as .screen above, applied to the home screen's own
   header instead (it doesn't use .screen). */
#loyalty-app .lo-top{padding-top:calc(8px + env(safe-area-inset-top, 0px))}

/* Merchant PWA login + PIN-reset screens (index.html/index.js) — approved
   visual design supplied 2026-09-07 (loyalty-login.html /
   loyalty-reset-pin.html), integrated as closely to the original as
   possible. Scoped under #auth-app / body.loyalty-auth-view, the same
   approach the home screen's own design above already uses under
   #loyalty-app / body.loyalty-home-view — both prototypes used bare
   `body`/`input`/`button`/`.card` selectors that would otherwise collide
   with this stylesheet's own shared rules (used by admin.html and every
   other screen in this app). Preserved verbatim/minified as supplied.
   Covers the login screen and PIN-reset step 1 (phone entry) only — the
   supplied reset-PIN mockup has no step 2 (code + new PIN); that
   sub-step keeps the app's existing generic form styling instead of an
   invented design (see index.js's renderReset()). */
body.loyalty-auth-view { margin: 0; padding: 16px; background: #e4e6e9; color: #292e36; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
#auth-app *{box-sizing:border-box}#auth-app button,#auth-app input{font:inherit}#auth-app button{cursor:pointer}#auth-app button:focus-visible,#auth-app input:focus-visible{outline:3px solid #7896c1;outline-offset:3px}
#auth-app{--accent:#203b63;--ink:#292e36;--muted:#656e7b;--line:#dce1e8;max-width:560px;margin:0 auto;border:1px solid var(--line);border-radius:24px;overflow:hidden;background:#f2f4f7}
#auth-app .top{display:flex;align-items:center;gap:11px;padding:18px 24px;background:white;border-bottom:1px solid var(--line)}#auth-app .logo{display:grid;place-items:center;width:38px;height:38px;flex-shrink:0;border-radius:12px;background:var(--accent);color:white}#auth-app .logo svg{width:20px;height:20px}#auth-app .name{font-size:17px;font-weight:500;letter-spacing:-.4px}
#auth-app main{padding:16px 28px 28px;background:#d1d3d6}#auth-app .card{padding:26px 24px 24px;border:1px solid var(--line);border-radius:20px;background:white}#auth-app h1{font-size:26px;line-height:1.2;font-weight:500;letter-spacing:-.7px;margin:0;text-align:center}#auth-app .intro{font-size:14px;line-height:1.5;color:var(--muted);margin:8px 0 27px;text-align:center}#auth-app label{display:block;font-size:14px;font-weight:500;margin-bottom:8px}#auth-app .field{margin-bottom:21px}#auth-app input{display:block;width:100%;min-width:0;height:50px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:0 13px;font-size:16px;color:var(--ink)}#auth-app input::placeholder{color:var(--muted)}#auth-app input:focus{border-color:var(--accent)}#auth-app .pin{height:60px;text-align:center;letter-spacing:12px;padding-left:25px;font-size:23px}#auth-app .pin::placeholder{font-size:18px;letter-spacing:8px;color:#a4acb8}
#auth-app button{min-height:54px;border-radius:12px;font-size:15px;font-weight:500;width:100%}#auth-app .unlock{display:flex;align-items:center;justify-content:center;gap:10px;background:var(--ink);color:white;border:0;box-shadow:0 4px 8px #14274412;margin-top:26px}#auth-app .unlock svg{width:20px;height:20px}#auth-app .forgot{margin-top:12px;background:white;color:var(--accent);border:1px solid var(--line)}#auth-app button:hover{filter:brightness(.94)}#auth-app .notice{border:1px solid #efc5c5;background:#fff4f4;color:#aa3030;border-radius:10px;padding:12px 14px;font-size:14px;line-height:1.5;margin:0 0 22px}#auth-app .notice[hidden]{display:none}#auth-app .notice.info{color:var(--accent);border-color:#ccd7e6;background:#f0f4f9}
@media(max-width:560px){body.loyalty-auth-view{padding:0}#auth-app{border-radius:0;border:0;min-height:100svh}#auth-app .top{padding-top:18px}#auth-app main{min-height:calc(100svh - 75px)}}
@media(max-width:380px){#auth-app .top{padding:12px 16px}#auth-app .name{font-size:15px}#auth-app main{padding:12px 16px 24px}#auth-app .card{padding:24px 18px}}
/* Same safe-area fix as .screen/#loyalty-app .lo-top above, applied to
   this header too (it doesn't use .screen either). */
#auth-app .top{padding-top:calc(18px + env(safe-area-inset-top, 0px))}
/* The header logo is the app's real icon (D61), not the mockup's own
   placeholder tree SVG — fills the same 38x38 chip the mockup's icon
   used, same convention as #loyalty-app .lo-logo img (D51), instead of
   the mockup's own "small icon centered on solid accent color" look
   (which was designed around a generic line icon, not a full-bleed mark
   with its own baked-in background). */
#auth-app .logo{background:none;padding:0}
#auth-app .logo img{width:100%;height:100%;object-fit:contain;border-radius:10px}

/* The punch-card screen's primary action (2026-09-07 request) — replaces
   the old small top-right "Done" button with a large, obvious button
   below the "tap an empty slot…" instructions, in the same dark-charcoal
   color as the home screen's own .lo-scan button. Same id/handler as the
   old Done button (wireCard() is unchanged) — only the label, position,
   and styling changed. */
.btn-card-update {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: #292e36;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 16px;
  cursor: pointer;
}

.btn-card-update:hover {
  filter: brightness(0.94);
}

/* Admin messaging section (message rules) */

.weekday-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.rule-body-preview {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
