/* LoyalTee app: the wallet (/app), the business console (/dashboard) and counter mode (/counter).
   Loaded after tokens.css. */

/* ---------- Card themes ---------- */
.theme-sunset   { --c1: #FF6B35; --c2: #E5306E; --cg: rgba(229, 48, 110, .45); }
.theme-espresso { --c1: #9A6A44; --c2: #3E2A1F; --cg: rgba(62, 42, 31, .45); }
.theme-berry    { --c1: #E0267A; --c2: #7B1FA2; --cg: rgba(123, 31, 162, .42); }
.theme-ocean    { --c1: #2F80ED; --c2: #3730A3; --cg: rgba(55, 48, 163, .42); }
.theme-forest   { --c1: #2F9E64; --c2: #14532D; --cg: rgba(20, 83, 45, .42); }
.theme-mint     { --c1: #14B8A6; --c2: #0E6E8C; --cg: rgba(14, 110, 140, .4); }
.theme-gold     { --c1: #F7B22B; --c2: #EA580C; --cg: rgba(234, 88, 12, .4); }
.theme-midnight { --c1: #3B4A66; --c2: #0F172A; --cg: rgba(15, 23, 42, .5); }
.theme-rose     { --c1: #F472B6; --c2: #E11D48; --cg: rgba(225, 29, 72, .4); }
.theme-lilac    { --c1: #A78BFA; --c2: #6D28D9; --cg: rgba(109, 40, 217, .4); }

.i { width: 22px; height: 22px; flex: none; }

/* ---------- The loyalty card ---------- */
.lt-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: block; color: #fff; text-decoration: none;
  padding: 20px 20px 22px;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--c1, #FF6B35), var(--c2, #E5306E));
  box-shadow: 0 22px 44px -22px var(--cg, rgba(0,0,0,.4)), 0 2px 6px -2px rgba(0,0,0,.15);
  -webkit-tap-highlight-color: transparent;
  transition: transform .35s var(--spring), box-shadow .35s var(--ease);
}
a.lt-card:hover { transform: translateY(-3px); }
a.lt-card:active { transform: scale(.985); }
.lt-shine { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,.28), transparent 55%),
    radial-gradient(60% 60% at 100% 110%, rgba(255,255,255,.14), transparent 70%); }
.lt-shine::after { content: ""; position: absolute; right: -60px; top: -70px; width: 210px; height: 210px; border-radius: 50%; border: 30px solid rgba(255,255,255,.07); }
.lt-head { display: flex; align-items: center; gap: 12px; }
.lt-logo { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); flex: none; }
.lt-logo-i { width: 24px; height: 24px; }
.lt-name { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.lt-name b { font-family: var(--display); font-weight: 750; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-name small { font-size: 13.5px; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.lt-count { font-family: var(--display); font-weight: 750; font-size: 26px; letter-spacing: -.03em; line-height: 1; flex: none; }
.lt-count small { font-size: 15px; opacity: .7; font-weight: 600; }

.lt-stamps { display: grid; gap: 10px; margin-top: 20px; grid-template-columns: repeat(5, 1fr); }
.lt-stamps.cols-3 { grid-template-columns: repeat(3, 1fr); max-width: 220px; }
.lt-stamps.cols-4 { grid-template-columns: repeat(4, 1fr); max-width: 290px; }
.lt-stamps.cols-6 { grid-template-columns: repeat(6, 1fr); }
.lt-stamps.cols-7 { grid-template-columns: repeat(7, 1fr); }
.lt-stamps.cols-8, .lt-stamps.cols-9, .lt-stamps.cols-10 { grid-template-columns: repeat(8, 1fr); }
.lt-stamp { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 2px dashed rgba(255,255,255,.5); color: var(--c2); max-width: 62px; width: 100%; justify-self: center; }
.lt-stamp.on { background: #fff; border: 0; box-shadow: 0 4px 10px -4px rgba(0,0,0,.3); animation: stamp-in .5s var(--spring) both; }
.lt-stamp.goal:not(.on) { border-style: solid; border-color: rgba(255,255,255,.75); color: #fff; }
.lt-stamp-i { width: 56%; height: 56%; }
.lt-stamp.goal:not(.on) .lt-stamp-i { opacity: .9; }
@keyframes stamp-in { from { transform: scale(.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }

.lt-compact { padding: 18px 18px 18px; }
.lt-compact .lt-stamps { gap: 7px; margin-top: 16px; }
.lt-compact .lt-stamp { max-width: 34px; border-width: 1.5px; }
.lt-mini { padding: 14px; border-radius: var(--r); }
.lt-mini .lt-logo { width: 38px; height: 38px; border-radius: 12px; }
.lt-mini .lt-name b { font-size: 16px; }

.lt-points { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.lt-points-n { font-family: var(--display); font-size: 48px; font-weight: 750; letter-spacing: -.04em; line-height: 1; }
.lt-points-l { font-weight: 650; opacity: .85; }
.lt-compact .lt-points { margin-top: 14px; }
.lt-compact .lt-points-n { font-size: 36px; }
.lt-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.25); margin-top: 14px; overflow: hidden; }
.lt-bar i { display: block; height: 100%; border-radius: inherit; background: #fff; width: 0; transition: width .8s var(--ease); }

.lt-ready { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: 99px; background: #fff; color: var(--c2); font-size: 13px; font-weight: 750; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); animation: ready-pulse 2.4s ease-in-out infinite; }
.lt-ready .i { width: 16px; height: 16px; }
.lt-full .lt-ready { position: static; margin-top: 18px; }
@keyframes ready-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.lt-card.is-ready::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); pointer-events: none; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; top: max(14px, env(safe-area-inset-top)); z-index: 300; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 460px; padding: 12px 14px 12px 14px; border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 550; box-shadow: var(--shadow-3); transform: translateY(-16px) scale(.96); opacity: 0; transition: transform .35s var(--spring), opacity .25s; }
.toast.in { transform: none; opacity: 1; }
.toast .i { width: 20px; height: 20px; }
.toast-ok .i { color: #3DDC97; }
.toast-error { background: #B42318; color: #fff; }
.toast-btn { margin-left: 6px; border: 0; background: rgba(255,255,255,.16); color: inherit; font-weight: 700; padding: 7px 12px; border-radius: 10px; }

/* ---------- Sheets ---------- */
.has-sheet { overflow: hidden; }
.sheet-wrap { position: fixed; inset: 0; z-index: 200; display: grid; align-items: end; justify-items: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(10, 8, 14, .5); opacity: 0; transition: opacity .28s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 28px 28px 0 0; padding: 10px 22px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .38s var(--ease); box-shadow: var(--shadow-3); overscroll-behavior: contain; }
.sheet-wrap.in .sheet-scrim { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 0 auto 14px; }
.sheet-title { font-size: 24px; margin: 4px 0 8px; }
.sheet-text { color: var(--ink-2); margin-bottom: 18px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 28px; padding-bottom: 26px; transform: translateY(20px) scale(.97); opacity: 0; transition: transform .3s var(--ease), opacity .2s; }
  .sheet-wrap.in .sheet { opacity: 1; }
  .sheet-grip { display: none; }
}
.btn-danger-solid { --btn-bg: var(--danger); --btn-fg: #fff; }

.field-error { color: var(--danger); font-size: 14px; font-weight: 600; margin: 2px 0 0; }
form > .field-error { background: color-mix(in srgb, var(--danger) 10%, transparent); padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; }
.input[aria-invalid="true"] { border-color: var(--danger); }

/* ---------- Confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; transform: rotate(var(--r)) scale(var(--s)); animation: fall 2.6s cubic-bezier(.2,.6,.4,1) forwards; }
.confetti .c1 { background: #FF6B35; } .confetti .c2 { background: #E5306E; } .confetti .c3 { background: #FFB020; } .confetti .c4 { background: #0FA968; } .confetti .c5 { background: #7C5CFF; }
@keyframes fall { to { transform: translate3d(calc((var(--s) - 1) * 220px), 105vh, 0) rotate(calc(var(--r) + 540deg)) scale(var(--s)); } }

/* ---------- Shared app chrome ---------- */
.app-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.app-logo img { height: 28px; width: auto; }
.mark { width: 32px; height: 32px; flex: none; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 14px; border: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); text-decoration: none; transition: transform .2s var(--ease); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.ghost { background: transparent; box-shadow: none; }
.loading { display: grid; place-items: center; min-height: 60dvh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--raspberry); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-ghost.is-busy::after, .btn-soft.is-busy::after { border-color: var(--line-2); border-top-color: var(--ink); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.stack { display: grid; gap: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.offline-bar { position: sticky; top: 0; z-index: 60; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 8px 14px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; }
.offline-bar .i { width: 18px; height: 18px; }
.fade-in { animation: fade-in .45s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* iOS-style grouped lists */
.group { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); overflow: hidden; }
.group + .group-label, .group-label { display: block; margin: 26px 6px 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.group-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 12px 16px; border: 0; background: none; text-align: left; color: var(--ink); text-decoration: none; font-size: 16px; }
.group-row + .group-row { border-top: 1px solid var(--line); }
button.group-row:hover, a.group-row:hover { background: var(--surface-2); }
.group-row .i { color: var(--ink-3); }
.group-row > span { flex: 1; min-width: 0; }
.group-row small { display: block; color: var(--ink-3); font-size: 13.5px; margin-top: 1px; }
.group-row .chev { width: 18px; height: 18px; color: var(--ink-3); }
.group-row.danger, .group-row.danger .i { color: var(--danger); }
.group-row .value { color: var(--ink-3); font-size: 15px; }

/* =================================================================
   WALLET (/app)
   ================================================================= */
.wallet { min-height: 100dvh; }
.w-app { max-width: 540px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 18px calc(120px + env(safe-area-inset-bottom)); }
.w-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; margin-bottom: 8px; }
.w-top .back { margin-left: -6px; }
.w-hello { font-size: 15px; color: var(--ink-2); font-weight: 600; margin: 10px 2px 2px; }
.w-title { font-size: clamp(32px, 9vw, 40px); margin: 0 2px 18px; }
.w-list { display: grid; gap: 14px; }
.w-list .lt-card { animation: fade-in .5s var(--ease) both; }

.w-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: center; padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 55%, transparent); pointer-events: none; }
.w-dock .btn { pointer-events: auto; width: 100%; max-width: 504px; min-height: 60px; font-size: 18px; border-radius: 20px; }
.w-dock .btn .i { width: 24px; height: 24px; }

.w-banner { display: flex; gap: 12px; align-items: center; padding: 14px 14px 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); margin-bottom: 16px; }
.w-banner > .i { color: var(--raspberry); }
.w-banner p { flex: 1; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.w-banner b { color: var(--ink); display: block; font-size: 15.5px; }
.w-banner .btn { flex: none; }

.w-rewards { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px 18px; padding: 2px 18px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.w-rewards::-webkit-scrollbar { display: none; }
.w-reward { scroll-snap-align: start; flex: none; display: flex; align-items: center; gap: 12px; min-width: 250px; max-width: 300px; padding: 12px 16px 12px 12px; border-radius: var(--r); background: linear-gradient(135deg, #FFF4D6, #FFE2B8); color: #5A3A00; text-decoration: none; box-shadow: var(--shadow-1); }
.w-reward .gift { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: #E07A00; flex: none; }
.w-reward b { display: block; font-size: 15.5px; line-height: 1.25; }
.w-reward small { font-size: 13px; opacity: .8; }
@media (prefers-color-scheme: dark) { .w-reward { background: linear-gradient(135deg, #3A2A0B, #4A2C10); color: #FFE2B0; } .w-reward .gift { background: rgba(255,255,255,.1); color: var(--gold); } }

.w-empty { text-align: center; padding: 8px 6px 0; }
.w-empty-art { position: relative; height: 250px; margin: 6px auto 14px; max-width: 340px; }
.w-empty-art .lt-card { position: absolute; left: 50%; width: 260px; margin-left: -130px; }
.w-empty-art .a { top: 0; transform: rotate(-8deg) translateX(-26px); opacity: .9; }
.w-empty-art .b { top: 26px; transform: rotate(5deg) translateX(30px); opacity: .95; }
.w-empty-art .c { top: 58px; transform: rotate(-1deg); }
.w-empty h1 { font-size: 34px; margin-bottom: 10px; }
.w-empty p { color: var(--ink-2); max-width: 380px; margin: 0 auto 22px; }
.w-steps { display: grid; gap: 10px; text-align: left; margin: 26px 0 0; counter-reset: s; }
.w-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; color: var(--ink-2); }
.w-steps li::before { counter-increment: s; content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 14px; }
.w-steps b { color: var(--ink); display: block; }

/* Card detail */
.w-detail .lt-card { margin-bottom: 18px; }
.w-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.w-stat { background: var(--surface); border-radius: var(--r); padding: 14px 12px; text-align: center; box-shadow: inset 0 0 0 1px var(--line); }
.w-stat b { display: block; font-family: var(--display); font-size: 24px; letter-spacing: -.02em; }
.w-stat span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.w-voucher { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); background: linear-gradient(135deg, #FFF4D6, #FFE2B8); color: #5A3A00; margin-bottom: 12px; position: relative; overflow: hidden; }
.w-voucher::after { content: ""; position: absolute; right: -14px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: var(--bg); }
.w-voucher .gift { width: 48px; height: 48px; border-radius: 15px; background: #fff; color: #E07A00; display: grid; place-items: center; flex: none; }
.w-voucher b { display: block; font-size: 17px; }
.w-voucher small { font-size: 13.5px; opacity: .85; }
@media (prefers-color-scheme: dark) { .w-voucher { background: linear-gradient(135deg, #3A2A0B, #4A2C10); color: #FFE2B0; } .w-voucher .gift { background: rgba(255,255,255,.1); color: var(--gold); } }
.w-menu { display: grid; gap: 10px; }
.w-menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.w-menu-item .cost { font-family: var(--display); font-weight: 750; font-size: 18px; flex: none; min-width: 64px; }
.w-menu-item .cost small { font-family: var(--font); font-size: 12px; color: var(--ink-3); font-weight: 600; display: block; }
.w-menu-item span { flex: 1; font-weight: 600; }
.w-menu-item .bar { width: 64px; height: 6px; border-radius: 9px; background: var(--surface-2); overflow: hidden; flex: none; }
.w-menu-item .bar i { display: block; height: 100%; background: var(--brand-grad); }
.w-menu-item.can { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mint) 60%, transparent); }
.w-history { display: grid; }
.w-history li { display: flex; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.w-history li:last-child { border-bottom: 0; }
.w-history .dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.w-history .dot.gold { background: #FFF1D0; color: #C26A00; }
.w-history .dot.ok { background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); }
.w-history span { flex: 1; }
.w-history time { color: var(--ink-3); font-size: 13.5px; }
.w-section-title { font-size: 20px; margin: 26px 2px 12px; }
.w-terms { font-size: 13.5px; color: var(--ink-3); margin-top: 18px; line-height: 1.55; }

/* The live code */
.code-screen { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow-y: auto; padding: calc(70px + env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); background: radial-gradient(120% 70% at 50% 0%, #FF8A4D 0%, #E5306E 60%, #A11A55 100%); color: #fff; animation: fade-in .3s var(--ease) both; }
.code-screen .close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; background: rgba(255,255,255,.18); color: #fff; box-shadow: none; }
.code-card { width: min(100%, 380px); background: #fff; color: var(--ink); border-radius: 34px; padding: 26px 24px 22px; text-align: center; box-shadow: 0 40px 80px -30px rgba(70, 0, 30, .6); }
.code-card .who { font-family: var(--display); font-weight: 750; font-size: 22px; letter-spacing: -.02em; }
.code-card .sub { font-size: 14.5px; color: #6B6477; margin: 2px 0 16px; }
.code-qr { position: relative; width: min(72vw, 280px); margin: 0 auto; }
.code-qr .qr { width: 100%; height: auto; border-radius: 10px; }
.code-qr.refresh .qr { animation: qr-flip .45s var(--ease); }
@keyframes qr-flip { 0% { opacity: .25; transform: scale(.97); } 100% { opacity: 1; transform: none; } }
.code-qr .mark { position: absolute; left: 50%; top: 50%; width: 15%; height: 15%; transform: translate(-50%, -50%); border-radius: 22%; box-shadow: 0 0 0 5px #fff; }
.code-timer { height: 5px; border-radius: 9px; background: #F1ECE8; margin: 18px 8px 12px; overflow: hidden; }
.code-timer i { display: block; height: 100%; background: linear-gradient(90deg, #FF6B35, #E5306E); border-radius: inherit; transform-origin: left; }
.code-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: #6B6477; padding: 0 6px; }
.code-meta .live { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: #0B8A55; }
.code-meta .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #0FA968; box-shadow: 0 0 0 0 rgba(15,169,104,.6); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(15,169,104,0); } 100% { box-shadow: 0 0 0 0 rgba(15,169,104,0); } }
.code-meta .num { font-family: var(--mono); font-weight: 700; letter-spacing: .08em; color: var(--ink); font-size: 15px; }
.code-hint { margin-top: 22px; text-align: center; font-size: 15px; opacity: .92; max-width: 320px; line-height: 1.45; }
.code-hint b { display: block; font-family: var(--display); font-size: 20px; margin-bottom: 4px; }

/* Stamp received */
.celebrate { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: 24px; background: rgba(10, 8, 14, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in .25s both; }
.celebrate-box { width: min(100%, 400px); text-align: center; color: #fff; }
.celebrate-box .plus { font-family: var(--display); font-weight: 800; font-size: 64px; letter-spacing: -.04em; line-height: 1; animation: pop .6s var(--spring) both; text-shadow: 0 8px 30px rgba(0,0,0,.3); }
.celebrate-box h2 { font-size: 26px; margin: 8px 0 18px; }
.celebrate-box .lt-card { text-align: left; animation: rise .6s var(--spring) .1s both; }
.celebrate-box .btn { margin-top: 20px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(30px) scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }

/* Join page */
.w-join { padding-top: 4px; }
.w-join .lt-card { margin: 8px 0 22px; }
.w-join h1 { font-size: clamp(30px, 8.5vw, 38px); margin-bottom: 8px; }
.w-join .lead { color: var(--ink-2); margin-bottom: 22px; font-size: 17px; }
.w-perks { display: grid; gap: 10px; margin: 22px 0; }
.w-perks li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--ink-2); }
.w-perks .i { color: var(--mint); width: 20px; height: 20px; }
.w-fine { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 16px; line-height: 1.5; }
.w-fine a { color: inherit; }

.w-profile-head { display: flex; align-items: center; gap: 14px; margin: 4px 2px 8px; }
.w-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad); color: #fff; font-family: var(--display); font-weight: 800; font-size: 24px; flex: none; }
.w-profile-head b { display: block; font-size: 20px; font-family: var(--display); letter-spacing: -.02em; }
.w-profile-head small { color: var(--ink-3); font-size: 14px; }
.bday { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* =================================================================
   BUSINESS CONSOLE (/dashboard, /login, /signup)
   ================================================================= */
.console { background: var(--bg); }
.c-shell { min-height: 100dvh; display: grid; grid-template-columns: 1fr; align-items: start; }
.c-side { display: none; }
.c-topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 60px; padding: 0 16px; padding-top: env(safe-area-inset-top); background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.c-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid var(--line); }
.c-tabs a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 650; border-radius: 12px; }
.c-tabs a[aria-current="page"] { color: var(--raspberry); }
.c-tabs .i { width: 24px; height: 24px; }
.c-main { padding: 22px 16px calc(100px + env(safe-area-inset-bottom)); max-width: 1120px; width: 100%; margin: 0 auto; min-width: 0; }
@media (min-width: 960px) {
  .c-shell { grid-template-columns: 264px 1fr; background: linear-gradient(90deg, var(--surface) 0 263px, var(--line) 263px 264px, transparent 264px); }
  .c-topbar, .c-tabs { display: none; }
  .c-side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 22px 16px 18px; }
  .c-main { padding: 34px 40px 60px; }
}
.c-side .app-logo { padding: 4px 10px 22px; }
.c-biz { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 14px; border-radius: 14px; background: var(--surface-2); }
.c-biz b { font-size: 14.5px; display: block; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-biz small { font-size: 12.5px; color: var(--ink-3); }
.c-biz > span:last-child { min-width: 0; }
.c-biz .lt-logo { width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: none; }
.c-biz .lt-logo-i { width: 20px; height: 20px; }
.c-nav { display: grid; gap: 2px; }
.c-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.c-nav a:hover { background: var(--surface-2); color: var(--ink); }
.c-nav a[aria-current="page"] { background: color-mix(in srgb, var(--raspberry) 10%, transparent); color: var(--raspberry); }
.c-nav .i { width: 20px; height: 20px; }
.c-side-foot { margin-top: auto; display: grid; gap: 10px; }
.c-plan { padding: 14px; border-radius: 16px; background: var(--surface-2); font-size: 13.5px; color: var(--ink-2); }
.c-plan b { color: var(--ink); display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.c-plan .i { width: 16px; height: 16px; color: var(--gold); }

.c-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 24px; }
.c-head h1 { font-size: clamp(28px, 4vw, 38px); }
.c-head p { color: var(--ink-2); margin-top: 6px; }
.c-head .actions { display: flex; flex-wrap: wrap; gap: 10px; }

.panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); padding: 22px; min-width: 0; }
.panel + .panel { margin-top: 18px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.panel-title h2 { font-size: 20px; }
.panel-title a { font-size: 14.5px; font-weight: 650; color: var(--raspberry); text-decoration: none; }
.grid-2 { display: grid; gap: 18px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1.6fr 1fr; align-items: start; } .grid-2 > .panel + .panel { margin-top: 0; } }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.kpi { background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); min-width: 0; }
.kpi span { font-size: 13.5px; font-weight: 650; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi span .i { width: 16px; height: 16px; }
.kpi b { display: block; font-family: var(--display); font-size: clamp(28px, 4vw, 36px); letter-spacing: -.03em; margin: 4px 0 2px; line-height: 1.05; }
.kpi small { font-size: 13px; color: var(--ink-3); }
.kpi .up { color: var(--mint); font-weight: 700; }
.kpi .down { color: var(--danger); font-weight: 700; }

.chart { width: 100%; height: 220px; display: block; }
.chart .bar { fill: url(#cg); }
.chart .bar-join { fill: var(--gold); opacity: .9; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart-legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--brand-grad); }
.chart-legend i.j { background: var(--gold); }

.feed { display: grid; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); }
.feed .dot .i { width: 18px; height: 18px; }
.feed .dot.stamp { background: color-mix(in srgb, var(--raspberry) 12%, transparent); color: var(--raspberry); }
.feed .dot.join { background: color-mix(in srgb, var(--sky) 12%, transparent); color: var(--sky); }
.feed .dot.gold { background: #FFF1D0; color: #C26A00; }
.feed .dot.ok { background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); }
.feed span { flex: 1; min-width: 0; }
.feed span b { font-weight: 650; }
.feed small { display: block; color: var(--ink-3); font-size: 12.5px; }
.feed time { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.feed .undone { text-decoration: line-through; opacity: .55; }

.checklist { display: grid; gap: 4px; }
.checklist a, .checklist div { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.checklist a:hover { background: var(--surface-2); }
.checklist .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; color: #fff; }
.checklist .done .tick { background: var(--mint); border-color: var(--mint); }
.checklist .done span { color: var(--ink-3); text-decoration: line-through; }
.checklist .tick .i { width: 15px; height: 15px; stroke-width: 3; }
.progress-ring { font-size: 13px; color: var(--ink-3); font-weight: 650; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.quick a, .quick button { display: grid; gap: 10px; padding: 16px; border: 0; text-align: left; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-weight: 650; font-size: 15px; transition: transform .2s var(--ease); }
.quick a:hover, .quick button:hover { transform: translateY(-2px); }
.quick .qi { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; }
.quick .qi.alt { background: var(--ink); color: var(--bg); }
.quick small { display: block; font-weight: 500; color: var(--ink-3); font-size: 13px; }

/* Tables that become cards on phones */
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .who b { display: block; font-weight: 650; }
.table .who small { color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; }
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .table td { border: 0; padding: 0; }
  .table td.who { grid-column: 1 / -1; }
  .table td[data-label]::before { content: attr(data-label) " "; color: var(--ink-3); font-size: 13px; }
  .table .num { text-align: left; }
}
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.searchbar .input { flex: 1; min-width: 200px; padding-left: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238C8696' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; }
.searchbar .select { width: auto; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.empty .i { width: 40px; height: 40px; color: var(--ink-3); margin: 0 auto 12px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* Forms in the console */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; align-items: center; }
.form-actions .saved { color: var(--mint); font-weight: 650; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; opacity: 0; transition: opacity .3s; }
.form-actions .saved.show { opacity: 1; }
.form-actions .saved .i { width: 18px; height: 18px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); width: 100%; }
.seg label { position: relative; display: grid; place-items: center; min-height: 44px; padding: 6px 12px; border-radius: 11px; cursor: pointer; font-weight: 650; font-size: 15px; color: var(--ink-2); text-align: center; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); }
.seg small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-3); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 10px; }
.swatch { position: relative; aspect-ratio: 1; border-radius: 14px; cursor: pointer; background: linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .2s var(--spring); }
.swatch input, .iconpick input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:has(input:checked) { transform: scale(1.06); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.swatch:has(input:focus-visible), .iconpick:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.iconpick { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; cursor: pointer; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.iconpick:has(input:checked) { background: var(--ink); color: var(--bg); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--raspberry); height: 30px; }
.range-row output { font-family: var(--display); font-weight: 750; font-size: 24px; min-width: 40px; text-align: right; }
.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.toggle-row:first-child { border-top: 0; padding-top: 0; }
.toggle-row b { display: block; font-size: 15.5px; }
.toggle-row small { color: var(--ink-3); font-size: 13.5px; display: block; margin-top: 2px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .25s var(--spring); }
.switch input:checked + i { background: var(--mint); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--focus); outline-offset: 2px; }
.reveal-when-on { margin-top: 12px; }
.pro-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; background: #FFF1D0; color: #A35A00; vertical-align: 2px; }
.pro-tag .i { width: 12px; height: 12px; }
@media (prefers-color-scheme: dark) { .pro-tag { background: rgba(255,176,32,.16); color: var(--gold); } }

.designer { display: grid; gap: 22px; }
@media (min-width: 1000px) { .designer { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .designer .preview { position: sticky; top: 30px; } }
.preview-phone { margin: 0 auto; width: 100%; max-width: 360px; border-radius: 44px; padding: 14px; background: #17131F; box-shadow: var(--shadow-3), inset 0 0 0 2px #2c2633; }
.preview-screen { border-radius: 32px; background: var(--bg); padding: 46px 14px 22px; min-height: 520px; position: relative; overflow: hidden; }
.preview-screen::before { content: ""; position: absolute; top: 12px; left: 50%; width: 96px; height: 26px; margin-left: -48px; border-radius: 20px; background: #17131F; }
.preview-screen .p-label { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin: 18px 4px 10px; }
.preview-screen .p-title { font-family: var(--display); font-weight: 750; font-size: 26px; letter-spacing: -.02em; margin: 0 4px 14px; color: var(--ink); }
.preview-note { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 12px; }
.reward-list { display: grid; gap: 8px; margin-top: 12px; }
.reward-item { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; align-items: center; }
.reward-item .input { min-height: 44px; }

.code-big { font-family: var(--mono); font-size: clamp(30px, 8vw, 40px); font-weight: 800; letter-spacing: .1em; text-align: center; padding: 16px; border-radius: var(--r); background: var(--surface-2); margin: 14px 0; }
.pair-qr { width: 200px; margin: 0 auto; }
.pair-qr .qr { width: 100%; border-radius: 12px; }
.device { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.device:last-child { border-bottom: 0; }
.device .di { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.device span { flex: 1; min-width: 0; }
.device b { display: block; }
.device small { color: var(--ink-3); font-size: 13.5px; }

.plans { display: grid; gap: 16px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan-card { position: relative; padding: 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.plan-card.current { box-shadow: inset 0 0 0 2px var(--raspberry); }
.plan-card h3 { font-size: 24px; }
.plan-card .price { font-family: var(--display); font-weight: 750; font-size: 40px; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan-card .price small { font-family: var(--font); font-size: 15px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; }
.plan-card ul { display: grid; gap: 9px; margin: 16px 0 20px; font-size: 15px; color: var(--ink-2); }
.plan-card li { display: flex; gap: 10px; align-items: flex-start; }
.plan-card li .i { width: 19px; height: 19px; color: var(--mint); margin-top: 2px; }
.plan-card .badge { position: absolute; top: 20px; right: 20px; }

/* Auth pages */
.auth { min-height: 100dvh; display: grid; }
@media (min-width: 960px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth-side { display: none; position: relative; overflow: hidden; padding: 48px; color: #fff; background: radial-gradient(120% 90% at 10% 0%, #FF8A4D, #E5306E 55%, #8E1650); }
@media (min-width: 960px) { .auth-side { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-side h2 { font-size: 46px; line-height: 1.02; max-width: 480px; }
.auth-side p { font-size: 18px; opacity: .9; max-width: 440px; margin-top: 14px; }
.auth-cards { position: relative; height: 300px; }
.auth-cards .lt-card { position: absolute; width: 300px; }
.auth-cards .a { left: 0; top: 0; transform: rotate(-7deg); }
.auth-cards .b { left: 150px; top: 60px; transform: rotate(5deg); }
.auth-main { display: grid; place-items: center; padding: 32px 18px 48px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box .app-logo { margin-bottom: 30px; }
.auth-box h1 { font-size: 34px; margin-bottom: 8px; }
.auth-box > p { color: var(--ink-2); margin-bottom: 24px; }
.auth-box form { display: grid; gap: 16px; }
.auth-alt { margin-top: 22px; font-size: 15px; color: var(--ink-2); text-align: center; }
.auth-alt a, .link { color: var(--raspberry); font-weight: 650; text-decoration: none; }
.auth-alt a:hover, .link:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.chip .i { width: 18px; height: 18px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.pw { position: relative; }
.pw .input { padding-right: 70px; }
.pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-2); font-weight: 650; font-size: 14px; padding: 8px; }

/* =================================================================
   COUNTER MODE (/counter)
   ================================================================= */
.counter-mode { --bg: #0E0B12; --surface: #1B1622; --surface-2: #261F2E; --ink: #F8F3EE; --ink-2: #C4BCCD; --ink-3: #8B8397; --line: rgba(255,255,255,.1); --line-2: rgba(255,255,255,.2); background: var(--bg); color: var(--ink); color-scheme: dark; }
.k-app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.k-top { display: flex; align-items: center; gap: 12px; height: 56px; }
.k-top .who { flex: 1; min-width: 0; }
.k-top b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-top small { display: block; color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-top .icon-btn { background: var(--surface); color: var(--ink); }
.k-body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.scanner { position: relative; border-radius: 30px; overflow: hidden; background: #000; aspect-ratio: 1; max-height: 58dvh; width: 100%; margin: 0 auto; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 16%; border-radius: 26px; pointer-events: none; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scanner .frame::before, .scanner .frame::after { content: ""; position: absolute; inset: -3px; border-radius: 28px; border: 4px solid transparent; }
.scanner .frame::before { border-top-color: #fff; border-bottom-color: #fff; clip-path: polygon(0 0, 22% 0, 22% 100%, 0 100%, 0 0, 100% 0, 100% 100%, 78% 100%, 78% 0); }
.scanner .frame::after { border-left-color: #fff; border-right-color: #fff; clip-path: polygon(0 0, 100% 0, 100% 22%, 0 22%, 0 78%, 100% 78%, 100% 100%, 0 100%); }
.scanner .laser { position: absolute; left: 18%; right: 18%; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, #FF6B35, #E5306E, transparent); box-shadow: 0 0 18px #E5306E; animation: laser 2.2s ease-in-out infinite; }
@keyframes laser { 0%, 100% { transform: translateY(-110px); } 50% { transform: translateY(110px); } }
.scanner-idle { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; text-align: center; background: radial-gradient(80% 80% at 50% 30%, #2A2132, #120E16); }
.scanner-idle .big { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-brand); }
.scanner-idle .big .i { width: 40px; height: 40px; }
.scanner-idle p { color: var(--ink-2); max-width: 300px; font-size: 15px; }
.k-or { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.k-or .btn { min-height: 54px; }
.k-code-form { display: flex; gap: 10px; }
.k-code-form .input { font-family: var(--mono); font-size: 22px; letter-spacing: .12em; text-transform: uppercase; text-align: center; min-height: 60px; background: var(--surface); }
.k-card { display: grid; gap: 14px; animation: fade-in .35s var(--ease) both; }
.k-member { display: flex; align-items: center; gap: 14px; }
.k-member .w-avatar { width: 60px; height: 60px; font-size: 26px; }
.k-member h2 { font-size: 28px; }
.k-member small { color: var(--ink-3); font-size: 14px; }
.k-new { display: inline-flex; margin-left: 8px; vertical-align: 6px; }
.k-actions { display: grid; gap: 10px; }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; }
.stepper button { height: 64px; border-radius: 20px; border: 0; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.stepper button .i { width: 26px; height: 26px; }
.stepper output { text-align: center; font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -.03em; }
.stepper output small { display: block; font-family: var(--font); font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; margin-top: -4px; }
.k-give { min-height: 72px !important; font-size: 21px !important; border-radius: 22px !important; }
.spend { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 20px; padding: 6px 6px 6px 20px; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.spend span { font-family: var(--display); font-size: 34px; font-weight: 750; color: var(--ink-3); }
.spend input { flex: 1; min-width: 0; border: 0; background: none; font-family: var(--display); font-size: 40px; font-weight: 750; letter-spacing: -.02em; padding: 8px 0; outline: none; color: var(--ink); }
.spend-hint { text-align: center; color: var(--ink-3); font-size: 14px; }
.k-rewards { display: grid; gap: 10px; }
.k-reward { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: linear-gradient(135deg, #3A2A0B, #4A2C10); color: #FFE2B0; }
.k-reward .gift { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: var(--gold); flex: none; }
.k-reward span { flex: 1; }
.k-reward b { display: block; font-size: 16.5px; }
.k-reward small { opacity: .8; font-size: 13px; }
.k-reward .btn { --btn-bg: var(--gold); --btn-fg: #2A1A00; }
.k-reward.locked { background: var(--surface); color: var(--ink-2); }
.k-reward.locked .gift { color: var(--ink-3); }
.k-reward.locked .btn { --btn-bg: var(--surface-2); --btn-fg: var(--ink-3); }
.k-foot { display: grid; gap: 10px; margin-top: auto; padding-top: 10px; }
.k-flash { position: fixed; inset: 0; z-index: 170; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; background: rgba(8, 40, 26, .88); color: #fff; animation: fade-in .2s both; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.k-flash.gold { background: rgba(60, 38, 0, .9); }
.k-flash .tick { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: #0FA968; animation: pop .5s var(--spring) both; box-shadow: 0 0 0 14px rgba(15,169,104,.25); }
.k-flash.gold .tick { background: var(--gold); color: #2A1A00; box-shadow: 0 0 0 14px rgba(255,176,32,.25); }
.k-flash .tick .i { width: 62px; height: 62px; stroke-width: 3; }
.k-flash h2 { font-size: 34px; margin-top: 14px; }
.k-flash p { font-size: 18px; opacity: .9; }
.k-warn { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: rgba(255,176,32,.12); color: #FFD58A; font-size: 15px; }
.k-warn .i { color: var(--gold); margin-top: 1px; }

/* =================================================================
   PRINTED POSTER (/dashboard/poster)
   ================================================================= */
.poster-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }
.poster-stage { display: grid; place-items: center; padding: 12px; border-radius: var(--r-lg); background: var(--surface-2); overflow: auto; }
.poster { width: 595px; height: 842px; flex: none; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 54px 50px 40px; background: #fff; color: #17131F; box-shadow: var(--shadow-3); font-family: var(--font); }
.poster::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 290px; background: linear-gradient(140deg, var(--c1), var(--c2)); }
.poster > * { position: relative; }
.poster .p-logo { width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; background: rgba(255,255,255,.22); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.poster .p-logo .i { width: 38px; height: 38px; }
.poster .p-biz { color: #fff; font-family: var(--display); font-weight: 750; font-size: 22px; letter-spacing: -.01em; margin-top: 14px; opacity: .95; }
.poster h1 { color: #fff; font-size: 46px; line-height: 1; letter-spacing: -.035em; margin-top: 10px; max-width: 460px; }
.poster .p-qr { margin-top: 34px; padding: 18px; background: #fff; border-radius: 30px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.35); }
.poster .p-qr .qr { width: 250px; height: 250px; }
.poster .p-offer { font-family: var(--display); font-weight: 750; font-size: 25px; letter-spacing: -.02em; margin-top: 26px; max-width: 470px; line-height: 1.15; }
.poster .p-steps { display: flex; gap: 22px; margin-top: 22px; font-size: 13.5px; color: #5E5869; }
.poster .p-steps span { display: flex; align-items: center; gap: 8px; }
.poster .p-steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #17131F; color: #fff; font-size: 12px; flex: none; }
.poster .p-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #8C8696; }
.poster .p-foot img { height: 20px; width: auto; }
.poster .p-url { font-family: var(--mono); font-size: 12.5px; color: #5E5869; margin-top: 10px; }
.poster.table-card { width: 420px; height: 595px; padding: 38px 34px 28px; }
.poster.table-card::before { height: 210px; }
.poster.table-card h1 { font-size: 34px; }
.poster.table-card .p-logo { width: 58px; height: 58px; border-radius: 19px; }
.poster.table-card .p-qr .qr { width: 180px; height: 180px; }
.poster.table-card .p-offer { font-size: 20px; }
.poster.table-card .p-steps { gap: 12px; font-size: 12px; }

@media print {
  @page { size: A4; margin: 0; }
  body.printing { background: #fff !important; }
  body.printing .c-side, body.printing .c-topbar, body.printing .c-tabs, body.printing .c-head, body.printing .poster-tools, body.printing .toasts { display: none !important; }
  body.printing .c-shell { display: block; }
  body.printing .c-main { padding: 0; max-width: none; }
  body.printing .poster-stage { padding: 0; background: none; display: block; }
  body.printing .poster { zoom: 1 !important; box-shadow: none; width: 210mm; height: 297mm; padding: 22mm 18mm 14mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing .poster::before { height: 102mm; }
  body.printing .poster.table-card { width: 148mm; height: 210mm; margin: 0 auto; }
}

/* Spacing helpers (the CSP rules out style="" attributes) */
[data-gap] { margin-top: 14px; }
.panel-gap { height: 18px; }
.input[data-narrow] { width: 112px; flex: none; text-align: center; }
.code-big.small { font-size: 16px; letter-spacing: 0; word-break: break-all; font-weight: 700; }
button.link { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.c-head h1 .i { display: inline; vertical-align: -3px; }
.panel-title h2 .i { width: 20px; height: 20px; display: inline; vertical-align: -3px; color: var(--gold); }
.k-top .lt-logo { width: 42px; height: 42px; border-radius: 13px; color: #fff; background: linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: none; }
.k-top .lt-logo-i { width: 22px; height: 22px; }
.scanner-idle h1 { font-size: 28px; }
.poster-tools .seg { width: auto; }
.lt-compact.is-ready { padding-bottom: 60px; }

/* Business logos and brand colours */
.lt-logo.has-img { background: #fff; padding: 4px; overflow: hidden; box-shadow: 0 3px 10px -4px rgba(0, 0, 0, .35); }
.lt-logo.has-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; }
.c-biz .lt-logo.has-img, .k-top .lt-logo.has-img { background: #fff; padding: 3px; }
.c-biz .lt-logo.has-img img, .k-top .lt-logo.has-img img { border-radius: 9px; }
.k-brand { display: contents; }
.poster .p-logo.has-img { background: #fff; padding: 8px; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .4); }
.poster .p-logo.has-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 16px; }
.logo-row { display: flex; gap: 16px; align-items: center; }
.logo-preview { flex: none; }
.logo-preview .lt-logo { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.logo-preview .lt-logo .lt-logo-i { width: 32px; height: 32px; }
.logo-preview .lt-logo.has-img { background: #fff; padding: 6px; box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.logo-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.logo-actions .hint { flex-basis: 100%; }
.logo-actions label.btn { cursor: pointer; }
.swatch-custom { display: grid; place-items: center; color: #fff; }
.swatch-custom .i { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.custom-colour { margin-top: 14px; }
.colour-pick { display: flex; gap: 10px; align-items: center; }
.colour-pick input[type=color] { width: 56px; height: 50px; border: 0; padding: 0; background: none; border-radius: 12px; cursor: pointer; flex: none; }
.colour-pick input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.colour-pick input[type=color]::-webkit-color-swatch { border: 0; border-radius: 12px; }
.colour-pick .input { max-width: 150px; font-family: var(--mono); text-transform: uppercase; }
