/* ==============================================================================
   Gadget Repairs - Clean & Simple Customer Loyalty Stamp Card System
   ============================================================================== */

:root {
  --loyalty-navy: #283566;
  --loyalty-navy-deep: #1c2548;
  --loyalty-red: #E63946;
  --loyalty-red-dark: #c92a38;
  --loyalty-sky: #A8B8D0;
  --loyalty-gold: #F59E0B;
  --loyalty-gold-light: #FEF3C7;
  --loyalty-emerald: #10B981;
  --loyalty-emerald-light: #ECFDF5;
  --loyalty-bg: #f4f6fa;
  --loyalty-card-bg: #FFFFFF;
  --loyalty-line: #e2e7f0;
  --loyalty-ink: #1a1f36;
  --loyalty-muted: #5a6278;
  --loyalty-radius-sm: 8px;
  --loyalty-radius-md: 14px;
  --loyalty-radius-lg: 20px;
  --loyalty-radius-full: 9999px;
  --loyalty-shadow-card: 0 4px 25px rgba(40, 53, 102, 0.08);
}

/* Base Body for Customer Pass */
.loyalty-simple-body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--loyalty-ink);
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.simple-page-wrapper {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem 1rem 3rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
}

.simple-pass-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* Header & Store Branding */
.simple-store-header {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.simple-brand-logo {
  max-width: 185px;
  height: auto;
  display: inline-block;
}
.simple-store-sub {
  font-size: 0.84rem;
  color: var(--loyalty-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.simple-store-sub a {
  color: var(--loyalty-navy);
  font-weight: 700;
  text-decoration: none;
}

/* ==============================================================================
   Customer Pass View Toggle: Stamp Tracker vs VIP Card
   ============================================================================== */
.pass-view-toggle {
  display: flex;
  background: var(--loyalty-bg);
  border: 1.5px solid var(--loyalty-line);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 0.85rem;
}
.pass-view-btn {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--loyalty-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  user-select: none;
}
.pass-view-btn:hover {
  color: var(--loyalty-navy);
}
.pass-view-btn.active {
  background: var(--loyalty-navy);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(40, 53, 102, 0.25);
  font-weight: 800;
}

/* ==============================================================================
   The Hero Digital Wallet Loyalty Card (Gadget Repairs Brand Navy Style)
   ============================================================================== */
.digital-wallet-card-wrapper {
  position: relative;
  width: 100%;
}

.digital-wallet-card {
  position: relative;
  background: linear-gradient(135deg, var(--loyalty-navy-deep) 0%, var(--loyalty-navy) 60%, #151c38 100%);
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(40, 53, 102, 0.22);
  padding: 1.35rem 1.25rem;
  color: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.digital-wallet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(40, 53, 102, 0.3);
}

/* Two-Column Card Layout */
.wallet-card-layout {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.85rem;
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Left Column: Brand (Top) & Cardholder Info (Bottom) */
.wallet-card-left-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 1.15rem;
}

.wallet-card-brand {
  display: flex;
  flex-direction: column;
}

.wallet-card-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}

.wallet-card-title .brand-gadget {
  color: #ffffff;
}

.wallet-card-title .brand-repairs {
  color: var(--loyalty-red, #E63946);
}

.wallet-card-subtitle {
  font-size: 0.8rem;
  color: var(--loyalty-sky);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 4px;
}

.wallet-card-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.wallet-card-customer-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--loyalty-sky);
  letter-spacing: 0.05em;
}

.wallet-card-customer-name {
  font-family: "Montserrat", sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--loyalty-red, #E63946);
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-card-pass-id {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #ffffff;
  font-family: monospace;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  width: fit-content;
}

/* Right Column: VIP Badge on Top, Bigger Scanner Plate Directly Below */
.wallet-card-right-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  width: 156px;
}

.wallet-card-chip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: var(--loyalty-red, #E63946);
  border: 1.5px solid #c92a38;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.36rem 0.55rem;
  border-radius: var(--loyalty-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(230, 57, 70, 0.45);
  width: 100%;
  box-sizing: border-box;
}

/* Integrated QR Code Plate (Enlarged & Symmetrically Aligned) */
.wallet-card-qr-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 8px 8px 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.wallet-card-qr-img {
  width: 138px;
  height: 138px;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.wallet-card-qr-caption {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--loyalty-navy);
  margin-top: 5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Card Bottom Banner / Live Pill */
.wallet-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  z-index: 2;
  font-size: 0.82rem;
}

.wallet-card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--loyalty-emerald);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.7rem;
  border-radius: var(--loyalty-radius-full);
}

.wallet-card-status-pill.ready-pill {
  background: var(--loyalty-red);
  color: #ffffff;
}

.wallet-card-store-pin {
  font-size: 0.75rem;
  color: var(--loyalty-sky);
  font-weight: 600;
}

/* ==============================================================================
   Website CTA Style "Download Card" Action Button
   ============================================================================== */
.btn-wallet-download {
  background: var(--loyalty-red);
  color: #ffffff !important;
  font-family: "Montserrat", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  padding: 0.95rem 1.3rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(230, 57, 70, 0.28);
  border: 2px solid var(--loyalty-red);
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s, box-shadow 0.25s;
  user-select: none;
  touch-action: manipulation;
}

.btn-wallet-download:hover {
  background: var(--loyalty-red-dark);
  border-color: var(--loyalty-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(230, 57, 70, 0.38);
}

.btn-wallet-download:active {
  transform: translateY(0);
}

/* ==============================================================================
   Stamps Summary: How Much is Collected vs Pending
   ============================================================================== */
.stamps-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.stamp-metric-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1.5px solid var(--loyalty-line);
  box-shadow: 0 4px 15px rgba(40, 53, 102, 0.04);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.stamp-metric-card:hover {
  transform: translateY(-1px);
}

/* Collected Card (Green) */
.stamp-metric-card.card-collected {
  background: #f0fdf4;
  border-color: #86efac;
}
.stamp-metric-card.card-collected .metric-val {
  color: #047857;
}

/* Pending Card (Amber) */
.stamp-metric-card.card-pending {
  background: #fffbeb;
  border-color: #fde68a;
}
.stamp-metric-card.card-pending .metric-val {
  color: #b45309;
}

.metric-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--loyalty-muted);
}

.metric-badge-icon {
  font-size: 1.15rem;
}

.metric-val {
  font-family: "Montserrat", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.05;
  margin: 0.15rem 0 0;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--loyalty-muted);
  font-weight: 600;
}

/* ==============================================================================
   Main Stamp Book Shell & Target Reward Box
   ============================================================================== */
.simple-stamp-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 25px rgba(40, 53, 102, 0.06);
  border: 1.5px solid var(--loyalty-line);
  overflow: hidden;
  padding: 1.25rem;
}

/* Reward Highlight Box */
.simple-reward-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.simple-reward-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.simple-reward-target {
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Montserrat", sans-serif;
}

.simple-reward-percent {
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.simple-progress-bar-bg {
  height: 10px;
  background: var(--loyalty-line);
  border-radius: var(--loyalty-radius-full);
  overflow: hidden;
  margin: 0.45rem 0;
}

.simple-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #10B981 100%);
  border-radius: var(--loyalty-radius-full);
  transition: width 0.6s ease;
}

.simple-reward-sub {
  font-size: 0.82rem;
  color: #78350f;
  font-weight: 600;
}

/* ==============================================================================
   Stamp Progression Punches Grid
   ============================================================================== */
.simple-stamp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.simple-slot {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
  user-select: none;
  padding: 4px;
  transition: all 0.2s ease;
}

/* Earned Slot: White Badge with Navy Border & Logo */
.simple-slot.earned {
  background: #ffffff;
  border: 2px solid var(--loyalty-navy);
  color: var(--loyalty-navy);
  box-shadow: 0 4px 12px rgba(40, 53, 102, 0.12);
}

.simple-slot.earned:hover {
  transform: scale(1.03);
}

.simple-brand-mark-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.simple-slot-tag {
  font-family: "Montserrat", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--loyalty-navy);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* Unearned Slot */
.simple-slot.unearned {
  background: var(--loyalty-bg);
  border: 2px dashed #cbd5e1;
  color: var(--loyalty-muted);
}

.simple-slot-num {
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--loyalty-muted);
}

/* Final Milestone Reward Slot */
.simple-slot.final-slot.unearned {
  background: #fffbeb;
  border: 2px dashed #f59e0b;
  color: #b45309;
}

.simple-gift-icon {
  font-size: 1.6rem;
}

.simple-gift-tag {
  font-family: "Montserrat", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #b45309;
}

.simple-slot.final-slot.earned {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2px solid #f59e0b;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.simple-slot.final-slot.earned .simple-gift-tag {
  color: #ffffff;
}

/* Quick Utility Actions */
.simple-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.btn-simple-util {
  background: var(--loyalty-bg);
  border: 1.5px solid var(--loyalty-line);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--loyalty-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: "Outfit", sans-serif;
}

.btn-simple-util:hover {
  background: #e9ecf5;
  border-color: var(--loyalty-navy);
  color: var(--loyalty-navy);
}

/* ==============================================================================
   Customer Stamp & Reward Activity History Section
   ============================================================================== */
.user-stamp-history-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1.5px solid var(--loyalty-line);
  box-shadow: 0 6px 22px rgba(40, 53, 102, 0.05);
  padding: 1.25rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-sizing: border-box;
  width: 100%;
}

.user-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid #f1f5f9;
}

.user-history-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-history-icon {
  font-size: 1.2rem;
}

.user-history-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--loyalty-navy);
  margin: 0;
  letter-spacing: -0.01em;
}

.user-history-count-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.user-history-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.user-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.user-history-item:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  transform: translateY(-1px);
}

.user-history-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 1;
}

.user-history-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.user-history-icon-circle.icon-stamp {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.user-history-icon-circle.icon-reward {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.user-history-icon-circle.icon-reset {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
}

.user-history-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-history-action .action-name {
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
  display: block;
}

.user-history-action .action-name.text-stamp {
  color: #065f46;
}

.user-history-action .action-name.text-reward {
  color: #b45309;
}

.user-history-action .action-name.text-redeemed {
  color: #6b21a8;
}

.user-history-action .action-name.text-reset {
  color: #0369a1;
}

.user-history-action .action-name.text-expired {
  color: #b91c1c;
}

.user-history-notes {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.3;
  margin-top: 1px;
}

.user-history-time {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.user-history-time .history-date {
  font-weight: 700;
  font-size: 0.78rem;
  color: #1e293b;
  white-space: nowrap;
}

.user-history-time .history-clock {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1px 5px;
}

.user-history-empty {
  text-align: center;
  padding: 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Simple Store Location Footer */
.simple-store-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--loyalty-muted);
  line-height: 1.5;
  padding: 0.65rem 0;
}

.simple-store-footer a {
  color: var(--loyalty-red);
  font-weight: 700;
  text-decoration: none;
}

/* Toast Notifications */
.loyalty-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: #1e293b;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  pointer-events: none;
}
.loyalty-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==============================================================================
   Ultra-Modern Modal Popups & Form Controls
   ============================================================================== */
.loyalty-modal-backdrop,
.dash-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.loyalty-modal-backdrop.open,
.loyalty-modal-backdrop.active,
.dash-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.loyalty-modal-box,
.dash-modal-panel {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.6rem 2rem;
  max-width: 660px;
  width: 100%;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.9);
  color: var(--loyalty-ink, #0f172a);
  position: relative;
  box-sizing: border-box;
  max-height: 92vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.loyalty-modal-box {
  max-width: 500px;
  padding: 1.6rem 1.8rem;
}

.loyalty-modal-backdrop.open .loyalty-modal-box,
.loyalty-modal-backdrop.active .loyalty-modal-box,
.dash-modal-backdrop.open .dash-modal-panel {
  transform: scale(1) translateY(0);
}

.loyalty-modal-close,
.dash-modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
  z-index: 10;
}

.loyalty-modal-close:hover,
.dash-modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
  transform: rotate(90deg);
}

/* Modal Form Groups & Inputs */
.dash-modal-panel .form-group,
.loyalty-modal-box .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-modal-panel label,
.loyalty-modal-box label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--loyalty-navy, #283566);
  letter-spacing: 0.01em;
}

.dash-modal-panel .field-hint,
.loyalty-modal-box .field-hint {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.dash-modal-panel input[type="text"],
.dash-modal-panel input[type="email"],
.dash-modal-panel input[type="tel"],
.dash-modal-panel input[type="date"],
.dash-modal-panel input[type="number"]:not(.stepper-input),
.dash-modal-panel select,
.dash-input,
.dash-select {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.75rem 1rem !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 12px !important;
  font-size: 0.94rem !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: #1e293b !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) inset !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.dash-modal-panel input:focus,
.dash-modal-panel select:focus,
.dash-input:focus,
.dash-select:focus {
  border-color: #283566 !important;
  box-shadow: 0 0 0 4px rgba(40, 53, 102, 0.12) !important;
  outline: none !important;
  background-color: #fafcff !important;
}

.dash-modal-panel select,
.dash-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 1.1rem !important;
  padding-right: 2.5rem !important;
  cursor: pointer !important;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
}

.color-swatch-btn {
  width: 48px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  padding: 2px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch-btn:hover {
  transform: scale(1.05);
  border-color: #283566;
}

.stepper-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) inset;
  width: 100%;
  box-sizing: border-box;
}

.stepper-btn {
  background: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--loyalty-navy, #283566);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.stepper-btn:hover {
  background: #283566;
  color: #ffffff;
}

.stepper-input {
  flex: 1;
  text-align: center;
  border: none !important;
  background: transparent !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  color: var(--loyalty-navy, #283566) !important;
  box-shadow: none !important;
  padding: 0.5rem 0 !important;
}

.modal-checkbox-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.modal-checkbox-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.modal-checkbox-card input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  accent-color: #283566;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  margin: 0;
}

.modal-checkbox-card label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  margin: 0;
}

.btn-modal-primary {
  width: 100%;
  background: linear-gradient(135deg, #283566 0%, #1c2548 100%);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(40, 53, 102, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-modal-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(40, 53, 102, 0.38);
  background: linear-gradient(135deg, #1c2548 0%, #121830 100%);
}

.btn-modal-primary:active {
  transform: translateY(0);
}

.btn-modal-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.loyalty-modal-box::-webkit-scrollbar,
.dash-modal-panel::-webkit-scrollbar {
  width: 6px;
}

.loyalty-modal-box::-webkit-scrollbar-track,
.dash-modal-panel::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.loyalty-modal-box::-webkit-scrollbar-thumb,
.dash-modal-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.loyalty-modal-box::-webkit-scrollbar-thumb:hover,
.dash-modal-panel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==============================================================================
   Staff Dashboard Loyalty Panel & QR Scanner
   ============================================================================== */

.dash-loyalty-header-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.dash-loyalty-tabs {
  display: flex;
  gap: 0.4rem;
  background: #e2e8f0;
  padding: 0.35rem;
  border-radius: var(--loyalty-radius-md);
  max-width: 100%;
}
.dash-loyalty-tab {
  padding: 0.55rem 1rem;
  border-radius: var(--loyalty-radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--loyalty-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dash-loyalty-tab.active {
  background: #fff;
  color: var(--loyalty-navy);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}
.dash-loyalty-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.dash-loyalty-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 42px;
}
.dash-loyalty-action-btn:active {
  transform: scale(0.97);
}

/* Quick Stats Bar */
.loyalty-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.loyalty-stat-card {
  background: #fff;
  padding: 1rem 1.15rem;
  border-radius: var(--loyalty-radius-md);
  border: 1px solid var(--loyalty-line);
  box-shadow: var(--loyalty-shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.loyalty-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--loyalty-navy);
}
.loyalty-stat-card.stat-gold::before { background: #F59E0B; }
.loyalty-stat-card.stat-emerald::before { background: #10B981; }
.loyalty-stat-card.stat-red::before { background: var(--loyalty-red); }

.loyalty-stat-value {
  font-family: "Montserrat", sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--loyalty-navy);
  line-height: 1.1;
}
.loyalty-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--loyalty-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Scanner Workspace */
.scanner-workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .scanner-workspace-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

/* Scanner Camera Shell */
.scanner-card {
  background: #fff;
  border-radius: var(--loyalty-radius-md);
  border: 1px solid var(--loyalty-line);
  padding: 1.25rem;
  box-shadow: var(--loyalty-shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.scanner-viewport {
  position: relative;
  background: #0f172a;
  border-radius: 14px;
  min-height: 260px;
  max-height: 340px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #334155;
  width: 100%;
}
.scanner-laser {
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #E63946, #ff8a93, #E63946, transparent);
  box-shadow: 0 0 10px #E63946;
  animation: scanLaser 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}
@keyframes scanLaser {
  0% { top: 10%; opacity: 0.2; }
  50% { top: 90%; opacity: 1; }
  100% { top: 10%; opacity: 0.2; }
}

/* ==============================================================================
   Staff Action Stamping Box & Scanned Customer Hero Card
   ============================================================================== */

/* Universal Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: var(--loyalty-radius-full);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.status-pill.in_progress,
.status-pill.active {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.status-pill.ready {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  font-weight: 800;
}
.status-pill.redeemed,
.status-pill.completed {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.status-pill.expired,
.status-pill.inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* Customer Tier Badge & Pass ID Chip */
.customer-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(40, 53, 102, 0.08);
  color: var(--loyalty-navy);
  border: 1px solid rgba(40, 53, 102, 0.18);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--loyalty-radius-full);
  letter-spacing: 0.02em;
}
.customer-pass-id-chip {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e7f0;
  font-family: monospace;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* Counter Hardware Barcode & Manual Search Box */
.counter-search-box {
  background: linear-gradient(145deg, #1e2548 0%, #151c38 100%);
  border-radius: 14px;
  padding: 1rem;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(28, 37, 72, 0.2);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.counter-search-head {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.counter-search-sub {
  font-size: 0.74rem;
  color: #93c5fd;
}
.counter-search-form {
  display: flex;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}
.counter-search-input {
  background: #ffffff;
  color: var(--loyalty-navy);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 2px solid #38bdf8;
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  font-family: inherit;
}
.counter-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.counter-search-btn {
  background: #38bdf8;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.counter-search-btn:hover {
  background: #7dd3fc;
}
.counter-search-btn:active {
  transform: scale(0.97);
}
.counter-search-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.55rem;
  font-size: 0.76rem;
  color: #cbd5e1;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.counter-register-link {
  background: none;
  border: none;
  color: #38bdf8;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.76rem;
  padding: 0;
}

/* Stamping Hero Card Container */
.stamping-hero-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid var(--loyalty-line);
  padding: 1.35rem 1.5rem;
  box-shadow: 0 8px 30px rgba(40, 53, 102, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-sizing: border-box;
  width: 100%;
}

/* Customer Scanned Info Header */
.customer-scanned-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1.5px solid #f1f5f9;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}
.customer-scanned-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.customer-scanned-top-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}
.customer-scanned-name {
  font-family: "Montserrat", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--loyalty-navy);
  margin: 0;
  line-height: 1.2;
}
.customer-scanned-meta {
  font-size: 0.85rem;
  color: var(--loyalty-muted);
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cust-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.cust-meta-sep {
  color: #cbd5e1;
  font-weight: 700;
}
.cust-phone-link {
  color: var(--loyalty-navy);
  font-weight: 700;
  text-decoration: none;
}
.cust-phone-link:hover {
  text-decoration: underline;
  color: var(--loyalty-red);
}
.cust-email-link {
  color: var(--loyalty-muted);
  text-decoration: none;
}
.cust-email-link:hover {
  text-decoration: underline;
  color: var(--loyalty-navy);
}

/* Reward Highlight Box */
.reward-highlight-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid var(--loyalty-line);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.reward-highlight-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.reward-target-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--loyalty-red);
}
.reward-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--loyalty-navy);
  margin: 0;
  line-height: 1.3;
}
.reward-visits-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--loyalty-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.btn-open-card {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  background: #ffffff;
  border: 1.5px solid var(--loyalty-navy);
  color: var(--loyalty-navy);
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-open-card:hover {
  background: var(--loyalty-navy);
  color: #ffffff;
  text-decoration: none;
}

/* Stamp Matrix Grid & Slots */
.stamp-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)) !important;
  gap: 0.65rem !important;
  margin: 0.65rem 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.stamp-slot {
  aspect-ratio: 1 / 1;
  min-height: 54px;
  border-radius: 14px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  box-sizing: border-box;
  user-select: none;
  padding: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.stamp-slot.earned {
  background: #ffffff;
  border: 2px solid var(--loyalty-navy);
  color: var(--loyalty-navy);
  box-shadow: 0 4px 12px rgba(40, 53, 102, 0.12);
}
.stamp-slot.earned:hover {
  transform: scale(1.04);
}
.stamp-slot-check {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--loyalty-navy);
  line-height: 1;
}
.stamp-slot.unearned {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  color: #94a3b8;
}
.stamp-slot-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: #94a3b8;
  line-height: 1;
}
.stamp-slot.final-slot.unearned {
  background: #fffbeb;
  border: 2px dashed #f59e0b;
  color: #b45309;
}
.stamp-slot-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.stamp-slot.final-slot.earned {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2px solid #f59e0b;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.stamp-slot-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: 2px;
  color: inherit;
  opacity: 0.85;
}

/* Ready to Redeem Alert Banner */
.reward-ready-banner {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #10b981;
  border-radius: 14px;
  padding: 1.15rem;
  text-align: center;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.reward-ready-banner h4 {
  color: #065f46;
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}
.reward-ready-banner p {
  color: #047857;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0;
}
.btn-claim-reward {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  width: 100%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}
.btn-claim-reward:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

/* Stamping Action Group & Main Button */
.stamp-action-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.btn-add-stamp-main {
  background: linear-gradient(135deg, var(--loyalty-navy) 0%, var(--loyalty-navy-deep) 100%);
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  padding: 0.95rem 1.25rem;
  border-radius: 14px;
  width: 100%;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(40, 53, 102, 0.28);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}
.btn-add-stamp-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(40, 53, 102, 0.35);
  background: linear-gradient(135deg, var(--loyalty-navy-deep) 0%, #151c38 100%);
}
.btn-add-stamp-main:active {
  transform: scale(0.98);
}
.stamp-secondary-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn-scan-next {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--loyalty-navy);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-scan-next:hover {
  background: #e2e8f0;
  color: var(--loyalty-navy-deep);
}
.btn-reset-cycle {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--loyalty-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.35rem 0.5rem;
}
.btn-reset-cycle:hover {
  color: var(--loyalty-red);
}

/* Stepper Input Widget (+ / -) */
.stepper-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stepper-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--loyalty-radius-sm);
  border: 1px solid var(--loyalty-line);
  background: #f8fafc;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--loyalty-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
}
.stepper-btn:hover {
  background: #e2e8f0;
}
.stepper-input {
  width: 70px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Reward Programs Grid */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
  width: 100%;
  box-sizing: border-box;
}
.program-card {
  background: #fff;
  border-radius: var(--loyalty-radius-md);
  border: 1.5px solid var(--loyalty-line);
  padding: 1.25rem;
  box-shadow: var(--loyalty-shadow-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.program-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(40, 53, 102, 0.1);
  border-color: #cbd5e1;
}
.program-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.program-card-head h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--loyalty-navy);
  margin: 0;
}

/* ==============================================================================
   Mobile Quick-Scan Hero Hub & Camera Controls
   ============================================================================== */

.mobile-scanner-hub {
  background: #ffffff;
  border-radius: var(--loyalty-radius-md);
  border: 1.5px solid var(--loyalty-line);
  padding: 1.15rem;
  box-shadow: var(--loyalty-shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mobile-scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scanner-btn-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-camera-pulse {
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  touch-action: manipulation;
}
.btn-camera-pulse:active {
  transform: scale(0.98);
}
.btn-camera-pulse::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid rgba(56, 189, 248, 0.6);
  animation: cameraPulse 2s infinite;
  pointer-events: none;
}
@keyframes cameraPulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.04); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

/* Scanner Viewport with Live Aiming Corners */
.scanner-aim-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(200px, 65%);
  height: min(200px, 65%);
  pointer-events: none;
  z-index: 6;
}

.aim-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: #38bdf8;
  border-style: solid;
}
.aim-corner.top-left {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 6px;
}
.aim-corner.top-right {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 6px;
}
.aim-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 6px;
}
.aim-corner.bottom-right {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 6px;
}

.scanner-controls-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  z-index: 10;
}
.scanner-ctrl-btn {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
}
.scanner-ctrl-btn:hover {
  background: rgba(15, 23, 42, 0.95);
}
.scanner-ctrl-btn.danger {
  background: rgba(230, 57, 70, 0.88);
  border-color: rgba(230, 57, 70, 0.5);
}

/* ==============================================================================
   Desktop Table Containers (Contained scrolling without window overflow)
   ============================================================================== */

.customers-desktop-table,
.history-desktop-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.customers-desktop-table::-webkit-scrollbar,
.history-desktop-table::-webkit-scrollbar {
  height: 6px;
}
.customers-desktop-table::-webkit-scrollbar-track,
.history-desktop-table::-webkit-scrollbar-track {
  background: transparent;
}
.customers-desktop-table::-webkit-scrollbar-thumb,
.history-desktop-table::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.customers-desktop-table::-webkit-scrollbar-thumb:hover,
.history-desktop-table::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==============================================================================
   Mobile Member Cards & Activity Feed (Replacing wide tables on phones)
   ============================================================================== */

.loyalty-customers-mobile {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem;
}

.loyalty-customer-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--loyalty-line);
  padding: 1.1rem;
  box-shadow: var(--loyalty-shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.loyalty-customer-card:active {
  background: #fdfdfe;
}

.cust-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.cust-card-name {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--loyalty-navy);
  margin: 0 0 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cust-card-joined {
  font-size: 0.72rem;
  color: var(--loyalty-muted);
}

.cust-card-contact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.84rem;
  color: var(--loyalty-muted);
  background: #f8fafc;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
}
.cust-card-contact a {
  color: var(--loyalty-navy);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cust-card-program {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cust-program-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--loyalty-navy);
}
.cust-stamp-progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  width: 100%;
}
.cust-stamp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--loyalty-navy) 0%, #10B981 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}
.cust-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--loyalty-muted);
}

.loyalty-history-mobile {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
}
.loyalty-history-card-item {
  background: #fff;
  border: 1px solid var(--loyalty-line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.history-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-card-customer {
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--loyalty-navy);
}
.history-card-time {
  font-size: 0.72rem;
  color: var(--loyalty-muted);
}
.history-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--loyalty-muted);
  border-top: 1px dashed #f1f5f9;
  padding-top: 0.45rem;
}

/* ==============================================================================
   Mobile Responsiveness for Staff Dashboard & Loyalty (< 768px and < 480px)
   ============================================================================== */

@media (max-width: 768px) {
  .dash-loyalty-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  .dash-loyalty-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem;
    scrollbar-width: none;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  .dash-loyalty-tabs::-webkit-scrollbar {
    display: none;
  }
  .dash-loyalty-tab {
    flex-shrink: 0;
    font-size: 0.82rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    touch-action: manipulation;
  }
  .dash-loyalty-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }
  .dash-loyalty-actions a.dash-loyalty-action-btn:first-child {
    grid-column: 1 / -1;
  }
  .dash-loyalty-action-btn {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
    justify-content: center;
    text-align: center;
  }

  .loyalty-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
  }
  .loyalty-stat-card {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
  }
  .loyalty-stat-value {
    font-size: 1.35rem;
  }
  .loyalty-stat-label {
    font-size: 0.68rem;
  }

  .scanner-workspace-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .scanner-card, .stamping-hero-card {
    padding: 1rem;
    border-radius: 14px;
  }
  .scanner-viewport {
    min-height: 240px;
    max-height: 280px;
    border-radius: 12px;
  }

  /* Table to Mobile Card View Switching */
  .customers-desktop-table,
  .history-desktop-table {
    display: none !important;
  }
  .loyalty-customers-mobile,
  .loyalty-history-mobile {
    display: flex !important;
  }

  /* Bottom-Sheet Mobile Modals */
  .dash-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .dash-modal-panel {
    padding: 1.35rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    max-width: 100vw;
    width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: 88vh;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .dash-modal-backdrop.open .dash-modal-panel {
    transform: translateY(0);
  }

  /* Prevent iOS auto-zoom on input focus */
  .dash-input, .stepper-input, .dash-select, .counter-search-input {
    font-size: 16px !important;
  }
  .customer-scanned-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .counter-search-box {
    padding: 0.9rem;
    border-radius: 12px;
  }
  .stamp-grid {
    grid-template-columns: repeat(auto-fit, minmax(46px, 1fr)) !important;
    gap: 0.45rem !important;
  }
  .stamp-slot {
    min-height: 46px;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .loyalty-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .scanner-btn-row {
    flex-direction: column;
    align-items: stretch;
  }
  .scanner-btn-row .dash-btn {
    width: 100%;
  }
  .dash-modal-panel {
    padding: 1.15rem 1rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
  }
  .counter-search-box {
    padding: 0.8rem 0.75rem;
  }
  .counter-search-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .counter-search-form {
    gap: 0.35rem;
  }
  .counter-search-input {
    padding: 0.65rem 0.75rem;
  }
  .counter-search-btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
  }
  .counter-search-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .reward-highlight-box {
    padding: 0.85rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .btn-open-card {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
  }
  .btn-add-stamp-main {
    font-size: 0.98rem;
    padding: 0.85rem 1rem;
    min-height: 48px;
  }
  .stamp-secondary-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .btn-scan-next {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
  }
  .btn-reset-cycle {
    text-align: center;
    width: 100%;
  }
  .stamp-grid {
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr)) !important;
    gap: 0.4rem !important;
  }
  .stamp-slot {
    min-height: 42px;
    border-radius: 10px;
  }
}

/* ==============================================================================
   Customer-Facing Wallet Card & Join Page Refinements
   ============================================================================== */

/* Floating Toast Notification */
.loyalty-toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: #0f172a;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.35rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90vw;
  text-align: center;
}
.loyalty-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Pass Member Meta Info */
.member-meta-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  opacity: 0.85;
  color: #cbd5e1;
  margin-top: 2px;
}
#liveClockBadge {
  color: #34d399;
  font-weight: 700;
}



/* Join & Lookup Tab Switcher */
.join-tab-toggle {
  display: flex;
  background: #e2e8f0;
  padding: 0.3rem;
  border-radius: 14px;
  gap: 0.3rem;
  margin-bottom: 1.25rem;
}
.join-tab-btn {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: "Outfit", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--loyalty-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.join-tab-btn.active {
  background: #fff;
  color: var(--loyalty-navy);
  box-shadow: 0 4px 12px rgba(40, 53, 102, 0.12);
}

/* Value Benefit Highlights */
.join-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.join-benefit-item {
  background: #fff;
  border: 1px solid var(--loyalty-line);
  border-radius: 12px;
  padding: 0.6rem 0.4rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--loyalty-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.join-benefit-item span:first-child {
  font-size: 1.15rem;
}

/* ==============================================================================
   Customer Pass Mobile Responsiveness (< 480px and < 380px)
   ============================================================================== */

@media (max-width: 480px) {
  .simple-page-wrapper {
    padding: 0.85rem 0.75rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }
  
  .simple-pass-container {
    max-width: 100%;
    gap: 0.85rem;
  }

  .simple-brand-logo {
    max-width: 155px;
  }

  /* Digital Wallet Card Mobile Optimization */
  .digital-wallet-card {
    padding: 1.15rem 1rem;
    border-radius: 18px;
  }

  .wallet-card-layout {
    gap: 0.75rem;
  }

  .wallet-card-title {
    font-size: 1.25rem;
  }

  .wallet-card-subtitle {
    font-size: 0.75rem;
  }

  .wallet-card-customer-name {
    font-size: 1.35rem;
  }

  .wallet-card-pass-id {
    font-size: 0.72rem;
  }

  .wallet-card-right-col {
    width: 145px;
    gap: 0.5rem;
  }

  .wallet-card-chip-badge {
    font-size: 0.62rem;
    padding: 0.3rem 0.45rem;
  }

  .wallet-card-qr-box {
    padding: 7px 7px 5px;
    border-radius: 14px;
  }

  .wallet-card-qr-img {
    width: 128px;
    height: 128px;
  }

  .btn-wallet-download {
    font-size: 0.98rem;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
  }

  /* Stamp Metrics Grid */
  .stamps-metric-grid {
    gap: 0.65rem;
  }

  .stamp-metric-card {
    padding: 0.9rem 0.85rem;
    border-radius: 14px;
  }

  .metric-val {
    font-size: 1.75rem;
  }

  .metric-label {
    font-size: 0.68rem;
  }

  .metric-sub {
    font-size: 0.7rem;
  }

  /* Stamp Grid */
  .simple-stamp-card {
    padding: 1rem;
    border-radius: 18px;
  }

  .simple-stamp-grid {
    gap: 0.55rem;
  }

  .simple-slot {
    border-radius: 12px;
  }

  .simple-brand-mark-img {
    width: 28px;
    height: 28px;
  }

  .simple-slot-tag {
    font-size: 0.58rem;
  }

  .simple-slot-num {
    font-size: 1.05rem;
  }

  .simple-actions-grid {
    gap: 0.5rem;
  }

  .btn-simple-util {
    padding: 0.65rem 0.4rem;
    font-size: 0.78rem;
    border-radius: 10px;
  }
}

@media (max-width: 370px) {
  .digital-wallet-card {
    padding: 1rem 0.85rem;
    border-radius: 16px;
  }

  .wallet-card-layout {
    gap: 0.5rem;
  }

  .wallet-card-title {
    font-size: 1.1rem;
  }

  .wallet-card-customer-name {
    font-size: 1.2rem;
  }

  .wallet-card-right-col {
    width: 132px;
    gap: 0.45rem;
  }

  .wallet-card-chip-badge {
    font-size: 0.58rem;
    padding: 0.28rem 0.35rem;
  }

  .wallet-card-qr-box {
    padding: 6px 6px 4px;
  }

  .wallet-card-qr-img {
    width: 118px;
    height: 118px;
  }

  .wallet-card-qr-caption {
    font-size: 0.54rem;
  }

  .pass-view-btn {
    font-size: 0.8rem;
    padding: 0.6rem 0.65rem;
  }
}



