/* =============================================================================
   components.css — Estilos de componentes reutilizables del MVP
   Ver CLAUDE.md §5 — Componentes base.
   ============================================================================= */

/* =========================== BOTONES ======================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px var(--space-5);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  line-height: 1;
  transition: transform var(--transition-fast), box-shadow var(--transition-base), background var(--transition-base);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent-500);
  color: var(--neutral-0);
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover { background: #5847d6; }

.btn--secondary {
  background: var(--neutral-0);
  color: var(--accent-500);
  border: 1px solid var(--neutral-300);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-500);
}

.btn--danger { background: var(--danger-500); color: var(--neutral-0); }

.btn--dark {
  background: var(--neutral-900);
  color: var(--neutral-0);
  box-shadow: var(--shadow-lg);
}

.btn--block { width: 100%; }
.btn--sm    { padding: 8px var(--space-3); font-size: var(--text-sm); }
.btn--lg    { padding: 18px var(--space-6); font-size: var(--text-lg); border-radius: var(--radius-lg); }

/* CTA hero (botón negro con punto amarillo a la izquierda, ver SCREENS sección D del Home) */
.cta-hero {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  background: var(--neutral-900);
  color: var(--neutral-0);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
  transition: transform var(--transition-fast);
}
.cta-hero:active { transform: scale(0.98); }
.cta-hero__icon {
  width: 36px; height: 36px;
  background: var(--gold-500);
  border-radius: var(--radius-full);
  display: grid; place-items: center;
  color: var(--neutral-900);
  flex-shrink: 0;
}
.cta-hero__chevron { margin-left: auto; color: var(--neutral-500); }

/* =========================== CARDS ========================================= */
.card {
  background: var(--neutral-0);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.card--flat   { box-shadow: none; border: 1px solid var(--neutral-300); }
.card--accent { background: var(--primary-100); border: 1px solid var(--accent-300); }
.card--success { background: var(--success-100); }
.card--locked  { background: var(--neutral-100); border: 1px dashed var(--neutral-300); }

.section-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--neutral-900);
  margin: var(--space-6) var(--space-5) var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.section-title .icon-leading {
  color: var(--accent-500);
}

/* =========================== CHIPS ========================================= */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: var(--neutral-100);
  color: var(--neutral-700);
  line-height: 1;
}
.chip--gold {
  background: rgba(255, 255, 255, 0.18);
  color: var(--gold-300);
  backdrop-filter: blur(8px);
}
.chip--gold-solid {
  background: var(--gold-500);
  color: var(--neutral-900);
}
.chip--fire {
  background: rgba(255, 255, 255, 0.18);
  color: var(--neutral-0);
  backdrop-filter: blur(8px);
}
.chip--accent-soft {
  background: rgba(108, 92, 231, 0.12);
  color: var(--accent-500);
}
.chip--success {
  background: var(--success-100);
  color: #007a5b;
}
.chip--inverse {
  background: rgba(255, 255, 255, 0.18);
  color: var(--neutral-0);
  backdrop-filter: blur(8px);
}
.chip__icon { width: 14px; height: 14px; }

/* =========================== AVATAR ======================================== */
.avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-500), var(--accent-300));
  display: grid; place-items: center;
  color: var(--neutral-0);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  flex-shrink: 0;
  position: relative;
}
.avatar--lg { width: 88px; height: 88px; font-size: var(--text-2xl); }
.avatar--ring-gold { box-shadow: 0 0 0 3px var(--gold-500); }
.avatar--ring-silver { box-shadow: 0 0 0 3px var(--level-silver); }
.avatar--ring-bronze { box-shadow: 0 0 0 3px var(--level-bronze); }

/* =========================== PROGRESS BAR ================================== */
.progress {
  position: relative;
  height: 10px;
  background: var(--neutral-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-500), var(--accent-300));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}
.progress--xl { height: 14px; }
.progress--sm { height: 6px; }
.progress--success .progress__fill { background: linear-gradient(90deg, var(--success-500), #00e0a8); }

/* Marca de Safe XP en la barra (línea vertical con etiqueta) */
.progress__marker {
  position: absolute;
  top: -4px; bottom: -4px;
  width: 2px;
  background: var(--neutral-700);
  border-radius: 2px;
}
.progress__marker-label {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: var(--neutral-700);
  font-weight: var(--weight-medium);
}

/* =========================== HEADER MOBILE =================================
   Estética sticker (Pablo Stanley): canvas claro + chips outline + sombra dura.
   Variante --clean para Home; el resto de pantallas usa screen-header.
   ============================================================================ */
.header-mobile {
  background: var(--neutral-100);
  color: var(--neutral-900);
  padding: var(--space-4) var(--space-5) var(--space-5);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  border-bottom: 1.5px solid var(--neutral-900);
}
.header-mobile__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header-mobile__greeting { font-size: var(--text-xs); color: var(--neutral-500); line-height: 1.2; font-weight: var(--weight-medium); }
.header-mobile__name { font-size: var(--text-lg); font-weight: var(--weight-bold); line-height: 1.2; color: var(--neutral-900); }
.header-mobile__chips {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}

/* =========================== STICKER CHIP ==================================
   Píldora con outline negro y sombra dura desplazada. Variantes por color.
   Uso típico: header de Home, top de cards de gamificación.
   ============================================================================ */
.sticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  background: var(--neutral-0);
  color: var(--neutral-900);
  border: 2px solid var(--neutral-900);
  box-shadow: 2px 2px 0 var(--neutral-900);
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--transition-fast);
}
.sticker-chip:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--neutral-900); }

.sticker-chip--dark   { background: var(--neutral-900); color: var(--neutral-0); }
.sticker-chip--fire   { background: var(--streak-fire); color: var(--neutral-0); }
.sticker-chip--violet { background: var(--accent-500); color: var(--neutral-0); }
.sticker-chip--mint   { background: var(--success-500); color: var(--neutral-0); }
.sticker-chip--gold   { background: var(--gold-500); color: var(--neutral-900); }

/* Variante solo-ícono (botones tipo bell) */
.sticker-chip--icon {
  padding: 0;
  width: 36px;
  height: 36px;
  justify-content: center;
  position: relative;
}
.sticker-chip__dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 12px; height: 12px;
  background: var(--danger-500);
  border-radius: var(--radius-full);
  border: 2px solid var(--neutral-900);
}

/* =========================== AVATAR STACK ==================================
   Avatar redondo con etiqueta de liga colgando abajo (PLATA / BRONCE / ORO).
   ============================================================================ */
.avatar-stack {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.avatar-stack .avatar {
  border: 2px solid var(--neutral-900);
  box-shadow: 2px 2px 0 var(--neutral-900);
}
.avatar-tag {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: var(--weight-bold);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--neutral-900);
  letter-spacing: 0.08em;
  white-space: nowrap;
  background: var(--neutral-0);
  color: var(--neutral-900);
  line-height: 1.3;
}
.avatar-tag--bronze { background: var(--level-bronze); color: var(--neutral-0); }
.avatar-tag--silver { background: var(--level-silver); color: var(--neutral-900); }
.avatar-tag--gold   { background: var(--gold-500);    color: var(--neutral-900); }
.avatar-tag--legend { background: var(--level-legend); color: var(--neutral-0); }

/* =========================== CARD STICKER ==================================
   Card con outline negro y sombra dura — para destacar cosas clave en una
   pantalla que necesita jerarquía sin saturar.
   ============================================================================ */
.card--sticker {
  border: 1.5px solid var(--neutral-900);
  box-shadow: 4px 4px 0 var(--neutral-900);
}

/* =========================== BOTTOM NAV ==================================== */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: calc(64px + var(--safe-area-bottom));
  background: var(--neutral-0);
  border-top: 1px solid var(--neutral-300);
  box-shadow: 0 -4px 12px rgba(15, 31, 75, 0.06);
  padding-bottom: var(--safe-area-bottom);
  display: flex;
  align-items: stretch;
  z-index: var(--z-sticky);
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--neutral-500);
  font-size: 11px;
  font-weight: var(--weight-medium);
  position: relative;
  padding-top: 6px;
}
.bottom-nav__item--active {
  color: var(--accent-500);
}
.bottom-nav__item--active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 3px;
  background: var(--accent-500);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}
.bottom-nav__badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  width: 8px; height: 8px;
  background: var(--danger-500);
  border-radius: var(--radius-full);
}

/* Item deshabilitado — pantalla aún no implementada (fase wireframe) */
.bottom-nav__item--disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}
.bottom-nav__item--disabled::after {
  /* Tag "Soon" pequeño arriba del label */
  content: "soon";
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  font-size: 8px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--neutral-300);
  color: var(--neutral-700);
  padding: 1px 5px;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

/* =========================== REWARD CHIP (coin + XP) =======================
   Pildora que combina la moneda 3D Segurally con la cantidad de XP.
   Es la marca visual de "recompensa" en todo el producto (desafíos,
   detalles, niveles). El ícono de moneda es la identidad de marca; el
   texto siempre dice "XP".
   ============================================================================ */
.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 5px;
  border-radius: var(--radius-full);
  background: var(--neutral-900);
  color: var(--neutral-0);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  line-height: 1;
  border: 2px solid var(--neutral-900);
  white-space: nowrap;
}
.reward-chip img { flex-shrink: 0; }
.reward-chip--light {
  background: var(--neutral-0);
  color: var(--neutral-900);
}
.reward-chip--gold {
  background: var(--gold-500);
  color: var(--neutral-900);
}
.reward-chip--lg {
  font-size: var(--text-sm);
  padding: 6px 14px 6px 6px;
}

/* =========================== KPI GRID ====================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.kpi {
  background: var(--neutral-100);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.kpi__label {
  font-size: var(--text-xs);
  color: var(--neutral-500);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi__value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--neutral-900);
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.kpi__delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--success-500);
  margin-top: 4px;
}
.kpi__delta--down { color: var(--danger-500); }

/* =========================== CHALLENGE CARD ================================ */
.challenge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--neutral-0);
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-300);
}
.challenge__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-100);
  color: var(--accent-500);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.challenge__body { flex: 1; min-width: 0; }
.challenge__title { font-weight: var(--weight-semibold); font-size: var(--text-base); }
.challenge__meta  { font-size: var(--text-xs); color: var(--neutral-500); margin-top: 2px; }

.challenge--featured {
  background: var(--primary-100);
  border: 1px solid var(--accent-300);
}

/* Estado completado: fondo menta + check verde, opacidad sutil en el título */
.challenge--completed {
  background: var(--success-100);
  border-color: transparent;
}
.challenge--completed .challenge__title { color: var(--neutral-700); }
.challenge--completed .challenge__icon  { background: rgba(0, 200, 150, 0.18); color: var(--success-500); }

/* Estado bloqueado: dashed border, candado, contenido oculto */
.challenge--locked {
  background: var(--neutral-0);
  border-style: dashed;
  opacity: 0.85;
}
.challenge--locked .challenge__icon { background: var(--neutral-100); color: var(--neutral-500); }
.challenge--locked .challenge__title { color: var(--neutral-700); }

/* Botón "Cargar" pequeño al final del card */
.challenge__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent-500);
  background: rgba(108, 92, 231, 0.12);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* =========================== SCREEN HEADER (con back) ====================== */
.screen-header {
  background: var(--neutral-0);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 1px solid var(--neutral-300);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}
.screen-header__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--neutral-900);
  flex: 1;
}
.screen-header__action {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--neutral-100);
  display: grid; place-items: center;
  color: var(--neutral-700);
}

/* =========================== TABS (sticky) ================================= */
.tabs {
  display: flex;
  gap: var(--space-1);
  background: var(--neutral-0);
  padding: 0 var(--space-5);
  border-bottom: 1px solid var(--neutral-300);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 73px; /* debajo del screen-header */
  z-index: calc(var(--z-sticky) - 1);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: var(--space-3) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--neutral-500);
  white-space: nowrap;
  transition: color var(--transition-base);
}
.tab--active { color: var(--accent-500); }
.tab--active::after {
  content: "";
  position: absolute;
  left: var(--space-3); right: var(--space-3);
  bottom: -1px;
  height: 3px;
  background: var(--accent-500);
  border-radius: 2px 2px 0 0;
}

/* =========================== TAB PANEL ===================================== */
.tab-panel { display: none; }
.tab-panel--active { display: block; }

/* =========================== CHECK CIRCLE (completed) ====================== */
.check-circle {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: var(--success-500);
  color: var(--neutral-0);
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* =========================== EMPTY STATE =================================== */
.empty-state {
  text-align: center;
  padding: var(--space-9) var(--space-5);
  color: var(--neutral-500);
}
.empty-state__icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--space-3);
  opacity: 0.45;
}

/* =========================== AVATAR — variantes de color ===================
   Para pantallas con muchos agentes (ranking, sucursal, podio).
   ============================================================================ */
.avatar--mint  { background: linear-gradient(135deg, #7CF1CB, var(--success-500)); }
.avatar--coral { background: linear-gradient(135deg, #FFAB95, #FF5C5C); }
.avatar--gold  { background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: var(--neutral-900); }
.avatar--blue  { background: linear-gradient(135deg, #B2D9FF, var(--info-500)); }
.avatar--violet-deep { background: linear-gradient(135deg, var(--accent-500), #4d3fb8); }

/* =========================== PODIUM (pantalla 06) ==========================
   Podio visual del top 3 de la liga semanal. María (1°) centro alto,
   Roberto (2°) izquierda, Ana (3°) derecha. Plataformas en oro/plata/bronce
   con outline negro estilo sticker.
   ============================================================================ */
.podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2);
  align-items: end;
  padding: var(--space-6) var(--space-4) 0;
}
.podium__col {
  text-align: center;
  position: relative;
  padding-top: var(--space-5);
}
.podium__col .avatar {
  margin: 0 auto;
  border: 2.5px solid var(--neutral-900);
  box-shadow: 3px 3px 0 var(--neutral-900);
  width: 52px;
  height: 52px;
  font-size: var(--text-base);
}
.podium__crown {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  z-index: 2;
}
.podium__name {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  margin-top: var(--space-2);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}
.podium__xp {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.podium__base {
  margin-top: var(--space-3);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 2.5px solid var(--neutral-900);
  border-bottom: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
}
.podium__col--gold .podium__base   { background: var(--gold-500);    color: var(--neutral-900); height: 88px; }
.podium__col--silver .podium__base { background: var(--level-silver); color: var(--neutral-900); height: 64px; }
.podium__col--bronze .podium__base { background: var(--level-bronze); color: var(--neutral-0);   height: 50px; }

/* =========================== RANK ROW ======================================
   Fila de ranking en la lista. Posición + avatar + nombre + sucursal + XP +
   delta de movimiento. Variante --current resalta al agente actual.
   ============================================================================ */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0 var(--space-4);
}
.rank-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--neutral-0);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--neutral-300);
}
.rank-row__pos {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--neutral-100);
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--neutral-700);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.rank-row__body { flex: 1; min-width: 0; }
.rank-row__name { font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.rank-row__sub  { font-size: 11px; color: var(--neutral-500); margin-top: 1px; }
.rank-row__xp {
  font-family: var(--font-display);
  font-size: var(--text-base);
  letter-spacing: -0.02em;
  text-align: right;
  flex-shrink: 0;
}
.rank-row__delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: var(--weight-bold);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-top: 3px;
}
.rank-row__delta--up   { background: var(--success-100); color: #007a5b; }
.rank-row__delta--down { background: rgba(255, 92, 92, 0.16); color: var(--danger-500); }
.rank-row__delta--same { background: var(--neutral-100); color: var(--neutral-500); }

/* Highlight para el agente actual — sticker violeta */
.rank-row--current {
  background: var(--accent-500);
  color: var(--neutral-0);
  border-color: var(--neutral-900);
  border-width: 2px;
  box-shadow: 3px 3px 0 var(--neutral-900);
}
.rank-row--current .rank-row__pos {
  background: var(--neutral-0);
  color: var(--accent-500);
}
.rank-row--current .rank-row__name { color: var(--neutral-0); }
.rank-row--current .rank-row__sub  { color: rgba(255, 255, 255, 0.75); }
.rank-row--current .rank-row__delta { background: rgba(255, 255, 255, 0.22); color: var(--neutral-0); }

/* Divider de zona (ascenso/descenso) */
.zone-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  font-size: 10px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.zone-divider::before,
.zone-divider::after {
  content: "";
  flex: 1;
  height: 1.5px;
  border-radius: 1px;
}
.zone-divider--asc  { color: #007a5b; }
.zone-divider--asc::before,
.zone-divider--asc::after { background: var(--success-500); opacity: 0.6; }
.zone-divider--desc { color: var(--danger-500); }
.zone-divider--desc::before,
.zone-divider--desc::after { background: var(--danger-500); opacity: 0.6; }

/* =========================== ZONE CHIPS (pantalla 06) ======================
   3 chips de las reglas de la liga (ascenso / sostén / descenso).
   ============================================================================ */
.zone-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--space-4);
}
.zone-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px var(--space-3);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--neutral-900);
  background: var(--neutral-0);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}
.zone-chip__dot {
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--neutral-900);
  flex-shrink: 0;
}
.zone-chip--asc .zone-chip__dot  { background: var(--success-500); }
.zone-chip--mid .zone-chip__dot  { background: var(--warning-500); }
.zone-chip--desc .zone-chip__dot { background: var(--danger-500); }

/* =========================== STICKY CTA FOOTER =============================
   Barra sticky inferior antes del bottom-nav, mostrando objetivo + acción.
   ============================================================================ */
.sticky-cta {
  position: sticky;
  bottom: calc(64px + var(--safe-area-bottom));
  margin: 0 var(--space-4) var(--space-3);
  background: var(--neutral-900);
  color: var(--neutral-0);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: calc(var(--z-sticky) - 1);
  box-shadow: var(--shadow-lg);
}
.sticky-cta__text { flex: 1; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.sticky-cta__cta {
  background: var(--gold-500);
  color: var(--neutral-900);
  font-weight: var(--weight-bold);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  border: 2px solid var(--neutral-0);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* =========================== TENANT NAME (replaceable) =====================
   Convención: TODA referencia al nombre del tenant (aseguradora cliente) debe
   envolverse en <span class="tenant-name">Tajy Seguros</span> para que se pueda
   reemplazar globalmente con un find/replace cuando se cambie de demo.
   No usar en cada saludo o frase — solo donde el tenant es el sujeto visible
   (login pre-screen, perfil, catálogo curado, footers admin).
   ============================================================================ */
.tenant-name { font-weight: var(--weight-semibold); }

/* =========================== LEVEL TRACK (pantalla 05) =====================
   Aesthetic Pablo Stanley / step apps: cards blancas limpias, número MEGA
   en Archivo Black, mint como acento de estado actual, no gradientes.
   ============================================================================ */
.level-track {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding: var(--space-3) var(--space-5);
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.level-track::-webkit-scrollbar { display: none; }

.level-pill {
  flex: 0 0 88px;
  height: 112px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  background: var(--neutral-0);
  border: 1.5px solid var(--neutral-300);
  scroll-snap-align: center;
  text-align: center;
  padding: var(--space-3) 6px;
}
.level-pill__num {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1;
  color: var(--neutral-900);
  letter-spacing: -0.04em;
}
.level-pill__meta {
  font-size: var(--text-xs);
  color: var(--neutral-500);
  font-weight: var(--weight-medium);
}
.level-pill__reward {
  font-size: 10px;
  color: var(--neutral-700);
  font-weight: var(--weight-medium);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Niveles ya superados: blanco con borde negro fuerte */
.level-pill--done {
  background: var(--neutral-0);
  border-color: var(--neutral-900);
  border-width: 1.5px;
}
.level-pill--done .level-pill__num   { color: var(--neutral-900); }
.level-pill--done .level-pill__meta  { color: var(--neutral-700); }

/* Nivel actual: fill mint, borde mint fuerte, pop sutil */
.level-pill--current {
  background: var(--success-100);
  border-color: var(--success-500);
  border-width: 2.5px;
  flex: 0 0 92px;
  height: 118px;
}
.level-pill--current .level-pill__num  { color: var(--neutral-900); }
.level-pill--current .level-pill__meta { color: #007a5b; font-weight: var(--weight-semibold); }

/* Bloqueados: gris muted con dashed */
.level-pill--locked {
  background: var(--neutral-100);
  border-color: var(--neutral-300);
}
.level-pill--locked .level-pill__num  { color: var(--neutral-500); }
.level-pill--locked .level-pill__meta { color: var(--neutral-500); }

/* =========================== BADGE GRID (sticker style) ====================
   Inspiración: Pablo Stanley clay/sticker. Outline negro 2px + sombra negra
   dura desplazada 3-4px (sin blur). Color flat por badge — sin gradientes
   repetidos. Da personalidad, deja de sentirse generado por IA.
   ============================================================================ */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4) var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.badge-tile {
  background: transparent;
  padding: 0;
  text-align: center;
  border: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.badge-tile__icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: var(--accent-300);
  color: var(--neutral-900);
  position: relative;
  border: 2.5px solid var(--neutral-900);
  box-shadow: 4px 4px 0 var(--neutral-900);
}
.badge-tile__icon i,
.badge-tile__icon svg { stroke-width: 2.5; }
.badge-tile__icon img { width: 36px; height: 36px; }

.badge-tile__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1.25;
  color: var(--neutral-900);
  margin-top: 2px;
}
.badge-tile__meta {
  font-size: 10px;
  color: var(--neutral-500);
}

/* Variantes de color flat — sticker */
.badge-tile__icon--yellow  { background: #FFE070; }
.badge-tile__icon--mint    { background: #7CF1CB; }
.badge-tile__icon--coral   { background: #FF8A6B; color: var(--neutral-0); }
.badge-tile__icon--violet  { background: var(--accent-300); }
.badge-tile__icon--orange  { background: #FFB547; }
.badge-tile__icon--blue    { background: #9DCEFF; }
.badge-tile__icon--bronze  { background: var(--level-bronze); color: var(--neutral-0); }
.badge-tile__icon--silver  { background: #DDE3ED; }
.badge-tile__icon--gold    { background: var(--gold-500); }
.badge-tile__icon--fire    { background: var(--streak-fire); color: var(--neutral-0); }
.badge-tile__icon--legend  { background: var(--level-legend); color: var(--neutral-0); }

/* Estado bloqueado — outline dashed gris, sin sombra dura */
.badge-tile--locked .badge-tile__icon {
  background: var(--neutral-0);
  border-color: var(--neutral-300);
  border-style: dashed;
  color: var(--neutral-300);
  box-shadow: 4px 4px 0 var(--neutral-300);
}
.badge-tile--locked .badge-tile__title { color: var(--neutral-500); }

/* =========================== STAT GRID ===================================== */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: 0 var(--space-4);
}
.stat-card {
  background: var(--neutral-0);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--neutral-300);
}
.stat-card__label {
  font-size: 10px;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--weight-semibold);
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-top: var(--space-2);
  letter-spacing: -0.02em;
  color: var(--neutral-900);
}
.stat-card__sub {
  font-size: 10px;
  color: var(--neutral-500);
  margin-top: 2px;
}

/* =========================== HORIZONTAL CARDS (carousel) =================== */
.h-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding: 0 var(--space-5) var(--space-3);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
}
.h-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  background: rgba(255,255,255,0.55);
}
.h-card__title { font-weight: var(--weight-bold); font-size: var(--text-base); margin-top: var(--space-3); }
.h-card__meta  { font-size: var(--text-xs); color: var(--neutral-700); margin-top: 2px; }

/* Ícono hero grande sticker — reemplaza al tile blanco chico. */
.h-card__big-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--neutral-0);
  border: 2.5px solid var(--neutral-900);
  box-shadow: 3px 3px 0 var(--neutral-900);
  margin: var(--space-2) 0;
  flex-shrink: 0;
  color: var(--neutral-900);
}
.h-card__big-icon i {
  width: 36px;
  height: 36px;
  stroke-width: 2.5;
}
.h-card__big-icon img { width: 44px; height: 44px; }

.h-card__big-icon--yellow { background: #FFDD66; }
.h-card__big-icon--mint   { background: #7CF1CB; }
.h-card__big-icon--coral  { background: #FF8A6B; color: var(--neutral-0); }
.h-card__big-icon--violet { background: var(--accent-500); color: var(--neutral-0); }
.h-card__big-icon--gold   { background: var(--gold-500); }
.h-card__big-icon--rot-l  { transform: rotate(-4deg); }
.h-card__big-icon--rot-r  { transform: rotate(4deg); }

/* Variantes de color para cards horizontales */
.h-card--yellow { background: #FFF4D1; }
.h-card--green  { background: #D4F5E9; }
.h-card--violet { background: #E8E4FF; }
.h-card--gold   { background: linear-gradient(135deg, #FFE9B0, #F8D26A); }

/* =========================== LIGA CARD ===================================== */
.league-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--neutral-0);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--neutral-300);
}
.league-card__shield {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #E8EBF1, var(--level-silver));
  display: grid; place-items: center;
  color: var(--primary-900);
  flex-shrink: 0;
}

/* =========================== ICONOS (decoración) =========================== */
.icon-tile {
  display: grid; place-items: center;
  border-radius: var(--radius-md);
}
.icon-tile--gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--neutral-900);
}
.icon-tile--fire {
  background: linear-gradient(135deg, #FFB547, var(--streak-fire));
  color: var(--neutral-0);
}
.icon-tile--accent {
  background: linear-gradient(135deg, var(--accent-300), var(--accent-500));
  color: var(--neutral-0);
}

/* Lucide icons defaults */
[data-lucide] {
  width: var(--icon-md);
  height: var(--icon-md);
  stroke-width: 2;
}
.icon-sm  { width: var(--icon-sm) !important; height: var(--icon-sm) !important; }
.icon-xs  { width: var(--icon-xs) !important; height: var(--icon-xs) !important; }
.icon-lg  { width: var(--icon-lg) !important; height: var(--icon-lg) !important; }
.icon-xl  { width: var(--icon-xl) !important; height: var(--icon-xl) !important; }

/* Animación de fuego sutil para chip de racha */
@keyframes flicker {
  0%, 100% { transform: rotate(-2deg) scale(1); }
  50%      { transform: rotate(2deg)  scale(1.08); }
}
.streak-icon { animation: flicker 1.8s ease-in-out infinite; transform-origin: center bottom; }
