/* WeLoyal Scanner — Safari 12 safe. No nesting, :is(), backdrop-filter, or webfonts. */
* { -webkit-box-sizing: border-box; box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111111;
  /* Stop double-tap zoom on iPad Safari (kiosk / scanner taps). */
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

#app {
  min-height: 100%;
  padding-top: calc(62px + env(safe-area-inset-top, 0px));
  background: #ffffff;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

button,
.btn,
.app-nav-btn,
.segmented-btn,
.joiners-row,
.amount-preset,
.keypad-key,
.qty-step {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

/* ---------- app header (shared nav on every screen) ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  width: 100%;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  min-height: 54px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 8px;
  background: #ffffff;
  border-bottom: 1px solid #e5e5ea;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.app-header-side {
  -webkit-box-flex: 0; -ms-flex: 0 0 48px; flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  min-height: 44px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.app-header-side-left {
  -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start;
}
.app-header-side-right {
  -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;
}
.app-header-center {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  padding: 0 8px;
  text-align: center;
}
.app-header-logo {
  display: block;
  height: 30px;
  width: auto;
  max-width: 150px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 4px;
}
.app-header-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: #111111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-header-meta {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  min-width: 0;
  max-width: 100%;
}
.app-nav-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #f2f2f7;
  color: #111111;
  font-size: 30px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.app-nav-btn-icon {
  font-size: 0;
  line-height: 0;
}
.app-nav-btn svg {
  display: block;
  margin: 0 auto;
}
.app-nav-btn:active { background: #e5e5ea; }
#btn-joiners { position: relative; }
.joiners-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #a3e635;
  color: #111111;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  border: 2px solid #ffffff;
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.app-nav-spacer {
  display: block;
  width: 44px;
  height: 44px;
}
.scan-store-chip {
  min-width: 0;
  max-width: 62%;
  margin-right: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #111111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scan-mode-chip {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #a3e635;
  color: #111111;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.login-mode .app-header { display: none; }
body.login-mode #app { padding-top: 0; }
body.login-mode .wrap { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }

/* ---------- layout ---------- */
.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.screen {
  background: #ffffff;
  border: 1px solid #e5e5ea;
  border-radius: 20px;
  padding: 24px 20px 22px;
  -webkit-box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

h1, h2, .screen-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #111111;
}
h1 { font-size: 28px; line-height: 1.12; margin: 0; }
h2, .screen-title { font-size: 24px; line-height: 1.15; margin: 0 0 10px; }

.muted { color: #6e6e73; font-size: 15px; line-height: 1.5; margin: 0 0 8px; }
.lead { font-size: 16px; }
.hidden { display: none !important; }

.store-label {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8e8e93;
}

/* ---------- login ---------- */
.screen-auth {
  border: 0;
  background: transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
  padding: 8px 0 0;
}
.auth-shell {
  text-align: center;
  padding: 12px 8px 0;
}
.auth-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 240px;
  margin: 0 auto 20px;
  border-radius: 8px;
}
.auth-shell h1 { margin-bottom: 6px; }
.auth-form {
  margin-top: 28px;
  text-align: left;
  padding: 22px 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e5e5ea;
  -webkit-box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.status-error { color: #d70015; font-weight: 500; }

/* ---------- settings page ---------- */
.screen-settings {
  padding: 14px 16px 20px;
}
.set-store {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  margin: 0 0 20px;
  padding: 14px;
  border-radius: 18px;
  background: #f2f2f7;
}
.set-store-text { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
.set-store-name {
  margin: 0;
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-group-title {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e8e93;
}
.set-group {
  margin: 0 0 20px;
  border: 1px solid #e5e5ea;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}
.set-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid #ececf0;
}
.set-row:last-child { border-bottom: 0; }
.set-extend {
  background: #f2f2f7;
  border-bottom: 1px solid #ececf0;
}
.set-extend .set-row-nested {
  background: transparent;
  padding-left: 22px;
}
.set-extend .set-row-nested:last-child { border-bottom: 0; }
.set-extend-body {
  padding: 12px 14px 16px;
}
.set-extend-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8e8e93;
}
.amount-field-nested {
  margin: 0;
  padding: 12px 12px 8px;
}
.set-row-text {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 0;
  padding-right: 14px;
}
.set-row-label {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111111;
}
.set-row-desc {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: #8e8e93;
}
.set-num {
  width: 74px !important;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  margin: 0 !important;
  padding: 10px 8px !important;
  text-align: center;
  font-weight: 600;
}
.set-amount-value {
  min-width: 74px;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  background: #f2f2f7;
  color: #111111;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.set-contact-btn {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  max-width: 118px;
  height: 36px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 36px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.set-contact-btn:active { background: #333333; }

/* iOS-style switch — pure CSS, Safari 12 safe */
.switch {
  position: relative;
  display: block;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  width: 51px;
  height: 31px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.switch-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 999px;
  background: #e5e5ea;
  pointer-events: none;
  -webkit-transition: background 0.2s ease;
  transition: background 0.2s ease;
}
.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #ffffff;
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  -webkit-transition: -webkit-transform 0.2s ease;
  transition: transform 0.2s ease;
}
.switch input:checked + .switch-track {
  background: #34c759;
}
.switch input:checked + .switch-track .switch-knob {
  -webkit-transform: translateX(20px);
  transform: translateX(20px);
}

/* history */
.history-list { max-height: 320px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.history-empty {
  margin: 0;
  padding: 18px 14px;
  font-size: 14px;
  color: #8e8e93;
  text-align: center;
}
.history-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline;
  padding: 11px 14px;
  border-bottom: 1px solid #ececf0;
  font-size: 14px;
}
.history-row:last-child { border-bottom: 0; }
.history-time {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  width: 48px;
  font-weight: 600;
  color: #8e8e93;
  font-variant-numeric: tabular-nums;
}
.history-main {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 0;
  padding: 0 10px 0 4px;
  font-weight: 600;
  color: #111111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-what {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  max-width: 45%;
  color: #6e6e73;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-group-danger { border-color: #f6d3d7; }
.set-signout {
  display: block;
  width: 100%;
  padding: 15px 14px;
  border: 0;
  background: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #d70015;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.set-signout:active { background: #fdf1f2; }

.store-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 14px 0 0;
  border-radius: 16px;
  background: #111111;
  color: #ffffff;
  overflow: hidden;
  -webkit-flex-shrink: 0;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.store-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.store-avatar-fallback {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 56px;
  text-align: center;
}
.store-avatar.has-image .store-avatar-fallback {
  display: none;
}
/* ---------- buttons ---------- */
.btn {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 15px 20px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.btn:active { opacity: 0.9; }
.btn-lg { padding: 17px 20px; font-size: 17px; border-radius: 16px; }

.btn-primary {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}
.btn-secondary {
  background: #f2f2f7;
  color: #111111;
  border-color: #e5e5ea;
}
.btn-ghost {
  background: #ffffff;
  color: #111111;
  border-color: #e5e5ea;
}
.btn-quiet { color: #6e6e73; border-color: transparent; background: transparent; }

.row { display: -webkit-box; display: -ms-flexbox; display: flex; }
.row .btn { margin-right: 10px; }
.row .btn:last-child { margin-right: 0; }

.field-group { margin-bottom: 2px; }

/* ---------- scan ---------- */
.screen-scan { padding: 0; position: relative; }

.stage {
  position: relative;
  width: 100%;
  background: #000000;
  border-radius: 18px;
  overflow: hidden;
}
#video {
  display: block;
  width: 100%;
  height: auto;
  background: #000000;
  /* Own compositor layer — helps Safari paint live video smoothly on older iPads. */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
/* Vignette removed — radial gradient over live video caused extra compositing work. */
.stage::after {
  display: none;
}
.frame {
  position: absolute;
  top: 50%; left: 50%;
  width: 66%;
  padding-bottom: 66%;
  margin: -33% 0 0 -33%;
  z-index: 2;
  pointer-events: none;
}
.corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #ffffff;
  border-style: solid;
}
.corner-tl { top: 0; left: 0; border-width: 4px 0 0 4px; border-radius: 12px 0 0 0; }
.corner-tr { top: 0; right: 0; border-width: 4px 4px 0 0; border-radius: 0 12px 0 0; }
.corner-bl { bottom: 0; left: 0; border-width: 0 0 4px 4px; border-radius: 0 0 0 12px; }
.corner-br { bottom: 0; right: 0; border-width: 0 4px 4px 0; border-radius: 0 0 12px 0; }

.handheld-stage {
  display: none;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-box-align: center; -ms-flex-align: center; align-content: center; align-items: center;
  min-height: 58vh;
  padding: 32px 24px;
  text-align: center;
  background: #111111;
  border-radius: 18px;
}
body.handheld-scan .stage { display: none; }
body.handheld-scan .handheld-stage {
  display: -webkit-box; display: -ms-flexbox; display: flex;
}
.handheld-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}
.handheld-copy {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: rgba(255,255,255,0.72);
}
.hid-catcher {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  margin: 0;
  padding: 0;
  opacity: 0.01;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 16px;
  z-index: 3;
}

.status {
  text-align: center;
  font-size: 15px;
  color: #6e6e73;
  min-height: 22px;
  margin: 14px 0 0;
}

/* ---------- card screen ---------- */
body.card-mode {
  background: #ffffff;
}
body.card-mode #app {
  background: #ffffff;
}
body.card-mode .wrap {
  max-width: 600px;
  padding: 0 16px 40px;
}
.screen-card {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  padding: 16px 0 0;
  -webkit-box-shadow: none;
  box-shadow: none;
}

/* ---------- profile card (customer hero) ---------- */

/* Full-screen dark "Done" overlay on the card screen (over the amount
 * entry), with a visible countdown. Tap anywhere to skip. */
.card-success {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  padding: 24px 20px;
  background: #000000;
  text-align: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-animation: card-success-in 0.25s ease-out;
  animation: card-success-in 0.25s ease-out;
}
.card-success-head {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  display: block;
  width: 100%;
  cursor: pointer;
}
.card-success.has-amount {
  -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start;
  padding-top: 28px;
}
.card-success-slot {
  -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;
  width: 100%;
  max-width: 460px;
  margin: 16px auto 0;
}
.card-success-slot .amount-field { width: 100%; display: none; }
.card-success-slot .keypad-key { padding-top: 12px; padding-bottom: 12px; display: none; }
.card-success-slot:empty { display: none; }
.card-success-slot .amount-field {
  background: #131316;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  padding: 18px 16px 14px;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.card-success-slot .amount-field input,
.card-success-slot .amount-currency { color: #ffffff; }
.card-success-slot .amount-label { color: rgba(235, 235, 245, 0.55); }
.card-success-slot .amount-preset,
.card-success-slot .keypad-key {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.card-success-slot .keypad-key-alt { background: rgba(255, 255, 255, 0.03); }
.card-success-slot .keypad-key:active { background: rgba(255, 255, 255, 0.16); }
.card-success-slot .amount-preset.active {
  background: #a3e635;
  border-color: #a3e635;
  color: #111111;
}
@-webkit-keyframes card-success-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes card-success-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.card-success.hidden { display: none; }

.card-success-icon {
  display: block;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #34c759;
  color: #ffffff;
  font-size: 48px;
  font-weight: 700;
  line-height: 88px;
  text-align: center;
  margin: 0 auto 24px;
}
.card-success-text {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  min-width: 0;
}
.card-success-title {
  margin: 0 0 10px;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.card-success-msg {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  color: rgba(235, 235, 245, 0.75);
}
.card-success-timer-wrap {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  margin: 36px 0 0;
  text-align: center;
}
.card-success-timer {
  display: inline-block;
  min-width: 0;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.18);
  border: 1px solid rgba(52, 199, 89, 0.55);
  color: #34c759;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.card-success-timer-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(235, 235, 245, 0.5);
}

.profile-card-wrap {
  position: relative;
  margin: 8px 0 24px;
  padding-bottom: 8px;
}
.profile-card {
  position: relative;
  z-index: 2;
  border-radius: 28px 28px 20px 20px;
  padding: 22px 20px 20px;
  color: #ffffff;
  background: #0b0b0c;
  background: radial-gradient(120% 120% at 30% 10%, #1a1a1a 0%, #0f0f10 58%, #0b0b0c 100%);
  -webkit-box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}
.profile-card.is-entering {
  -webkit-animation: profile-enter 0.4s ease-out;
  animation: profile-enter 0.4s ease-out;
}
@-webkit-keyframes profile-enter {
  from { opacity: 0; -webkit-transform: translateY(8px); }
  to { opacity: 1; -webkit-transform: translateY(0); }
}
@keyframes profile-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.profile-card-meta {
  margin: 0 0 18px;
  font-size: 14px;
  color: #d4d4d4;
}
.profile-status {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
.profile-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: #84cc16;
  -webkit-animation: status-pulse 2s ease-in-out infinite;
  animation: status-pulse 2s ease-in-out infinite;
}
@-webkit-keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.profile-identity {
  margin: 0 0 18px;
}
.profile-name {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-name-edit {
  display: inline-block;
  max-width: 100%;
  padding: 2px 28px 2px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px 16px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.profile-name-edit:active {
  opacity: 0.75;
}
.profile-role {
  margin: 6px 0 0;
  font-size: 15px;
  color: #a3a3a3;
}
.profile-balance-block {
  text-align: left;
  margin: 0 0 18px;
  padding: 0 2px;
}
.profile-balance {
  display: inline;
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
}
.profile-balance.is-animating {
  -webkit-animation: points-pop 0.35s ease;
  animation: points-pop 0.35s ease;
}
.profile-balance-unit {
  display: inline;
  margin-left: 6px;
  font-size: 18px;
  font-weight: 500;
  color: #a3a3a3;
  vertical-align: baseline;
}
.stamp-track-wrap {
  margin: 2px 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.stamp-track-head {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  margin: 0 0 12px;
  padding: 0 2px;
}
.stamp-track-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
}
.stamp-track-count {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
/* Official Wallet strip art (CDN). Aspect ~1125×432. */
.stamp-strip-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}
.stamp-track {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: horizontal; -webkit-box-direction: normal;
  -ms-flex-direction: row; flex-direction: row;
  -ms-flex-wrap: nowrap; flex-wrap: nowrap;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.stamp-track.is-wrap {
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.stamp-dot {
  position: relative;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.25);
  -webkit-box-sizing: border-box; box-sizing: border-box;
  background-repeat: no-repeat;
  background-position: center center;
  -webkit-background-size: 70% 70%; background-size: 70% 70%;
}
.stamp-track.is-wrap .stamp-dot {
  margin: 6px 5px;
}
.stamp-dot.is-filled {
  border-style: solid;
  border-color: #a3e635;
  background-color: #a3e635;
  -webkit-box-shadow: 0 4px 12px rgba(163, 230, 53, 0.28);
  box-shadow: 0 4px 12px rgba(163, 230, 53, 0.28);
}
.stamp-dot.has-image {
  border-style: solid;
  border-width: 1px;
  -webkit-background-size: cover; background-size: cover;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.stamp-dot-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 9px;
  height: 14px;
  margin: -9px 0 0 -4px;
  border: solid #111111;
  border-width: 0 2.5px 2.5px 0;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.profile-segmented {
  margin: 0 0 14px;
}
.profile-segmented .segmented-inner {
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
}
.profile-segmented .segmented-thumb {
  background: rgba(255, 255, 255, 0.96);
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.profile-segmented .segmented-btn {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
}
.profile-segmented .segmented-btn.active {
  color: #111111;
}
.stamp-inline-actions {
  margin: 0 0 4px;
}
.stamp-qty-field {
  margin: 0 0 12px;
}
.stamp-qty-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  height: 48px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.stamp-qty-row #qty {
  -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto;
  width: 0;
  margin: 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 40px;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.stamp-qty-step {
  -webkit-box-flex: 0; -ms-flex: 0 0 40px; flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111111;
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 40px;
  cursor: pointer;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.stamp-qty-step:active {
  background: #ffffff;
  opacity: 0.9;
}
.stamp-qty-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.btn-stamp-action {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #a3e635;
  color: #111111;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.btn-stamp-action:active:not(.is-dimmed):not(.is-busy) {
  -webkit-transform: scale(0.98);
  transform: scale(0.98);
}
.btn-stamp-action.is-dimmed {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.4);
}
.btn-stamp-action.is-busy {
  background: #f2f2f7;
  color: #3a3a3c;
  font-weight: 500;
  font-size: 15px;
  cursor: default;
}
.btn-stamp-action.is-busy .status-pill-spinner {
  border-color: rgba(58, 58, 60, 0.22);
  border-top-color: #3a3a3c;
}
@media (prefers-reduced-motion: reduce) {
  .btn-stamp-action.is-busy .status-pill-spinner {
    border-color: rgba(58, 58, 60, 0.45);
  }
}
.stamp-action-note {
  margin: 10px 2px 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #fca5a5;
  text-align: center;
}
.profile-ltv-footer {
  position: relative;
  z-index: 1;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  margin: -6px 0 0;
  padding: 14px 16px 16px;
  border-radius: 0 0 28px 28px;
  background: #a3e635;
  -webkit-box-shadow: 0 40px 80px -16px rgba(163, 230, 53, 0.75);
  box-shadow: 0 40px 80px -16px rgba(163, 230, 53, 0.75);
  font-size: 14px;
  font-weight: 600;
  color: #111111;
  text-align: center;
}
.profile-ltv-icon {
  display: block;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  margin-right: 8px;
}
.profile-ltv-line {
  line-height: 1.3;
}
.profile-ltv-value {
  font-weight: 700;
}
.profile-ltv-footer.is-empty .profile-ltv-value {
  font-weight: 600;
  opacity: 0.65;
}
.profile-ltv-strip--compact {
  position: static;
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #a3e635;
  -webkit-box-shadow: none;
  box-shadow: none;
}

/* Compact customer stats (LTV / visits / stamps to reward) */
.card-stats {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch;
  margin: 0 0 12px;
}
.card-stats-footer {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch;
  margin: -6px 0 0;
  padding: 12px 10px 14px;
  border-radius: 0 0 28px 28px;
  background: #a3e635;
  -webkit-box-shadow: 0 40px 80px -16px rgba(163, 230, 53, 0.75);
  box-shadow: 0 40px 80px -16px rgba(163, 230, 53, 0.75);
}
.card-stat {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 0;
  text-align: center;
  padding: 6px 4px;
  margin: 0 3px;
}
.card-stat:first-child { margin-left: 0; }
.card-stat:last-child { margin-right: 0; }
.card-stats .card-stat {
  border-radius: 12px;
  background: #f2f2f7;
}
.card-stats .card-stat-ltv {
  background: #a3e635;
}
.card-stats-footer .card-stat {
  border-right: 1px solid rgba(17, 17, 17, 0.12);
}
.card-stats-footer .card-stat:last-child {
  border-right: 0;
}
.card-stat-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #111111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-stat-label {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(17, 17, 17, 0.62);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Flashing notification badge on the Redeem tab (Safari 12 safe). */
.redeem-badge {
  position: absolute;
  top: 5px;
  right: 16px;
  z-index: 3;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  -webkit-box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  -webkit-animation: redeem-badge-pulse 1.4s ease-out infinite;
  animation: redeem-badge-pulse 1.4s ease-out infinite;
}
.redeem-badge.hidden {
  display: none;
}
@-webkit-keyframes redeem-badge-pulse {
  0% { -webkit-box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { -webkit-box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); }
  100% { -webkit-box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@keyframes redeem-badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Soft glowing highlight when stamp rewards are ready (CSS-only; Safari 12 safe). */
.card-stats-footer .card-stat.card-stat-reward-ready {
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.10);
  -webkit-box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, 0.40), 0 0 0 0 rgba(239, 68, 68, 0.25);
  box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, 0.40), 0 0 0 0 rgba(239, 68, 68, 0.25);
  -webkit-animation: reward-ready-glow 1.8s ease-in-out infinite;
  animation: reward-ready-glow 1.8s ease-in-out infinite;
}
.card-stats-footer .card-stat.card-stat-reward-ready .card-stat-value {
  color: #dc2626;
}
.card-stats-footer .card-stat.card-stat-reward-ready .card-stat-label {
  color: rgba(220, 38, 38, 0.78);
  font-weight: 700;
}
@-webkit-keyframes reward-ready-glow {
  0%, 100% {
    -webkit-box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, 0.35), 0 0 0 0 rgba(239, 68, 68, 0.28);
  }
  50% {
    -webkit-box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, 0.70), 0 0 16px 3px rgba(239, 68, 68, 0.30);
  }
}
@keyframes reward-ready-glow {
  0%, 100% {
    box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, 0.35), 0 0 0 0 rgba(239, 68, 68, 0.28);
  }
  50% {
    box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, 0.70), 0 0 16px 3px rgba(239, 68, 68, 0.30);
  }
}

.card-logo-img {
  display: block;
  height: 30px;
  width: auto;
  max-width: 150px;
  border-radius: 4px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #111111;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.icon-btn:active { background: #f2f2f7; }
.icon-btn svg { display: block; margin: 0 auto; }

.segmented {
  margin: 0 0 16px;
}
.segmented-inner {
  position: relative;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  height: 50px;
  padding: 4px;
  border-radius: 999px;
  background: #e5e5ea;
}
.segmented-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: #ffffff;
  pointer-events: none;
  z-index: 1;
  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  -webkit-transform: translateX(0);
  transform: translateX(0);
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
}
.segmented.is-redeem .segmented-thumb {
  -webkit-transform: translateX(100%);
  transform: translateX(100%);
}
.segmented-btn {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  position: relative;
  z-index: 2;
  height: 100%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #6e6e73;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-transition: color 0.3s ease;
  transition: color 0.3s ease;
}
.segmented-btn.active {
  color: #111111;
}

.amount-field {
  margin: 0 0 16px;
  padding: 22px 18px 18px;
  border-radius: 28px;
  border: 1px solid #ececf1;
  background: #ffffff;
  text-align: center;
  -webkit-box-shadow: 0 12px 30px rgba(17, 17, 17, 0.06);
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.06);
}

.amount-input-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  min-height: 72px;
}
.amount-input-side {
  -webkit-box-flex: 0; -ms-flex: 0 0 136px; flex: 0 0 136px;
  width: 136px;
}
.amount-input-side-left {
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.amount-input-side-right {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.amount-input-main {
  -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  min-width: 0;
}
.amount-input-row-plain {
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.amount-input-row input {
  width: auto;
  min-width: 80px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  color: #111111;
}
.amount-currency {
  font-size: 40px;
  font-weight: 300;
  color: #8e8e93;
  line-height: 1;
  margin-right: 4px;
}
.btn-amount-action {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-box-sizing: border-box; box-sizing: border-box;
  width: 136px;
  height: 58px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #a3e635;
  color: #111111;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-transition: -webkit-transform 0.2s ease, background 0.2s ease;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn-amount-action:active:not(:disabled) {
  -webkit-transform: scale(0.97);
  transform: scale(0.97);
}
.btn-amount-action[disabled],
.btn-amount-action:disabled {
  background: #e5e5ea;
  color: #aeaeb2;
  cursor: default;
}
.amount-label {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #8e8e93;
}
.amount-presets {
  position: relative;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 16px 0 0;
}
.preset-thumb {
  display: none;
}
.amount-preset {
  position: relative;
  z-index: 1;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 23%;
  -ms-flex: 0 0 23%;
  flex: 0 0 23%;
  width: 23%;
  max-width: 23%;
  height: 42px;
  margin: 0 1% 8px;
  padding: 0;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  -webkit-transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, -webkit-transform 0.2s ease;
  transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}
.amount-preset:active {
  -webkit-transform: scale(0.96);
  transform: scale(0.96);
}
.amount-preset.active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}
.amount-presets.is-refreshing .amount-preset {
  -webkit-transition: color 0.3s ease, border-color 0.3s ease, -webkit-transform 0.2s ease;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

/* On-screen keypad: iOS hides its own keyboard while the scanner gun is
   paired, so staff need tappable digits for purchase amounts. */
.keypad {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 4px 0 0;
}
.keypad-key {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 31.333%;
  -ms-flex: 0 0 31.333%;
  flex: 0 0 31.333%;
  width: 31.333%;
  max-width: 31.333%;
  height: 56px;
  margin: 0 1% 8px;
  padding: 0;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  font-family: inherit;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  -webkit-transition: background-color 0.15s ease, -webkit-transform 0.15s ease;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.keypad-key:active {
  background: #e5e5ea;
  -webkit-transform: scale(0.96);
  transform: scale(0.96);
}
.keypad-key-alt {
  background: #f2f2f7;
  font-size: 20px;
}

.qty-stepper {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
.qty-stepper #qty {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  margin: 0 8px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}
.qty-step {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 64px;
  -ms-flex: 0 0 64px;
  flex: 0 0 64px;
  width: 64px;
  height: 52px;
  padding: 0;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  font-family: inherit;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
.qty-step:active {
  background: #e5e5ea;
}

.field-block { margin: 0 0 14px; }

.card-action-stack {
  display: block;
}

.btn-official {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0 0 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: #111111;
  color: #ffffff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 54px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-transition: -webkit-transform 0.3s ease, background 0.2s ease;
  transition: transform 0.3s ease, background 0.2s ease;
}
.btn-official:active:not(:disabled) {
  -webkit-transform: scale(0.97);
  transform: scale(0.97);
}
.btn-official[disabled],
.btn-official:disabled {
  background: #e5e5ea;
  color: #aeaeb2;
  cursor: default;
}

.list-title {
  margin: 26px 0 0;
  padding: 0 0 0 2px;
  font-size: 17px;
  font-weight: 700;
  color: #111111;
}
.info-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline;
  padding: 13px 4px;
  border-bottom: 1px solid #e5e5ea;
  font-size: 15px;
}
.info-row-label { color: #8e8e93; padding-right: 16px; }
.info-row-value { color: #111111; text-align: right; word-break: break-word; font-weight: 500; }
.card-hint {
  margin: 18px 0 6px;
  font-size: 13px;
  line-height: 1.45;
  color: #8e8e93;
  text-align: center;
}

/* ---------- forms ---------- */
.lbl {
  display: block;
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e8e93;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 14px 14px;
  margin-bottom: 4px;
  font-family: inherit;
  font-size: 16px;
  color: #111111;
  border-radius: 12px;
  border: 1px solid #e5e5ea;
  background: #fafafa;
  -webkit-appearance: none;
  appearance: none;
}
textarea { font-family: Menlo, Monaco, Consolas, monospace; font-size: 16px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #111111;
  background: #ffffff;
  -webkit-box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.amount-field input[type="text"] {
  display: block;
  width: 180px;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  min-height: 72px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  color: #111111;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.amount-field input[type="text"]::-webkit-input-placeholder { color: #c7c7cc; }
.amount-field input[type="text"]::-moz-placeholder { color: #c7c7cc; }
.amount-field input[type="text"]:-ms-input-placeholder { color: #c7c7cc; }
.amount-field input[type="text"]::placeholder { color: #c7c7cc; }
.amount-field input[type="text"]:focus {
  outline: none;
  border: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
}

@-webkit-keyframes amount-flip {
  0% { opacity: 1; -webkit-transform: translateY(0); }
  45% { opacity: 0.35; -webkit-transform: translateY(-10px); }
  100% { opacity: 1; -webkit-transform: translateY(0); }
}
@keyframes amount-flip {
  0% { opacity: 1; transform: translateY(0); }
  45% { opacity: 0.35; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.amount-input-row.is-animating {
  -webkit-animation: amount-flip 0.32s ease;
  animation: amount-flip 0.32s ease;
}

@-webkit-keyframes points-pop {
  0% { opacity: 0.55; -webkit-transform: scale(0.94); }
  100% { opacity: 1; -webkit-transform: scale(1); }
}
@keyframes points-pop {
  0% { opacity: 0.55; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- result screens ---------- */
.screen-result { text-align: center; padding-top: 28px; }
.result-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 36px;
  font-weight: 700;
  line-height: 76px;
  text-align: center;
}
.result-icon.ok { background: #248a3d; color: #fff; }
.result-icon.err { background: #d70015; color: #fff; }
.result-title { margin: 0 0 8px; }
.result-title.ok { color: #248a3d; font-size: 28px; }
.result-title.err { color: #d70015; font-size: 22px; }
.result-detail { font-size: 16px; color: #3a3a3c; margin: 0 0 6px; }
.result-balance { font-size: 18px; font-weight: 600; margin: 0 0 18px; }

.btn[disabled], .btn:disabled { opacity: 0.45; cursor: default; }

.mono { font-family: Menlo, Monaco, Consolas, monospace; font-size: 13px; }
.out {
  background: #f2f2f7;
  border: 1px solid #e5e5ea;
  padding: 14px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-all;
}
.support { list-style: none; padding: 0; margin: 16px 0 0; font-size: 13px; color: #6e6e73; }
.support li { padding: 10px 0; border-bottom: 1px solid #e5e5ea; }
.support li:last-child { border-bottom: 0; }
.kv { margin: 6px 0 18px; padding: 16px; background: #f2f2f7; border: 1px solid #e5e5ea; border-radius: 14px; }
.kv dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8e8e93; margin-top: 12px; }
.kv dt:first-child { margin-top: 0; }
.kv dd { margin: 3px 0 0; font-size: 17px; font-weight: 500; word-break: break-all; }

.err { color: #d70015; }
.ok { color: #248a3d; }
.bad { color: #d70015; }
.ok-big { color: #248a3d; font-size: 34px; text-align: center; }

/* ---------- full-bleed scan mode (camera below white header) ---------- */
body.scan-active {
  background: #000000;
}
body.scan-active .wrap {
  max-width: none;
  margin: 0;
  padding: 0;
}
body.scan-active #screen-scan.screen {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #000000;
  -webkit-box-shadow: none;
  box-shadow: none;
}
body.scan-active #screen-scan .stage {
  border-radius: 0;
  min-height: calc(100vh - 62px - env(safe-area-inset-top, 0px));
}
body.scan-active #screen-scan #video {
  min-height: calc(100vh - 62px - env(safe-area-inset-top, 0px));
  object-fit: cover;
}

/* status strip at the bottom of the camera */
.scan-statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  pointer-events: none;
}
.scan-status-text {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  margin: 0;
  max-width: 92%;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}
.status-pill-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  -webkit-animation: status-pill-spin 0.75s linear infinite;
  animation: status-pill-spin 0.75s linear infinite;
  vertical-align: middle;
}
.status-pill-spinner.hidden { display: none; }
@-webkit-keyframes status-pill-spin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes status-pill-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .status-pill-spinner {
    -webkit-animation: none;
    animation: none;
    border-color: rgba(255, 255, 255, 0.55);
  }
}

.kiosk-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 50;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  padding: 32px 24px;
  background: rgba(0, 0, 0, 0.88);
  text-align: center;
}
.kiosk-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border: 3px solid rgba(255,255,255,0.22);
  border-top-color: #ffffff;
  border-radius: 50%;
  -webkit-animation: kiosk-spin 0.85s linear infinite;
  animation: kiosk-spin 0.85s linear infinite;
}
@-webkit-keyframes kiosk-spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
@keyframes kiosk-spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
.kiosk-result-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 40px;
  line-height: 80px;
  font-weight: 700;
}
.kiosk-result-icon.ok { background: #248a3d; color: #fff; }
.kiosk-result-icon.warn { background: #ff9f0a; color: #fff; }
.kiosk-result-icon.err { background: #d70015; color: #fff; }
.kiosk-overlay-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
}
.kiosk-overlay-msg {
  margin: 0;
  max-width: 400px;
  font-size: 16px;
  line-height: 1.45;
  color: #aeaeb2;
}

/* ---------- speed mode popup ---------- */
.speed-overlay {
  position: fixed;
  top: calc(62px + env(safe-area-inset-top, 0px));
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 20px 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.speed-shell {
  width: 100%;
  max-width: 456px;
  margin: 0 auto;
  padding-bottom: 12px;
  -webkit-animation: profile-enter 0.28s ease-out;
  animation: profile-enter 0.28s ease-out;
}
.speed-sheet {
  position: relative;
  z-index: 2;
  color: #ffffff;
  background: #0b0b0c;
  background: radial-gradient(120% 120% at 30% 10%, #1a1a1a 0%, #0f0f10 58%, #0b0b0c 100%);
  border-radius: 28px 28px 20px 20px;
  padding: 20px;
  -webkit-box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}
.speed-sheet-toolbar {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start;
  min-height: 42px;
  margin: 0 0 12px;
}
.speed-status {
  -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  color: #d4d4d4;
  font-size: 14px;
}
.speed-timer {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  min-width: 54px;
  margin-right: 8px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(163, 230, 53, 0.14);
  border: 1px solid rgba(163, 230, 53, 0.4);
  color: #a3e635;
  text-align: center;
}
.speed-sheet-close {
  -webkit-box-flex: 0; -ms-flex: 0 0 38px; flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 24px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.speed-sheet-close:active { background: rgba(255, 255, 255, 0.2); }
.speed-sheet-skip {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 48px;
  margin: -6px 0 0;
  padding: 16px 14px 10px;
  border: 0;
  border-radius: 0 0 28px 28px;
  background: #a3e635;
  color: #111111;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.speed-countdown {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.speed-countdown-unit {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.speed-identity {
  margin: 0 0 16px;
}
.speed-name {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.speed-role {
  margin: 6px 0 0;
  font-size: 15px;
  color: #a3a3a3;
}
.speed-balance-block {
  margin: 0 0 18px;
  padding: 0 2px;
}
.speed-balance {
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  color: #ffffff;
}
.speed-balance-unit {
  margin-left: 6px;
  font-size: 18px;
  font-weight: 500;
  color: #a3a3a3;
}
.speed-hint {
  margin: 0 2px 12px;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  color: rgba(255, 255, 255, 0.58);
}
.speed-overlay .segmented {
  margin-bottom: 12px;
}
.speed-overlay .profile-segmented .segmented-btn:disabled {
  opacity: 0.55;
}
.speed-overlay .amount-field {
  margin-bottom: 12px;
}
.speed-qty-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  height: 48px;
  margin: 0 0 12px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
.speed-qty-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #111111;
  font-size: 22px;
  font-weight: 600;
  line-height: 40px;
  text-align: center;
}
.speed-qty-value {
  color: #ffffff;
  font-size: 22px;
  font-weight: 600;
}
.speed-confirm {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #a3e635;
  color: #111111;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.speed-overlay .status {
  min-height: 0;
  margin: 8px 0 0;
  text-align: center;
  font-size: 14px;
  color: #fca5a5;
}
.speed-overlay .card-stats-footer {
  margin-top: -6px;
}
.speed-overlay .card-stats-footer .card-stat {
  background: transparent;
  border-radius: 0;
}
.speed-overlay.processing .speed-sheet {
  opacity: 0.92;
}
.speed-overlay.processing #btn-speed-confirm,
.speed-overlay.processing #btn-speed-skip-sheet,
.speed-overlay.processing #btn-speed-close {
  opacity: 0.55;
  pointer-events: none;
}
@media (max-height: 720px) {
  .speed-overlay { padding-top: 10px; }
  .speed-sheet { padding: 16px; }
  .speed-sheet-toolbar { margin-bottom: 8px; }
  .speed-identity { margin-bottom: 12px; }
  .speed-stamp-track-wrap { margin-bottom: 12px; }
  .speed-overlay .stamp-strip-img { max-height: 164px; object-fit: cover; }
}

.joiners-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: end;
  -ms-flex-pack: end;
  justify-content: flex-end;
  padding: 0 12px 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.joiners-scrim {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(17, 17, 17, 0.45);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.joiners-sheet {
  position: relative;
  z-index: 1;
  max-height: 72vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-radius: 20px;
  padding: 16px 16px 18px;
  -webkit-box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
}
.joiners-sheet-toolbar {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  margin: 0 0 4px;
}
.joiners-sheet-titles {
  min-width: 0;
  padding-right: 12px;
}
.joiners-sheet-close {
  width: 40px;
  height: 40px;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #f2f2f7;
  color: #111111;
  font-size: 26px;
  line-height: 38px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.joiners-sheet-close:active { background: #e5e5ea; }
.joiners-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e8e93;
}
.joiners-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #111111;
}
.joiners-sub {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.4;
  color: #6e6e73;
}
.joiners-body-wrap {
  position: relative;
}
.joiners-refresh {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  pointer-events: none;
}
.joiners-refresh-spin {
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(17, 17, 17, 0.18);
  border-top-color: #111111;
  border-radius: 50%;
  background: #ffffff;
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  -webkit-animation: kiosk-spin 0.85s linear infinite;
  animation: kiosk-spin 0.85s linear infinite;
}
.joiners-list {
  padding: 0;
}
.joiners-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 12px;
  border: 1px solid #ebebef;
  border-radius: 16px;
  background: #f7f7f8;
  color: #111111;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.joiners-row:active {
  background: #eeeeef;
  border-color: #d8d8de;
}
/* iOS-style calendar chip = join / install date (no profile photos). */
.joiners-cal {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 42px;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin-right: 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e5ea;
  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}
.joiners-cal-dow {
  display: block;
  margin: 0;
  padding: 3px 0 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: #d70015;
}
.joiners-cal-day {
  display: block;
  margin: 0;
  padding: 1px 0 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #111111;
}
.joiners-cal-fallback {
  background: #111111;
  border-color: #111111;
  color: #a3e635;
  font-size: 16px;
  font-weight: 700;
  line-height: 42px;
  text-transform: uppercase;
  display: block;
}
.joiners-avatar {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 42px;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin-right: 12px;
  border-radius: 50%;
  background: #111111;
  color: #a3e635;
  font-size: 16px;
  font-weight: 700;
  line-height: 42px;
  text-align: center;
  text-transform: uppercase;
}
.joiners-body {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
}
.joiners-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #111111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.joiners-time {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #8e8e93;
}
.joiners-chevron {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 8px;
  color: #c7c7cc;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}
.joiners-empty {
  margin: 8px 0 12px;
  padding: 22px 16px;
  border-radius: 16px;
  background: #f7f7f8;
  border: 1px dashed #d8d8de;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  color: #8e8e93;
}
.joiners-more {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 14px 14px;
  border: 0;
  border-radius: 14px;
  background: #111111;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.joiners-more:active {
  background: #333333;
}
.joiners-more:disabled {
  opacity: 0.55;
}

@media (min-width: 640px) {
  .joiners-overlay {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 24px;
  }
  .joiners-sheet {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    border-radius: 20px;
  }
}

/* ---------- edit-name sheet + letter keyboard (no system keyboard) ---------- */
.name-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 90;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;
  background: rgba(0, 0, 0, 0.45);
}
.name-sheet {
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  background: #f2f2f7;
  -webkit-box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
}
.name-sheet-toolbar {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  margin: 0 0 8px;
}
.name-sheet-title {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  margin: 0 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #111111;
}
.name-sheet-cancel,
.name-sheet-save {
  width: auto;
  min-width: 72px;
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 12px;
}
.name-sheet-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.35;
  color: #8e8e93;
  text-align: center;
}
.name-edit-value {
  min-height: 52px;
  margin: 0 0 6px;
  padding: 12px 14px;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.name-edit-value.is-empty {
  color: #c7c7cc;
  font-weight: 500;
}
.name-edit-value.is-selected {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #111111;
}
.name-overlay .status {
  margin: 0 0 8px;
  min-height: 18px;
  font-size: 13px;
}
.letter-keyboard {
  margin: 0;
}
.letter-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  margin: 0 0 6px;
}
.letter-key {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 0px;
  flex: 1 1 0;
  min-width: 0;
  height: 46px;
  margin: 0 2px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 46px;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.letter-key:active {
  background: #d1d1d6;
}
.letter-key-wide {
  -webkit-box-flex: 1.35;
  -ms-flex: 1.35 1 0px;
  flex: 1.35 1 0;
  background: #e5e5ea;
  font-size: 15px;
}
.letter-key-space {
  -webkit-box-flex: 4;
  -ms-flex: 4 1 0px;
  flex: 4 1 0;
  font-size: 15px;
  font-weight: 600;
  text-transform: lowercase;
  background: #ffffff;
}
.letter-key.is-active {
  background: #111111;
  color: #ffffff;
}
.name-overlay.saving .letter-key,
.name-overlay.saving .name-sheet-cancel,
.name-overlay.saving .name-sheet-save {
  pointer-events: none;
  opacity: 0.6;
}


/* ================= hub: dashboard, activity, alerts, profile ================= */
body.hub-mode { background: #f7f7f8; }
body.hub-mode #app { background: #f7f7f8; }

.screen-hub {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 16px calc(104px + env(safe-area-inset-bottom, 0px));
  text-align: left;
}
.hub-head {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  margin: 4px 0 12px;
}
.hub-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e8e93;
}
.hub-title { margin: 2px 0 0; font-size: 26px; line-height: 1.15; font-weight: 700; color: #111111; }
.hub-sub { margin: 0 0 12px; font-size: 13px; color: #6e6e73; }
.hub-refresh {
  width: 40px; height: 40px;
  border-radius: 20px;
  border: 1px solid #e5e5ea;
  background: #ffffff;
  color: #111111;
  font-size: 20px;
  line-height: 1;
  -webkit-appearance: none;
}
.hub-status { margin: 0 0 12px; font-size: 13px; color: #6e6e73; }
.hub-status-ok { color: #248a3d; }
.hub-status-err { color: #d70015; }
.hub-note { font-size: 12px; color: #8e8e93; }
.hub-foot { margin: 14px 2px 0; font-size: 12px; color: #8e8e93; }
.hub-empty { margin: 8px 2px; font-size: 13px; color: #8e8e93; }

.hub-ranges {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 14px;
  padding-bottom: 2px;
}
.hub-range {
  -ms-flex-negative: 0; flex-shrink: 0;
  margin-right: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e5e5ea;
  background: #ffffff;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 600;
  -webkit-appearance: none;
}
.hub-range.active { background: #111111; border-color: #111111; color: #ffffff; }

.stat-grid {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  margin: 0 -5px 4px;
}
.stat-card {
  -ms-flex: 0 0 50%;
  -webkit-box-flex: 0;
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 5px 10px;
}
.stat-card > span { display: block; }
.stat-value {
  background: #ffffff;
  border: 1px solid #ececf0;
  border-radius: 18px 18px 0 0;
  padding: 16px 14px 4px;
  font-size: 24px;
  font-weight: 700;
  color: #111111;
  border-bottom: 0;
}
.stat-label {
  background: #ffffff;
  border: 1px solid #ececf0;
  border-top: 0;
  padding: 0 14px 4px;
  font-size: 12px;
  color: #6e6e73;
}
.stat-card .stat-label:last-child { border-radius: 0 0 18px 18px; padding-bottom: 14px; }
.stat-sub {
  background: #ffffff;
  border: 1px solid #ececf0;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  padding: 0 14px 12px;
  font-size: 11px;
  color: #a3a3a3;
}
.stat-green .stat-value { color: #248a3d; }
.stat-gold .stat-value { color: #ff9f0a; }

.hub-panel {
  background: #ffffff;
  border: 1px solid #ececf0;
  border-radius: 20px;
  padding: 14px 14px 10px;
  margin: 12px 0;
}
.hub-panel-head {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  margin-bottom: 8px;
}
.hub-panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: #111111; }

.chart {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end;
  height: 150px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.chart-col {
  -ms-flex: 1 0 18px;
  -webkit-box-flex: 1;
  flex: 1 0 18px;
  min-width: 14px;
  text-align: center;
}
.chart-bar-wrap {
  height: 118px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end;
  padding: 0 3px;
}
.chart-bar {
  width: 100%;
  border-radius: 6px 6px 3px 3px;
  background: #a3e635;
  min-height: 3px;
}
.chart-tick { display: block; font-size: 10px; color: #a3a3a3; padding-top: 6px; height: 18px; overflow: hidden; }

.hub-list { display: block; }
.hub-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid #f2f2f7;
  background: transparent;
  text-align: left;
  -webkit-appearance: none;
}
.hub-row-tap { cursor: pointer; }
.hub-row-tap:active { background: #f7f7f8; }
.hub-avatar {
  -ms-flex-negative: 0; flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 19px;
  margin-right: 12px;
  background: #f2f2f7;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
}
.hub-avatar-green { background: #e8f7ec; color: #248a3d; }
.hub-avatar-red { background: #fdeaea; color: #d70015; }
.hub-avatar-gold { background: #fff3e0; color: #ff9f0a; }
.hub-avatar-scan { background: #eef7d9; color: #4d6b12; }
.hub-row-main { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
.hub-row-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #111111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-row-sub {
  display: block;
  font-size: 12px;
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-row-right { text-align: right; margin-left: 10px; }
.hub-row-value { display: block; font-size: 14px; font-weight: 700; color: #111111; }
.hub-row-time { display: block; font-size: 11px; color: #a3a3a3; }

.push-label {
  display: block;
  margin: 8px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6e6e73;
}
.push-select,
.push-textarea {
  width: 100%;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #111111;
  background: #ffffff;
  -webkit-appearance: none;
}
.push-textarea { resize: none; }
.push-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  margin-top: 10px;
}

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border-top: 1px solid #e5e5ea;
}
.tab {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  border: 0;
  background: transparent;
  padding: 6px 2px 4px;
  color: #8e8e93;
  font-size: 10px;
  font-weight: 600;
  -webkit-appearance: none;
}
.tab span { display: block; margin-top: 2px; }
.tab.active { color: #111111; }
.tab-scan { position: relative; }
.tab-scan-fab {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  width: 56px; height: 56px;
  margin: -22px auto 0;
  border-radius: 28px;
  background: #111111;
  color: #a3e635;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}
.tab-scan.active .tab-scan-fab { background: #a3e635; color: #111111; }
.tab-scan-label { margin-top: 4px; }

/* keep the scan status text clear of the tab bar */
body.scan-active .scan-statusbar { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }

/* camera flip button */
.cam-flip {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 12;
  width: 44px; height: 44px;
  border-radius: 22px;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  -webkit-appearance: none;
}

.handheld-badge {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 32px;
  background: #f2f2f7;
  color: #111111;
  line-height: 78px;
}

/* leave room for the tab bar on the settings list */
.screen-settings { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

/* ---------- reference-style customer overview (Safari 12 compatible) ---------- */
.scanner-dashboard-support {
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-sizing: border-box; box-sizing: border-box;
  grid-column: 2;
  grid-row: 1;
  width: 254px;
  max-width: 254px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e8f5e9;
  border-radius: 14px;
  background: #f4fbf5;
  color: #111111;
  text-decoration: none;
  cursor: default;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-tap-highlight-color: transparent;
}
.scanner-dashboard-support-icon {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
}
.scanner-dashboard-support-icon svg { display: block; }
.scanner-dashboard-support-copy {
  display: block;
  min-width: 0;
  text-align: left;
}
.scanner-dashboard-support-title,
.scanner-dashboard-support-line,
.scanner-dashboard-support-phone {
  display: block;
}
.scanner-dashboard-support-title {
  color: #555555;
  font: 500 11px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.scanner-dashboard-support-line {
  margin-top: 2px;
  color: #111111;
  font: 600 13px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.scanner-dashboard-support-phone {
  margin-top: 3px;
  color: #128c7e;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.1px;
}
.scanner-dashboard-main {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row;
  -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 254px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  -webkit-box-align: stretch;
  align-items: stretch;
  grid-column-gap: 18px;
  grid-row-gap: 14px;
  -webkit-column-gap: 18px;
  column-gap: 18px;
  row-gap: 14px;
}
.scanner-dashboard-main > .scan-stats {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: auto;
  max-width: none;
  margin: 0;
  height: 100%;
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.scanner-dashboard-actions {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-flex: 0; -ms-flex: 0 0 254px; flex: 0 0 254px;
  grid-column: 2;
  grid-row: 2;
  width: 254px;
  max-width: 254px;
  margin: 0;
  min-height: 100%;
  height: 100%;
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
.scanner-dashboard-main > .scanner-stats-detail-panel {
  grid-column: 1;
  grid-row: 3;
  margin-top: 0;
  padding: 16px 20px 18px;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 14px -12px rgba(0,0,0,0.2);
}
.scanner-dashboard-actions > * + * { margin-top: 14px; }
.scanner-dashboard-button {
  position: relative;
  -webkit-box-flex: 1; -ms-flex: 1 1 0px; flex: 1 1 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  min-width: 0;
  min-height: 110px;
  height: auto;
  padding: 18px 16px;
  border: 1px solid #ececf0;
  border-radius: 20px;
  background: #ffffff;
  color: #222222;
  font: 600 16px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.2px;
  cursor: pointer;
  -webkit-box-shadow: 0 4px 10px -8px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.04);
  box-shadow: 0 4px 10px -8px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.04);
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.scanner-dashboard-icon {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  width: 54px;
  height: 54px;
  margin: 0 0 12px;
  border-radius: 16px;
  background: #f3f4f8;
  color: #3a3a3c;
}
.scanner-dashboard-icon svg { display: block; margin: 0; }
.scanner-dashboard-label { display: block; }
.scanner-dashboard-note {
  display: block;
  margin-top: 6px;
  color: rgba(17, 17, 17, 0.55);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}
.scanner-dashboard-badge {
  top: 10px;
  right: 10px;
  z-index: 1;
}
.scanner-dashboard-button:active { background: #f2f4f8; }
.scanner-dashboard-button:focus { outline: 2px solid #5989ef; outline-offset: 3px; }
.scanner-dashboard-button:disabled { color: #909096; cursor: default; opacity: 0.7; }

/* Metal Redeem — dark body + lime strip; armed expands the strip. */
.anti-metal-btn {
  position: relative;
  -webkit-box-flex: 1.25; -ms-flex: 1.25 1 0px; flex: 1.25 1 0;
  display: block;
  overflow: hidden;
  width: 100%;
  min-height: 128px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #141414;
  background: -webkit-linear-gradient(top, #2a2a2a 0%, #121212 48%, #0a0a0a 100%);
  background: linear-gradient(180deg, #2a2a2a 0%, #121212 48%, #0a0a0a 100%);
  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -1px 0 rgba(0,0,0,0.35), 0 8px 18px -10px rgba(0,0,0,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -1px 0 rgba(0,0,0,0.35), 0 8px 18px -10px rgba(0,0,0,0.45);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-transition: -webkit-transform 0.12s ease;
  transition: transform 0.12s ease;
}
.anti-metal-btn:active {
  -webkit-transform: scale(0.98);
  transform: scale(0.98);
}
.anti-metal-btn:focus { outline: 2px solid #5989ef; outline-offset: 3px; }
.anti-metal-copy {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  bottom: 0;
  left: 64px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start;
  padding: 12px 16px 12px 8px;
  text-align: left;
  pointer-events: none;
  -webkit-transition: left 0.22s ease, color 0.22s ease;
  transition: left 0.22s ease, color 0.22s ease;
}
.anti-metal-title {
  display: block;
  color: #ffffff;
  font: 700 20px/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.4px;
}
.anti-metal-note {
  display: block;
  margin-top: 6px;
  max-width: 120px;
  color: rgba(255,255,255,0.68);
  font: 500 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.anti-metal-accent {
  position: absolute;
  z-index: 1;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 48px;
  overflow: hidden;
  border-radius: 14px;
  background: #d6f54a;
  background: -webkit-linear-gradient(top, #e4ff6a 0%, #d6f54a 42%, #bfe31f 100%);
  background: linear-gradient(180deg, #e4ff6a 0%, #d6f54a 42%, #bfe31f 100%);
  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -2px 5px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -2px 5px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.12);
  -webkit-transition: width 0.24s ease;
  transition: width 0.24s ease;
}
.anti-metal-chevrons {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  height: 100%;
  padding: 0 12px;
  white-space: nowrap;
}
.anti-metal-chevron {
  display: block;
  -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
  margin-right: 10px;
  overflow: visible;
}
.anti-metal-chevron:last-child { margin-right: 0; }
.bd-dot {
  opacity: 0.85;
}
.anti-metal-btn.is-armed .anti-metal-accent {
  width: calc(100% - 16px);
}
.anti-metal-btn.is-armed .anti-metal-copy {
  left: 8px;
  padding-left: 18px;
}
.anti-metal-btn.is-armed .anti-metal-title { color: #0f0f0f; }
.anti-metal-btn.is-armed .anti-metal-note { color: rgba(15,15,15,0.7); }
@media (prefers-reduced-motion: reduce) {
  .anti-metal-accent,
  .anti-metal-copy {
    -webkit-transition: none;
    transition: none;
  }
  .anti-metal-btn:active {
    -webkit-transform: none;
    transform: none;
  }
}

.scan-stats {
  position: relative;
  -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 30px 24px 24px;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  background: #ffffff;
  background: linear-gradient(to bottom, #fafafa 0%, #ffffff 68%);
  box-shadow: 0 12px 18px -12px rgba(0,0,0,0.24), 0 2px 5px rgba(0,0,0,0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-animation: scan-stats-enter .45s ease-out both;
  animation: scan-stats-enter .45s ease-out both;
}
@-webkit-keyframes scan-stats-enter {
  from { opacity: 0; -webkit-transform: translateY(10px); }
  to { opacity: 1; -webkit-transform: translateY(0); }
}
@keyframes scan-stats-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.scan-stats-rings {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 76%;
  overflow: hidden;
  pointer-events: none;
}
.scan-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  overflow: visible;
  pointer-events: none;
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
}
.scan-ring-outer {
  -webkit-animation: scan-ring-turn 72s linear infinite paused;
  animation: scan-ring-turn 72s linear infinite paused;
}
.scan-ring-inner {
  -webkit-animation: scan-ring-turn 96s linear infinite reverse paused;
  animation: scan-ring-turn 96s linear infinite reverse paused;
}
body.handheld-scan .scan-ring {
  -webkit-animation-play-state: running;
  animation-play-state: running;
}
body.handheld-scan .scan-ring circle {
  -webkit-animation: scan-dot-reveal .5s ease-out both;
  animation: scan-dot-reveal .5s ease-out both;
}
@-webkit-keyframes scan-ring-turn {
  from { -webkit-transform: rotate(0deg); }
  to { -webkit-transform: rotate(360deg); }
}
@keyframes scan-ring-turn {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@-webkit-keyframes scan-dot-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes scan-dot-reveal { from { opacity: 0; } to { opacity: 1; } }
.scan-stats-center {
  position: absolute;
  z-index: 2;
  top: 45%;
  left: 0;
  right: 0;
  text-align: center;
}
.scan-stats-kicker {
  margin: 0;
  color: #0a0a0a;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
}
.scan-stats-total {
  margin: 10px 0 0;
  color: #080808;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.scan-stats-fade {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.84) 52%, #ffffff 100%);
  pointer-events: none;
}
.scan-stats-metrics {
  position: relative;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  margin-top: 5px;
  text-align: left;
}
.scan-stats-metric { min-width: 0; }
.scan-stats-metric + .scan-stats-metric { margin-left: 20px; }
.scan-stats-metric-head {
  margin: 0 0 12px;
  color: #777777;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}
.scan-stats-dot {
  display: inline-block;
  width: 2px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
  background: #5b89ef;
  vertical-align: -3px;
}
.scan-stats-dot.is-green { background: #4c8266; }
.scan-stats-metric-value {
  margin: 0;
  color: #080808;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.scan-stats-details {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #d5d5d8;
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  font: 700 17px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: rgba(89, 137, 239, 0.22);
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}
.scan-stats-details:active {
  background: #eef2fb;
  border-color: #b8c7e8;
}
.scan-stats-details:focus { outline: 2px solid #5989ef; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .scan-stats, .scan-ring-outer, .scan-ring-inner, body.handheld-scan .scan-ring circle {
    -webkit-animation: none;
    animation: none;
  }
}
body.scan-active.handheld-scan { background: #ffffff; }
body.scan-active.handheld-scan #screen-scan.screen { background: #ffffff; }
.handheld-stage {
  background: #ffffff;
  min-height: calc(100vh - 92px - env(safe-area-inset-top, 0px));
  padding: 28px 20px 110px;
}
.handheld-title { color: #111111; font-size: 16px; font-weight: 600; }
.handheld-copy { color: #777777; max-width: 380px; font-size: 13px; }
body.scan-active.handheld-scan .scan-status-text {
  background: #f2f2f7;
  color: #3a3a3c;
}
body.scan-active.handheld-scan .scan-status-text .status-pill-spinner {
  border-color: rgba(58, 58, 60, 0.22);
  border-top-color: #3a3a3c;
}
@media (prefers-reduced-motion: reduce) {
  body.scan-active.handheld-scan .scan-status-text .status-pill-spinner {
    border-color: rgba(58, 58, 60, 0.45);
  }
}
@media (max-width: 420px) {
  .handheld-stage { padding: 20px 16px 100px; }
  .scanner-dashboard-main {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
    -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch;
    max-width: 448px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-row-gap: 12px;
    row-gap: 12px;
  }
  .scanner-dashboard-main > .scan-stats,
  .scanner-dashboard-support,
  .scanner-dashboard-actions,
  .scanner-dashboard-main > .scanner-stats-detail-panel {
    grid-column: 1;
    width: 100%;
    max-width: none;
  }
  .scanner-dashboard-main > .scan-stats {
    grid-row: 1;
    height: auto;
  }
  .scanner-dashboard-support {
    grid-row: 2;
    width: 100%;
    max-width: none;
  }
  .scanner-dashboard-actions {
    -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row;
    -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
    grid-row: 3;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
  }
  .scanner-dashboard-main > .scanner-stats-detail-panel {
    grid-row: 4;
    margin-top: 0;
  }
  .scanner-dashboard-actions > * + * { margin-top: 0; margin-left: 10px; }
  .scanner-dashboard-button {
    -webkit-box-flex: 1; -ms-flex: 1 1 0px; flex: 1 1 0;
    height: auto;
    min-height: 100px;
    padding: 14px 10px;
    font-size: 13px;
  }
  .anti-metal-btn {
    -webkit-box-flex: 1.15; -ms-flex: 1.15 1 0px; flex: 1.15 1 0;
    height: auto;
    min-height: 100px;
  }
  .anti-metal-title { font-size: 17px; }
  .anti-metal-note { font-size: 11px; max-width: none; }
  .scan-stats { padding: 24px 20px 20px; }
  .scan-stats-kicker { font-size: 16px; }
  .scan-stats-total { font-size: 40px; margin-top: 8px; }
  .scan-stats-metric-head { font-size: 13px; }
}

.stat-period { display: block; margin: 4px 0 0 10px; font-size: 11px; font-weight: 400; color: #888888; }
.scanner-stats-note { margin: 14px 0 0; font-size: 11px; line-height: 1.5; color: #777777; text-align: left; }
.scanner-stats-detail-panel { text-align: left; font-size: 12px; color: #666666; }
.scanner-stats-detail-title { margin: 0 0 10px; font-weight: 600; color: #222222; }
.scanner-stats-detail-panel dl { margin: 0; }
.scanner-stats-detail-panel dl > div { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eeeeee; }
.scanner-stats-detail-panel dd { margin-left: 12px; color: #111111; font-weight: 600; }

/* Optional automatic-mode reward choice: large targets, no continuous animation. */
.auto-redeem-choice { width: 100%; max-width: 480px; margin-top: 24px; }
.auto-redeem-prompt { color: #ffffff; font-size: 18px; line-height: 1.4; margin: 0 0 20px; }
.auto-redeem-buttons { display: flex; flex-wrap: wrap; justify-content: center; }
.auto-redeem-buttons .btn { flex: 1; min-width: 140px; min-height: 64px; margin: 6px; font-size: 20px; }

.auto-redeem-buttons .btn-primary { background: #a3e635; border-color: #a3e635; color: #111111; }
