@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@600;700&display=swap');

:root {
  --bg-app: #faf9f5;
  --surface: #ffffff;
  --charcoal: #052e20;
  --charcoal-subtle: #0d4231;
  --kmina-pine: #052e20;
  --kmina-pine-subtle: #0d4231;
  --kmina-coral: #d63f2c;
  --kmina-coral-dark: #b83222;
  --kmina-coral-glow: rgba(214, 63, 44, 0.25);
  --kmina-sand: #c5beab;
  --kmina-sand-light: #f5f2eb;
  --kmina-amber: #d97706;
  --kmina-emerald: #052e20;
  --border-light: #ece8df;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 50% 20%, #0d4231 0%, #021a11 100%);
  color: var(--charcoal);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Luxury Device Container */
.device-wrapper {
  width: 100%;
  max-width: 430px;
  height: 920px;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: 52px;
  box-shadow: 
    0 0 0 10px #083827,
    0 0 0 13px #0d4a34,
    0 35px 85px -15px rgba(0, 0, 0, 0.75);
}

/* Mobile Role Switcher (Hidden on desktop, prominent on real phones) */
.mobile-role-bar {
  display: none;
}

@media (max-width: 640px) {
  html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    background: var(--bg-app);
  }

  .device-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-app);
    padding-top: calc(52px + env(safe-area-inset-top, 0px));
  }

  /* Real phones already have a physical notch/island and hardware status bar */
  .device-notch {
    display: none !important;
  }

  .device-status-bar {
    display: none !important;
  }

  .desktop-top-bar {
    display: none !important;
  }

  /* Mobile Top Role Switcher - Always on top across all screens including Admin */
  .mobile-role-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(52px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 6px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    z-index: 300 !important;
  }

  .mobile-role-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    gap: 6px;
  }

  .mobile-role-pill-group {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    flex: 1;
    gap: 2px;
  }

  .mobile-reset-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .mobile-reset-btn:active {
    background: #e2e8f0;
    color: #d63f2c;
    transform: rotate(-180deg);
  }

  .mobile-role-btn {
    flex: 1;
    padding: 7px 6px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .mobile-role-btn.active-usuario {
    background: #d63f2c;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(214, 63, 44, 0.35);
  }

  .mobile-role-btn.active-comercio {
    background: #052e20;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(5, 46, 32, 0.35);
  }

  .mobile-role-btn.active-admin {
    background: #0d4231;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(13, 66, 49, 0.35);
  }

  /* Floating Clean Bottom Nav inside visible viewport */
  .floating-nav {
    position: absolute;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    left: 14px !important;
    right: 14px !important;
    height: 62px !important;
    border-radius: 24px !important;
    z-index: 45;
  }

  .screen-scrollable {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    -webkit-overflow-scrolling: touch;
  }

  .modal-overlay {
    border-radius: 0 !important;
  }

  .modal-sheet {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Admin console full-screen on mobile, placed below the mobile-role-bar */
  .admin-console-modal {
    padding: 0 !important;
    position: fixed !important;
    top: calc(52px + env(safe-area-inset-top, 0px)) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    z-index: 200 !important;
  }

  .admin-console-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
  }
}

.device-notch {
  width: 110px;
  height: 26px;
  background-color: #000;
  border-radius: 20px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
}

.device-status-bar {
  padding: 12px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  font-size: 13px;
  font-weight: 700;
  color: var(--charcoal);
}

.screen-scrollable {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 96px;
  scroll-behavior: smooth;
}

.screen-scrollable::-webkit-scrollbar { display: none; }

/* Floating Clean Bottom Nav */
.floating-nav {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  height: 68px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(0,0,0,0.03);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 12px;
  z-index: 45;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  max-width: 82px;
  height: 52px;
  border-radius: 20px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.nav-btn.active {
  color: var(--kmina-coral);
}

.nav-btn.active svg {
  transform: translateY(-2px) scale(1.1);
  stroke: var(--kmina-coral);
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 16px;
  height: 3px;
  background: var(--kmina-coral);
  border-radius: 99px;
}

/* Kmina Coin Badge */
.kmina-coin-badge {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.k-coin {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--kmina-coral), #ff7a6b);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 2px 6px var(--kmina-coral-glow);
}

/* Universal Search Input */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 12px 38px 12px 42px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--kmina-coral);
  box-shadow: 0 4px 16px var(--kmina-coral-glow);
}

.search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
}

/* Radial Ring */
.ring-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.ring-track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 14;
}

.ring-progress {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 10px var(--kmina-coral-glow));
}

/* 7-Day Weekly Step Bar Chart */
.week-bar-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 70px;
  padding: 0 6px;
  gap: 8px;
}

.week-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.week-bar-pill {
  width: 100%;
  max-width: 22px;
  background: #e2e8f0;
  border-radius: 8px;
  transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.week-bar-pill.today {
  background: linear-gradient(180deg, #ea5a46 0%, #d63f2c 100%);
  box-shadow: 0 2px 8px var(--kmina-coral-glow);
}

.week-bar-pill.completed {
  background: #cbd5e1;
}

/* Stylized Territory Map */
.map-canvas-preview {
  position: relative;
  height: 140px;
  background: #e5ede9;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
  border: 1px solid #cbdcd2;
}

.map-road-1 {
  position: absolute;
  top: 40px;
  left: -20px;
  right: -20px;
  height: 14px;
  background: #ffffff;
  transform: rotate(-6deg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.map-road-2 {
  position: absolute;
  top: -20px;
  bottom: -20px;
  left: 120px;
  width: 14px;
  background: #ffffff;
  transform: rotate(15deg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.map-pin {
  position: absolute;
  padding: 4px 8px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--border-light);
  z-index: 10;
}
.map-pin:hover {
  transform: scale(1.08) translateY(-2px);
}

/* High-Appetite Photographic Merchant Card */
.photo-card {
  background: #ffffff;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}

.photo-card:hover {
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.photo-card-img-wrapper {
  position: relative;
  height: 160px;
  width: 100%;
  overflow: hidden;
  background: #cbd5e1;
}

.photo-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-card:hover .photo-card-img {
  transform: scale(1.04);
}

.photo-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.photo-card-distance {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--charcoal);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Product Item Shelf inside Merchant */
.shelf-product-item {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.shelf-product-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

/* Digital In-Counter Pass */
.digital-pass-card {
  background: #ffffff;
  border-radius: 28px;
  position: relative;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.12);
  border: 1px solid #edf2f7;
  overflow: hidden;
}

.digital-pass-card::before, .digital-pass-card::after {
  content: '';
  position: absolute;
  top: 58%;
  width: 24px;
  height: 24px;
  background-color: var(--bg-app);
  border-radius: 50%;
  z-index: 10;
}
.digital-pass-card::before { left: -12px; box-shadow: inset -2px 0 3px rgba(0,0,0,0.06); }
.digital-pass-card::after { right: -12px; box-shadow: inset 2px 0 3px rgba(0,0,0,0.06); }

.pass-tear-line {
  position: absolute;
  top: calc(58% + 11px);
  left: 18px;
  right: 18px;
  border-top: 2px dashed #e2e8f0;
  z-index: 5;
}

/* MODAL CORRECTAMENTE RESTRINGIDO DENTRO DEL CELULAR */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  border-radius: 52px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .modal-overlay { border-radius: 0; }
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: #ffffff;
  border-radius: 32px 32px 0 0;
  padding: 22px 22px 30px;
  max-height: 85%;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

/* Ocultar barras de scroll nativas en todas partes */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* Control Segmentado Moderno Estilo iOS */
.segmented-control {
  background: #f1f5f9;
  padding: 4px;
  border-radius: 20px;
  display: flex;
  gap: 4px;
  border: 1px solid #e2e8f0;
  width: 100%;
}

.segment-btn {
  flex: 1;
  padding: 9px 8px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  background: transparent;
}

.segment-btn:hover {
  color: var(--charcoal);
}

.segment-btn.active {
  background: #ffffff;
  color: var(--charcoal);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.segment-btn.active-coral {
  background: var(--kmina-coral);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--kmina-coral-glow);
}

/* Visor del Escáner de Mostrador */
.scanner-viewport {
  position: relative;
  width: 100%;
  height: 170px;
  background: #0f172a;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #334155;
}

.scanner-laser {
  position: absolute;
  left: 24px;
  right: 24px;
  height: 2px;
  background: #d63f2c;
  box-shadow: 0 0 14px 2px #d63f2c;
  animation: scanLaser 1.8s ease-in-out infinite alternate;
}

@keyframes scanLaser {
  0% { top: 20%; opacity: 0.3; }
  100% { top: 80%; opacity: 1; }
}

.scanner-reticle {
  width: 120px;
  height: 120px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tarjeta Local de Fidelidad / Sellos por Consumos Mínimos */
.stamp-card-container {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 26px;
  padding: 16px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}

.stamp-card-container::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(226, 90, 72, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.stamp-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
}

.stamp-slot {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.stamp-slot.stamped {
  background: linear-gradient(135deg, #ea5a46 0%, #d63f2c 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(214, 63, 44, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.stamp-slot.empty {
  background: rgba(255, 255, 255, 0.06);
  border: 2px dashed rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.3);
}

/* Tarjetas de Retos Urbanos */
.challenge-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 14px;
  transition: all 0.2s ease;
}

.challenge-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Consola Administrativa de Socios (Dashboard SaaS B2B) */
.desktop-top-bar {
  z-index: 300 !important;
}

.admin-console-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 72px 16px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.admin-console-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-console-container {
  width: 100%;
  max-width: 1060px;
  height: 88vh;
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-console-modal.open .admin-console-container {
  transform: scale(1);
}

.admin-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.admin-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: none;
  background: transparent;
  flex: 1;
}

.admin-nav-item:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.admin-nav-item.active {
  color: #052e20;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.admin-kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06);
}

/* ========================================================
   PISTA LINEAL CON MASCOTA CORRIENDO (PRUEBA INTERACTIVA)
   ======================================================== */
.linear-track-container {
  position: relative;
  width: 100%;
  padding-top: 78px;
  padding-bottom: 4px;
}

.linear-track-bar {
  position: relative;
  width: 100%;
  height: 14px;
  background: #ebe6dc;
  border-radius: 999px;
  border: 1px solid rgba(197, 190, 171, 0.45);
  overflow: visible;
}

.linear-track-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a6b 0%, #d63f2c 100%);
  box-shadow: 0 2px 8px rgba(214, 63, 44, 0.35);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* El contenedor de la mascota se posiciona con los pies tocando la superficie de la barra como suelo */
.mascot-runner-wrapper {
  position: absolute;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
  pointer-events: none;
}

.mascot-speech-bubble {
  background: #052e20;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 2.5px 7px;
  border-radius: 7px;
  margin-bottom: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
  animation: mascot-bob 1.8s ease-in-out infinite;
}

.mascot-runner-character {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* Imagen animada fluida a 24 FPS (WebP / GIF transparente) */
.mascot-walk-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  display: block;
}

/* Sombra de apoyo estática y fija sobre la barra */
.runner-contact-shadow {
  width: 38px;
  height: 4px;
  background: radial-gradient(ellipse at center, rgba(5, 46, 32, 0.35) 0%, rgba(5, 46, 32, 0) 75%);
  border-radius: 999px;
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* ========================================================
   PESTAÑAS DE RETOS Y TARJETAS DE FIDELIDAD
   ======================================================== */
.retos-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 14px;
  color: #64748b;
  background: transparent;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
  cursor: pointer;
}

.retos-tab-btn.active {
  background: #ffffff;
  color: #052e20;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ========================================================
   MODAL DE ALTA / EDICIÓN DE COMERCIO (ADMIN B2B)
   ======================================================== */
.admin-merchant-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.admin-merchant-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-merchant-dialog {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.admin-merchant-body {
  overflow-y: auto;
  padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
}

.form-block-tab {
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 12px;
  color: #64748b;
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.form-block-tab.active {
  background: #ffffff;
  color: #052e20;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.photo-preset-card {
  border: 2.5px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.photo-preset-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.photo-preset-card.active {
  border-color: #d63f2c;
  box-shadow: 0 0 0 2px rgba(214, 63, 44, 0.3);
}

.merchant-admin-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.merchant-admin-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}
