/* ===========================================================
   Limpiecito.pe — Custom overrides sobre Tailwind
   =========================================================== */

/* Anchor scroll suave */
html { scroll-behavior: smooth; }

/* ===========================================================
   App Header — efecto cristal (glass) sobre el hero
   =========================================================== */
.app-header {
  /* Cristal con tinte de marca; el blur "agarra" el azul del hero detras */
  background: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(239,246,255,0.48) 100%);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
          backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.55);
  box-shadow:
    0 1px 0 0 rgba(37,99,235,0.05),
    0 8px 24px -16px rgba(15,23,42,0.10);
}

/* Fallback si el navegador no soporta backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app-header { background: rgba(255,255,255,0.92); }
}

/* Compensa la altura del header en paginas SIN hero (h-16 = 64px) */
body { padding-top: 64px; }
body.has-hero { padding-top: 0; }

/* Scroll del body — limpia cualquier inline overflow pegado y solo lo bloquea cuando hay modal/menu activo */
body { overflow-y: auto !important; }
body.no-scroll { overflow: hidden !important; }

/* En index, el hero queda DEBAJO del header de cristal */
body.has-hero .hero-bg { padding-top: 0; }

/* Focus visible accesible */
:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Tarjeta base */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-interactive { cursor: pointer; }
.card-interactive:hover { transform: translateY(-2px); }

/* Hero gradiente — fallback si la BD no tiene slides personalizados */
.hero-bg {
  background:
    radial-gradient(60% 60% at 80% 0%, rgba(56,189,248,0.18) 0%, rgba(56,189,248,0) 60%),
    radial-gradient(50% 50% at 0% 100%, rgba(37,99,235,0.10) 0%, rgba(37,99,235,0) 70%),
    linear-gradient(180deg, #F8FBFF 0%, #F3F6F9 100%);
}

/* Hero dinamico: transicion buttery-smooth del background al cambiar de slide */
.hero-dynamic {
  position: relative;
  overflow: hidden;
  transition: background 1400ms cubic-bezier(0.4, 0, 0.2, 1);
  background-size: cover !important;
  background-position: center !important;
}

/* Capa de imagen sobre el gradiente: posicion / efecto / opacidad propios */
.hero-image-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
  transition: opacity 1200ms cubic-bezier(0.4, 0, 0.2, 1),
              filter  1200ms cubic-bezier(0.4, 0, 0.2, 1),
              background-position 1200ms ease;
}

/* Corazon decorativo del hero — respiracion sutil */
.hero-heart {
  animation: heartFloat 6s ease-in-out infinite;
  transition: transform .3s ease;
}
.hero-heart:hover { transform: scale(1.08); }

@keyframes heartFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Slider stack: todos los slides ocupan la MISMA celda → crossfade en el sitio */
.hero-slider-stack {
  display: grid;
  position: relative;
}
.hero-slider-stack > .hero-slide {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

/* Reduce motion: respeta preferencia de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .hero-dynamic { transition: none; }
  .hero-heart   { animation: none; }
  .hero-slider-stack > .hero-slide { transition: none !important; }
}

/* Badge confianza */
.trust-pill {
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
}
.trust-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

/* Wizard step indicator */
.step-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--slate-200); color: var(--slate-500);
  font-weight: 700; font-size: .85rem;
}
.step-pill.active { background: var(--primary-blue); color: var(--white); }
.step-pill.done   { background: var(--mint); color: var(--white); }

.step-line { height: 3px; background: var(--slate-200); flex: 1; border-radius: 2px; }
.step-line.done { background: var(--mint); }

/* Select-card (radio tipo card) */
.select-card {
  position: relative;
  border: 2px solid var(--slate-200);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; gap: 12px; align-items: flex-start;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
  min-height: var(--tap-min);
}
.select-card:hover {
  border-color: var(--sky-blue);
  background: linear-gradient(180deg, #F8FBFF 0%, #FFFFFF 100%);
}
/* Estado seleccionado: borde y fondo solo en el label padre, sin sombra interna */
.select-card.selected,
.select-card:has(input:checked) {
  border-color: var(--primary-blue);
  background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
  box-shadow:
    0 0 0 4px rgba(42,79,190,0.08),       /* halo externo de marca, muy sutil */
    0 4px 12px -4px rgba(42,79,190,0.18); /* sombra externa suave */
}
.select-card:active { transform: scale(0.995); }
.select-card:focus-within {
  border-color: var(--primary-blue);
  box-shadow:
    0 0 0 4px rgba(107,183,232,0.30),
    0 4px 12px -4px rgba(42,79,190,0.18);
}

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: var(--tap-min);
  font-size: 1rem;
  color: var(--dark-navy);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
  outline: none;
}
.input.error, .textarea.error, .select.error { border-color: var(--danger); }

.label { font-size: .9rem; font-weight: 600; color: var(--slate-700); margin-bottom: 6px; display:block; }
.help  { font-size: .8rem; color: var(--slate-500); margin-top: 4px; }
.error-text { font-size: .8rem; color: var(--danger); margin-top: 4px; }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 600;
}
.badge-recibido    { background: #E0F2FE; color: #0369A1; }
.badge-revision    { background: #FEF3C7; color: #92400E; }
.badge-confirmado  { background: #DCFCE7; color: #166534; }
.badge-asignado    { background: #DDD6FE; color: #5B21B6; }
.badge-finalizado  { background: #E2E8F0; color: #334155; }
.badge-aprobado    { background: #DCFCE7; color: #166534; }
.badge-rechazado   { background: #FEE2E2; color: #991B1B; }
.badge-pendiente   { background: #FEF3C7; color: #92400E; }

/* WhatsApp floating */
.fab-whatsapp {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  z-index: 50;
  transition: transform .2s ease;
}
.fab-whatsapp:hover { transform: scale(1.06); }
.fab-whatsapp svg { width: 28px; height: 28px; color: white; }

/* Section anchor offset (sticky header) */
section[id] { scroll-margin-top: 80px; }

/* Animaciones suaves utilidad */
.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Scrollbar discreto */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

/* ===========================================================
   Intro overlay — "Limpia la mancha"
   =========================================================== */
.intro-overlay {
  position: fixed; inset: 0;
  z-index: 9999;
  display: none;                 /* JS la activa solo en la 1ª visita */
  align-items: center; justify-content: center;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  transition: opacity .6s ease;
  touch-action: none;
}
.intro-overlay.is-visible { display: flex; }
.intro-overlay.is-leaving { opacity: 0; pointer-events: none; }

/* Fondo con gradiente de marca + blobs */
.intro-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(56,189,248,0.35) 0%, rgba(56,189,248,0) 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(37,99,235,0.30) 0%, rgba(37,99,235,0) 70%),
    linear-gradient(180deg, #F0F7FF 0%, #E6F2FF 60%, #DCEBFF 100%);
  z-index: 0;
}
.intro-bg::before, .intro-bg::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(40px); opacity: .55;
}
.intro-bg::before {
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--primary-blue), transparent 70%);
  top: -60px; right: -40px;
  animation: introFloat 9s ease-in-out infinite;
}
.intro-bg::after {
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--sky-blue), transparent 70%);
  bottom: -80px; left: -60px;
  animation: introFloat 11s ease-in-out infinite reverse;
}
@keyframes introFloat {
  0%,100% { transform: translateY(0) translateX(0); }
  50%     { transform: translateY(-20px) translateX(10px); }
}

/* Stage central: logo + canvas encima */
.intro-stage {
  position: relative; z-index: 1;
  width: min(90vw, 520px);
  aspect-ratio: 1.6 / 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xl);
}

/* Logo grande detrás de la mancha */
.intro-logo {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(2.2rem, 9vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  user-select: none;
  text-align: center;
  filter: drop-shadow(0 6px 18px rgba(37,99,235,0.18));
}
.intro-logo .logo-heart { font-size: 1.05em; padding: 0 4px; }

/* Canvas encima del logo */
#intro-canvas {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='14' fill='%23ffffff' fill-opacity='0.85' stroke='%232563EB' stroke-width='2'/%3E%3Cpath d='M14 24c2-3 6-3 12-1' stroke='%2338BDF8' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") 20 20, crosshair;
  border-radius: var(--radius-xl);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

/* Sparkles al revelar */
.intro-sparkles { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.intro-overlay.revealed .intro-sparkles { opacity: 1; }
.intro-sparkles span {
  position: absolute; width: 10px; height: 10px;
  background: radial-gradient(circle, #fff 0%, var(--sky-blue) 60%, transparent 70%);
  border-radius: 50%;
  animation: sparkle 1.2s ease-out forwards;
}
.intro-sparkles span:nth-child(1) { top: 10%; left: 18%; animation-delay: .05s; }
.intro-sparkles span:nth-child(2) { top: 22%; right: 14%; animation-delay: .15s; }
.intro-sparkles span:nth-child(3) { bottom: 18%; left: 26%; animation-delay: .25s; }
.intro-sparkles span:nth-child(4) { bottom: 24%; right: 22%; animation-delay: .12s; }
.intro-sparkles span:nth-child(5) { top: 50%; left: 10%; animation-delay: .30s; }
.intro-sparkles span:nth-child(6) { top: 50%; right: 12%; animation-delay: .20s; }
@keyframes sparkle {
  0%   { opacity: 0; transform: scale(0); }
  40%  { opacity: 1; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(0.6) translateY(-12px); }
}

.intro-overlay.revealed .intro-logo {
  animation: logoPop .7s cubic-bezier(.2,.9,.3,1.4) both;
}
@keyframes logoPop {
  0%   { transform: scale(.92); }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1.00); }
}

.intro-hint {
  position: relative; z-index: 1;
  margin-top: 22px;
  font-size: .95rem;
  color: var(--slate-600);
  text-align: center;
  font-weight: 500;
}
.intro-hint-mobile  { display: inline; }
.intro-hint-desktop { display: none; }
@media (hover: hover) and (pointer: fine) {
  .intro-hint-mobile  { display: none; }
  .intro-hint-desktop { display: inline; }
}
.intro-overlay.revealed .intro-hint { opacity: 0; transition: opacity .3s ease; }

.intro-skip {
  position: absolute; top: 14px; right: 14px;
  z-index: 4;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  font-size: .85rem; font-weight: 600;
  cursor: pointer;
}
.intro-skip:hover { background: white; }
@media (prefers-reduced-motion: reduce) {
  .intro-overlay { display: none !important; }
}

/* ===========================================================
   Design upgrade — micro-interactions perpetuas y refinamiento
   =========================================================== */

/* Service card hero: shimmer perpetuo sutil sobre el fondo */
.service-card-hero {
  position: relative;
}
.service-card-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 35%,
    rgba(42,79,190,0.06) 50%,
    transparent 65%);
  background-size: 200% 100%;
  animation: shimmerSweep 6s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
}
@keyframes shimmerSweep {
  0%, 100% { background-position: 200% 0; }
  50%      { background-position: -50% 0; }
}

/* Service arrow: leve push horizontal en hover */
.service-card:hover .service-arrow i { transform: translateX(3px); }

/* Tactile feedback — empuja 1px en active */
.btn-cta:active,
.btn-secondary:active,
.card-interactive:active { transform: translateY(1px) scale(0.99); }

/* Botón CTA con shimmer perpetuo (atrae la mirada sin ser molesto) */
.btn-cta {
  position: relative;
  overflow: hidden;
}
.btn-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255,255,255,0.18) 50%,
    transparent 70%);
  background-size: 250% 100%;
  animation: shimmerSweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

/* Status dots — pulse mas sutil y "vivo" */
@keyframes softPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.25); }
}
.staff-card span.bg-emerald-500.animate-pulse {
  animation: softPulse 2.4s ease-in-out infinite !important;
}

/* Staff card destacada (Top): scale sutil + ring tinted */
.staff-card:has([class*="badge-aprobado"]) {
  transform: scale(1.015);
  box-shadow: 0 8px 28px -12px rgba(42,79,190,0.18);
}

/* Servicios card no-hero: stagger reveal en mount */
.service-card {
  animation: cardRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.service-card:nth-child(1) { animation-delay: 0.05s; }
.service-card:nth-child(2) { animation-delay: 0.15s; }
.service-card:nth-child(3) { animation-delay: 0.25s; }
.service-card:nth-child(4) { animation-delay: 0.35s; }
@keyframes cardRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Logo letras con tracking apretado (look mas premium con Geist) */
.logo-main, .logo-domain { letter-spacing: -0.02em; }

/* Headlines con tracking tighter (skill exige tracking-tighter) */
h1 { letter-spacing: -0.025em; }
h2 { letter-spacing: -0.02em; }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  .service-card-hero::after,
  .btn-cta::before,
  .service-card { animation: none; }
}

/* ===========================================================
   Slider de Servicios — fade lateral + flechas circulares
   =========================================================== */
.services-slider { padding: 4px 0; }

.services-track {
  /* Oculta scrollbar nativa */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Fade lateral muy sutil (solo insinua el corte, no bloquea contenido) */
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0.55) 0,
    #000 18px,
    #000 calc(100% - 18px),
    rgba(0,0,0,0.55) 100%);
          mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0.55) 0,
    #000 18px,
    #000 calc(100% - 18px),
    rgba(0,0,0,0.55) 100%);
}
.services-track::-webkit-scrollbar { display: none; }

/* En mobile: fade casi imperceptible para no recortar las cards */
@media (max-width: 767px) {
  .services-track {
    -webkit-mask-image: linear-gradient(
      to right,
      rgba(0,0,0,0.7) 0,
      #000 8px,
      #000 calc(100% - 8px),
      rgba(0,0,0,0.7) 100%);
            mask-image: linear-gradient(
      to right,
      rgba(0,0,0,0.7) 0,
      #000 8px,
      #000 calc(100% - 8px),
      rgba(0,0,0,0.7) 100%);
  }
}

/* Flechas circulares — gradiente de marca + glass */
.services-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 46px;
  height: 46px;
  border-radius: 9999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 50%),
    linear-gradient(135deg, #2A4FBE 0%, #3D6FE0 50%, #6BB7E8 100%);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -1px 0 rgba(15,23,42,0.12) inset,
    0 2px 4px rgba(15,23,42,0.08),
    0 10px 24px -8px rgba(42,79,190,0.45);
  transition:
    transform .25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow .25s ease,
    filter .2s ease;
  cursor: pointer;
}
.services-arrow.md\:flex { display: flex; }
@media (min-width: 768px) {
  .services-slider .services-arrow.hidden\:md\:flex,
  .services-arrow { display: flex; }
}
.services-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  filter: brightness(1.05) saturate(1.05);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -1px 0 rgba(15,23,42,0.12) inset,
    0 4px 8px rgba(15,23,42,0.10),
    0 18px 36px -10px rgba(42,79,190,0.55);
}
.services-arrow:active { transform: translateY(-50%) scale(0.96); transition-duration: .08s; }
.services-arrow:focus-visible {
  outline: none;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 0 0 3px rgba(107,183,232,0.6),
    0 10px 24px -8px rgba(42,79,190,0.45);
}
.services-arrow-left  { left: -22px; }
.services-arrow-right { right: -22px; }

/* Service card: aro/borde superior que se intensifica en hover */
.service-card { isolation: isolate; }
.service-top-border { opacity: .35; transition: opacity .3s ease, height .3s ease; }
.service-card:hover .service-top-border { opacity: 1; height: 3px; }

.service-card:hover .service-cta i { transform: translateX(4px); }

/* Cuando hay snap activo, suavizar el "encaje" */
.services-track > .service-slot { scroll-snap-stop: always; }

/* Tablet: no mostrar fade tan agresivo */
@media (min-width: 768px) and (max-width: 1023px) {
  .services-arrow-left  { left: -8px; }
  .services-arrow-right { right: -8px; }
}

/* Cover de la card de personal — fotografía temática difuminada */
.staff-cover {
  filter: blur(3px) saturate(1.05);
  transform: scale(1.08);  /* compensa el blur para que no asomen bordes blancos */
  transition: filter .35s ease, transform .35s ease;
}
.staff-card:hover .staff-cover {
  filter: blur(1px) saturate(1.1);
  transform: scale(1.04);
}
@media (prefers-reduced-motion: reduce) {
  .staff-cover { transition: none; }
}

/* ============================================================
   Service card — imagen como TEXTURA de fondo (no banner)
   La foto cubre todo el card, muy difuminada y con baja
   opacidad. Encima va un velo blanco con tinte de marca para
   asegurar legibilidad del texto.
   ============================================================ */
.service-cover-bg {
  filter: blur(18px) saturate(1.2);
  transform: scale(1.2);
  opacity: 0.06;
  transition: filter .4s ease, transform .4s ease, opacity .4s ease;
  z-index: 0;
}
.service-card:hover .service-cover-bg {
  opacity: 0.10;
  transform: scale(1.14);
  filter: blur(14px) saturate(1.25);
}

/* Velo: blanco casi solido con leve tinte de marca */
.service-veil {
  background:
    linear-gradient(135deg, rgba(42,79,190,0.025) 0%, rgba(107,183,232,0.02) 100%),
    linear-gradient(180deg,
      rgba(255,255,255,0.92) 0%,
      rgba(255,255,255,0.97) 50%,
      rgba(255,255,255,0.99) 100%);
  z-index: 0;
  transition: background .35s ease;
}
.service-card:hover .service-veil {
  background:
    linear-gradient(135deg, rgba(42,79,190,0.035) 0%, rgba(107,183,232,0.025) 100%),
    linear-gradient(180deg,
      rgba(255,255,255,0.88) 0%,
      rgba(255,255,255,0.95) 50%,
      rgba(255,255,255,0.98) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .service-cover-bg, .service-veil { transition: none; }
  .service-card:hover .service-cover-bg { transform: scale(1.18); }
}

/* ============================================================
   STEPS SECTION — Tabs con video loops sobre fondo azul #0073FF
   con imagen parallax detras
   ============================================================ */
.steps-section {
  --steps-bg-image: url('/uploads/media/Limpieza.png'); /* cambia el archivo en /uploads/media/ para reemplazar */
  position: relative;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  /* Color base de respaldo (si la imagen falla) */
  background-color: #0073FF;
}

/* Capa parallax: imagen de fondo + tint azul de marca encima.
   Un solo pseudo-elemento con multi-background para mejor performance.
   El gradiente azul queda ARRIBA de la imagen (capa primera en CSS) y la imagen
   queda detras (segunda capa) — permite ver la imagen tintada para mantener el
   contraste con los textos blancos. */
.steps-section::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background:
    /* Tint azul de marca (cubre la imagen para mantener contraste) */
    radial-gradient(80% 50% at 50% 0%, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(0,115,255,0.70) 0%, rgba(0,90,200,0.85) 100%),
    /* Imagen de fondo con parallax */
    var(--steps-bg-image) center/cover no-repeat fixed;
}

/* En mobile NO usamos background-attachment: fixed (rinde mal en iOS/Android).
   Dejamos la imagen que se mueva con el scroll naturalmente. */
@media (max-width: 1023px) {
  .steps-section::before {
    background-attachment: scroll;
    background:
      radial-gradient(80% 50% at 50% 0%, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 60%),
      linear-gradient(180deg, rgba(0,115,255,0.70) 0%, rgba(0,90,200,0.85) 100%),
      var(--steps-bg-image) center/cover no-repeat scroll;
  }
}

/* Patron de puntos blancos translucidos sobre el azul */
.steps-section__pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, rgba(0,0,0,0.4) 65%, transparent 100%);
          mask-image: radial-gradient(ellipse at center, #000 25%, rgba(0,0,0,0.4) 65%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Blobs flotantes ambiente */
.steps-section__blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}
.steps-section__blob--1 {
  top: -80px; left: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(107,183,232,0.55) 0%, rgba(107,183,232,0) 70%);
  animation: stepsBlob 14s ease-in-out infinite;
}
.steps-section__blob--2 {
  bottom: -100px; right: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0) 70%);
  animation: stepsBlob 18s ease-in-out infinite reverse;
}
@keyframes stepsBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, -30px) scale(1.1); }
}

/* Encabezado */
.steps-eyebrow {
  display: inline-block;
  padding: 7px 16px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 9999px;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.steps-headline {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0;
  line-height: 1.15;
}
.steps-headline-accent {
  background: linear-gradient(135deg, #FFFFFF 0%, #BFDBFE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-style: italic;
}
.steps-subtitle {
  margin: 12px 0 0;
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  line-height: 1.55;
}
@media (min-width: 768px) {
  .steps-headline { font-size: 40px; }
  .steps-subtitle { font-size: 17px; }
}

/* ====== TABS ====== */
.steps-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 auto 20px;
  max-width: 880px;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .steps-tabs {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 6px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 9999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}
.steps-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  border-radius: 9999px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}
@media (min-width: 768px) {
  .steps-tab { border: none; background: transparent; }
}
.steps-tab:hover {
  background: rgba(255,255,255,0.18);
}
.steps-tab.is-active {
  background: var(--white);
  color: var(--primary-blue);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 8px 18px -6px rgba(15,23,42,0.30);
}
.steps-tab.is-active .steps-tab__num {
  background: var(--primary-blue);
  color: var(--white);
}
.steps-tab__num {
  width: 26px; height: 26px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.40);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.steps-tab.is-active .steps-tab__num { border-color: var(--primary-blue); }
.steps-tab__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  .steps-tab__label { white-space: normal; }
}

/* ====== PANELES ====== */
.steps-panels {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
}
.steps-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  background: var(--white);
  color: var(--dark-navy);
  border-radius: 24px;
  padding: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 24px 48px -16px rgba(15,23,42,0.35);
  overflow: hidden;
}
@media (min-width: 768px) {
  .steps-panel {
    grid-template-columns: 1.2fr 1fr;
    padding: 24px;
    gap: 28px;
  }
}

/* Media (video o placeholder) */
.steps-panel__media {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
}
.steps-panel__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.steps-panel__placeholder {
  text-align: center;
  padding: 24px;
  color: var(--slate-500);
}
.steps-panel__placeholder-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(42,79,190,0.12) 0%, rgba(107,183,232,0.20) 100%);
  border: 1px solid rgba(42,79,190,0.16);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.steps-panel__placeholder-icon i {
  width: 28px; height: 28px;
  color: var(--primary-blue);
}
.steps-panel__placeholder-text {
  font-size: 14px; font-weight: 600;
  color: var(--dark-navy);
  margin: 0 0 4px;
}
.steps-panel__placeholder-hint {
  font-size: 11.5px;
  color: var(--slate-500);
  margin: 0;
}
.steps-panel__placeholder-hint code {
  background: var(--slate-100);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--slate-700);
}

/* Contenido textual */
.steps-panel__content {
  padding: 6px 4px;
  display: flex; flex-direction: column;
  justify-content: center;
}
@media (min-width: 768px) {
  .steps-panel__content { padding: 8px 12px; }
}
.steps-panel__num {
  display: inline-block;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-blue);
  background: rgba(42,79,190,0.08);
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 10px;
}
.steps-panel__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark-navy);
  margin: 0 0 8px;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .steps-panel__title { font-size: 26px; }
}
.steps-panel__desc {
  font-size: 15px;
  color: var(--slate-600);
  line-height: 1.6;
  margin: 0 0 16px;
}

.steps-panel__features {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.steps-panel__features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px;
  color: var(--slate-700);
}
.steps-panel__features li i {
  width: 18px; height: 18px;
  padding: 3px;
  border-radius: 9999px;
  background: rgba(34,198,154,0.16);
  color: #15A876;
  flex-shrink: 0;
}

/* ====== Botones unificados con el gradiente azul de marca ====== */
.steps-panel__cta,
.steps-main-cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 9999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(135deg, #2A4FBE 0%, #3D6FE0 45%, #6BB7E8 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -1px 0 rgba(15,23,42,0.10) inset,
    0 2px 4px rgba(15,23,42,0.08),
    0 10px 24px -8px rgba(42,79,190,0.55);
  transition:
    transform .25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow .25s ease,
    filter .2s ease;
  width: fit-content;
}
.steps-panel__cta:hover,
.steps-main-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.05) saturate(1.05);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.40) inset,
    0 -1px 0 rgba(15,23,42,0.10) inset,
    0 4px 8px rgba(15,23,42,0.10),
    0 18px 36px -10px rgba(42,79,190,0.65);
}
.steps-panel__cta:active,
.steps-main-cta:active {
  transform: translateY(0) scale(0.98);
  transition-duration: .08s;
}
.steps-panel__cta i,
.steps-main-cta i {
  width: 16px; height: 16px;
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.steps-panel__cta:hover i,
.steps-main-cta:hover i { transform: translateX(3px); }

/* CTA principal lleva un poco mas de presencia (mas grande + sombra mas alta) */
.steps-main-cta {
  z-index: 1;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -1px 0 rgba(15,23,42,0.10) inset,
    0 2px 4px rgba(15,23,42,0.08),
    0 14px 36px -10px rgba(15,23,42,0.45),
    0 0 0 1px rgba(255,255,255,0.18);          /* anillo blanco fino para destacar sobre el bg azul */
}
.steps-main-cta:hover {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.40) inset,
    0 -1px 0 rgba(15,23,42,0.10) inset,
    0 4px 8px rgba(15,23,42,0.10),
    0 22px 48px -10px rgba(15,23,42,0.55),
    0 0 0 1px rgba(255,255,255,0.30);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .steps-section__blob,
  .steps-section__blob--1,
  .steps-section__blob--2 { animation: none !important; }
  .steps-panel { transition: none; }
}

/* ============================================================
   PERFIL DE PERSONAL — modo APP (mobile-first, web-friendly)
   personal-detalle.php
   ============================================================ */

.profile-app {
  /* mobile = pantalla app: sin fondo gris detras de la card */
  background: var(--white);
  min-height: 100vh;
}
@media (min-width: 768px) {
  .profile-app {
    background: var(--soft-bg);
  }
}

/* ----- Top bar morphing (mobile) ----- */
.profile-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0) 100%);
  transition: background .25s ease, backdrop-filter .25s ease, box-shadow .25s ease;
  backdrop-filter: blur(0px);
}
.profile-topbar--solid {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(15,23,42,0.06);
}
.profile-topbar__btn {
  width: 40px; height: 40px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.95);
  color: var(--dark-navy);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px -4px rgba(15,23,42,0.25);
  border: 1px solid rgba(255,255,255,0.4);
  transition: transform .15s ease, background .15s ease;
}
.profile-topbar__btn:active { transform: scale(0.94); }
.profile-topbar--solid .profile-topbar__btn {
  background: var(--white);
  box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 2px 6px rgba(15,23,42,0.04);
}
.profile-topbar__title {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dark-navy);
  font-size: 15px;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* En mobile: cuando hay topbar sticky, ocultamos el header global del sitio
   para que la app sea inmersiva. El usuario sigue teniendo el back. */
@media (max-width: 767px) {
  body.has-app-view .app-header { display: none !important; }
  body.has-app-view main { padding-top: 0 !important; }
}

/* ----- Banner ----- */
.profile-hero { position: relative; }

.profile-banner {
  position: relative;
  height: 260px;
  overflow: hidden;
  margin-top: -56px; /* compensa la topbar absoluta para banner edge-to-edge */
}
@media (min-width: 768px) {
  .profile-banner {
    height: 320px;
    margin-top: 16px;
    margin-left: max(16px, calc(50vw - 28rem + 16px));
    margin-right: max(16px, calc(50vw - 28rem + 16px));
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }
}
.profile-banner__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.profile-banner__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.20) 0%, rgba(15,23,42,0.10) 50%, rgba(15,23,42,0.30) 100%);
}
.profile-banner__tags {
  position: absolute;
  bottom: 16px; left: 16px;
  display: flex; gap: 8px;
}
.profile-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.profile-tag--cat { text-transform: uppercase; }
.profile-tag--avail { color: #047857; }
.profile-tag--top {
  position: absolute;
  top: 16px; right: 16px;
  background: #FCD34D; color: #78350F;
  font-weight: 700;
  box-shadow: 0 4px 10px -4px rgba(15,23,42,0.30);
}
.dot { width: 6px; height: 6px; border-radius: 9999px; background: #10B981; }
.dot--pulse { animation: softPulse 2.4s ease-in-out infinite; }

/* ----- Curva + Avatar ----- */
.profile-curve {
  position: relative;
  background: var(--white);
}
.profile-curve > svg {
  display: block;
  width: 100%; height: 28px;
  margin-top: -16px;
}
@media (min-width: 768px) {
  .profile-curve {
    margin-left: max(16px, calc(50vw - 28rem + 16px));
    margin-right: max(16px, calc(50vw - 28rem + 16px));
  }
}

.profile-avatar {
  position: absolute;
  top: -88px;            /* mobile: avatar grande sobre el banner */
  left: 50%;
  transform: translateX(-50%);
  width: 168px; height: 168px;
  border-radius: 9999px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 6px var(--white),
    0 16px 32px -12px rgba(15,23,42,0.30);
  z-index: 5;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar__initials {
  font-size: 56px; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
}
@media (min-width: 768px) {
  .profile-avatar {
    width: 200px; height: 200px;
    top: -100px;
    left: max(40px, calc(50vw - 28rem + 40px));
    transform: none;
  }
  .profile-avatar__initials { font-size: 72px; }
}

/* ----- Identidad (centrada en mobile) ----- */
.profile-identity {
  background: var(--white);
  padding: 90px 20px 16px;
  text-align: center;
}
@media (min-width: 768px) {
  .profile-identity {
    margin-left: max(16px, calc(50vw - 28rem + 16px));
    margin-right: max(16px, calc(50vw - 28rem + 16px));
    padding: 24px 40px 16px;
    padding-left: 280px;
    text-align: left;
    min-height: 110px;
    display: flex; flex-direction: column; justify-content: center;
  }
}
.profile-name {
  font-size: 24px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--dark-navy);
  margin: 0;
}
.profile-role {
  font-size: 14px; color: var(--slate-500); margin: 4px 0 0;
}
@media (min-width: 768px) {
  .profile-name { font-size: 32px; }
  .profile-role { font-size: 15px; }
}

/* ----- Stats pills ----- */
.profile-stats {
  background: var(--white);
  padding: 8px 16px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 768px) {
  .profile-stats {
    margin-left: max(16px, calc(50vw - 28rem + 16px));
    margin-right: max(16px, calc(50vw - 28rem + 16px));
    padding: 12px 40px 24px;
    gap: 12px;
  }
}
.profile-stat {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 14px;
  border: 1px solid #EEF2F7;
  min-width: 0;
}
.profile-stat__icon { width: 18px; height: 18px; flex-shrink: 0; }
.profile-stat__icon--amber { color: #F59E0B; fill: #F59E0B; }
.profile-stat__icon--blue  { color: var(--primary-blue); }
.profile-stat__icon--mint  { color: #059669; }
.profile-stat__value {
  font-size: 15px; font-weight: 700; color: var(--dark-navy); line-height: 1.1;
  margin: 0; white-space: nowrap;
}
.profile-stat__label {
  font-size: 10px; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.04em;
  margin: 2px 0 0; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ----- Secciones ----- */
.profile-sections {
  background: var(--soft-bg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  margin-top: 8px;
}
@media (min-width: 768px) {
  .profile-sections {
    background: transparent;
    margin: 16px auto 0;
    max-width: 56rem;
    padding: 0 16px 24px;
    gap: 16px;
    border-radius: 0;
  }
}

.profile-section {
  background: var(--white);
  border-radius: 18px;
  padding: 18px 18px 20px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
@media (min-width: 768px) {
  .profile-section {
    border-radius: 16px;
    padding: 20px 24px 22px;
    box-shadow: var(--shadow-sm);
  }
}
.profile-section__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0 0 10px;
}
.profile-section__text {
  font-size: 15px; color: var(--slate-700); margin: 0; line-height: 1.55;
}

/* Chips de habilidades */
.profile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(42,79,190,0.06);
  color: var(--primary-blue);
  border: 1px solid rgba(42,79,190,0.12);
}

/* Experiencia grid */
.profile-exp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .profile-exp-grid { grid-template-columns: 1fr 1fr; }
}
.profile-exp-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
}
.profile-exp-item__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-exp-item__icon i { width: 18px; height: 18px; }
.profile-exp-item__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--dark-navy); line-height: 1.2; }
.profile-exp-item__sub   { margin: 2px 0 0; font-size: 12px; color: var(--slate-500); }

/* Zona */
.profile-zone {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: #F1F5F9;
  border-radius: 9999px;
  font-size: 13px;
  color: var(--slate-700);
}
.profile-zone strong { color: var(--dark-navy); }
.profile-zone__sep { color: var(--slate-400); margin: 0 2px; }

/* CTA card desktop */
.profile-cta-card { padding: 28px 24px; text-align: center; }
.profile-cta-card__eyebrow {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 4px;
}
.profile-cta-card__title {
  font-size: 22px; font-weight: 800; color: var(--dark-navy); letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.profile-cta-card__text {
  font-size: 14px; color: var(--slate-600); margin: 0 auto;
  max-width: 28rem;
}
.profile-cta-card__actions {
  margin-top: 18px;
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ----- Sticky bottom CTA (mobile) ----- */
.profile-bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 -8px 24px -8px rgba(15,23,42,0.10);
}
.profile-bottom-bar .btn-cta { width: 100%; padding: 14px 20px; }

@media (prefers-reduced-motion: reduce) {
  .profile-topbar { transition: none; }
}

/* ============================================================
   SITE LOGO — imagen reemplazando el logo de texto
   ============================================================ */
.site-logo {
  display: inline-block;
  object-fit: contain;
  /* Evita el "salto" del layout antes de que cargue la imagen */
  max-width: 100%;
}

/* En el header glass sobre hero claro la marca queda nítida; sobre fondos
   oscuros (CTA, footer azul si los hay) podemos invertir si se necesita. */
.has-hero .app-header .site-logo { /* sin filter, mantiene el color original */ }

/* Logo en el card del login */
.login-brand {
  display: inline-flex;
  margin-bottom: 18px;
}
.login-brand__img {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(42,79,190,0.18));
}
@media (max-width: 767px) {
  .login-brand__img { height: 48px; }
}

/* ============================================================
   LOGIN PAGE — composicion brandeada
   ============================================================ */
.login-main {
  position: relative;
  display: flex;
  align-items: flex-start;          /* card pegado arriba, sin centrado vertical */
  justify-content: center;
  padding: 96px 16px 32px;          /* bottom 32px en lugar de 64 */
  /* Sin min-height: el section solo es tan alto como su contenido + padding. */
}

/* El footer (que tiene mt-16 global) se pega al login-main sin gap extra */
.login-main + footer { margin-top: 0 !important; }

/* Fondo: gradiente sutil + blobs flotantes de marca */
.login-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(107,183,232,0.18) 0%, rgba(107,183,232,0) 60%),
    radial-gradient(50% 50% at 10% 100%, rgba(42,79,190,0.12) 0%, rgba(42,79,190,0) 60%),
    linear-gradient(180deg, #F4F8FD 0%, #FFFFFF 50%, #F4F8FD 100%);
  overflow: hidden;            /* solo los blobs estan recortados, el card NO */
  pointer-events: none;
}
.login-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}

/* Overlay oscuro encima de la imagen de fondo (configurable desde admin) */
.login-overlay {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Cuando hay imagen de fondo, el card refuerza un poco mas su backdrop
   para garantizar legibilidad sobre cualquier foto */
.login-main--has-image .login-card {
  background: rgba(255,255,255,0.96);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 16px 48px -12px rgba(15,23,42,0.40),
    0 4px 16px -4px rgba(15,23,42,0.20);
}
.login-blob--1 {
  width: 320px; height: 320px;
  top: -80px; right: -60px;
  background: radial-gradient(circle, #6BB7E8 0%, transparent 70%);
  animation: blobFloat 14s ease-in-out infinite;
}
.login-blob--2 {
  width: 280px; height: 280px;
  bottom: -100px; left: -60px;
  background: radial-gradient(circle, #2A4FBE 0%, transparent 70%);
  animation: blobFloat 18s ease-in-out infinite reverse;
}
.login-blob--3 {
  width: 200px; height: 200px;
  top: 40%; left: 50%;
  background: radial-gradient(circle, #22C69A 0%, transparent 70%);
  opacity: 0.18;
  animation: blobFloat 22s ease-in-out infinite;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(20px, -20px) scale(1.1); }
}

.login-wrap {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 420px;
}

/* Card */
.login-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 24px;
  padding: 36px 28px 28px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 12px 40px -12px rgba(15,23,42,0.18),
    0 4px 16px -4px rgba(42,79,190,0.10);
}
@media (min-width: 640px) { .login-card { padding: 44px 36px 32px; } }

.login-card__head { text-align: center; }
.login-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 50%),
    linear-gradient(135deg, rgba(42,79,190,0.10) 0%, rgba(107,183,232,0.16) 100%);
  border: 1px solid rgba(42,79,190,0.10);
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 8px 20px -8px rgba(42,79,190,0.25);
}
.login-icon svg { width: 30px; height: 30px; }
.login-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--dark-navy); margin: 0; }
@media (min-width: 640px) { .login-title { font-size: 24px; } }
.login-sub { margin: 8px 0 0; font-size: 14px; color: var(--slate-600); line-height: 1.5; }
.login-sub--standalone { margin: 0 0 4px; text-align: center; font-size: 13px; color: var(--slate-500); }

.login-error { margin-top: 20px; padding: 11px 14px; border-radius: 12px; background: #FFF1F2; border: 1px solid #FECDD3; color: #BE123C; font-size: 13px; display: flex; align-items: flex-start; gap: 8px; }
.login-ok { margin-top: 16px; padding: 11px 14px; border-radius: 12px; background: #ECFDF5; border: 1px solid #A7F3D0; color: #047857; font-size: 13px; display: flex; align-items: flex-start; gap: 8px; }

/* === Tabs Login / Registro === */
.login-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: #F1F5F9; border-radius: 9999px; padding: 4px; margin-bottom: 24px; isolation: isolate; }
.login-tab { position: relative; z-index: 1; padding: 9px 12px; border: none; background: transparent; font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; color: var(--slate-500); cursor: pointer; border-radius: 9999px; transition: color .25s ease; }
.login-tab.is-active { color: var(--white); }
.login-tab__indicator {
  position: absolute; z-index: 0; top: 4px; bottom: 4px;
  width: calc(50% - 4px);
  border-radius: 9999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 50%),
    linear-gradient(135deg, #2A4FBE 0%, #3D6FE0 50%, #6BB7E8 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.30) inset, 0 6px 14px -6px rgba(42,79,190,0.55);
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-tab__indicator.left  { transform: translateX(0); }
.login-tab__indicator.right { transform: translateX(100%); }

/* === Form === */
.login-form { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.login-field { display: block; }
.login-field__label { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-500); margin-bottom: 6px; }
.login-field__wrap { position: relative; display: flex; align-items: center; }
.login-field__icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--slate-400); pointer-events: none; }
.login-field__input { width: 100%; padding: 12px 12px 12px 38px; border-radius: 12px; border: 1.5px solid var(--slate-200); background: var(--white); font-size: 14px; color: var(--dark-navy); transition: border-color .2s ease, box-shadow .2s ease; -webkit-appearance: none; }
.login-field__input::placeholder { color: var(--slate-400); }
.login-field__input:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(42,79,190,0.12); }
.login-field__eye { position: absolute; right: 8px; width: 32px; height: 32px; border: none; background: transparent; color: var(--slate-400); display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; transition: color .2s ease, background .2s ease; }
.login-field__eye:hover { color: var(--primary-blue); background: rgba(42,79,190,0.06); }

.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; margin-top: 2px; }
.login-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--slate-700); font-size: 13px; }
.login-check--block { display: flex; align-items: flex-start; line-height: 1.45; }
.login-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary-blue); flex-shrink: 0; margin-top: 1px; }
.login-link { color: var(--primary-blue); font-weight: 600; text-decoration: none; }
.login-link:hover { text-decoration: underline; }

.login-submit { width: 100%; margin-top: 8px; padding: 13px 22px; font-size: 15px; }

.login-divider { position: relative; text-align: center; margin: 10px 0 4px; color: var(--slate-400); font-size: 12px; font-weight: 500; }
.login-divider::before, .login-divider::after { content: ""; position: absolute; top: 50%; width: calc(50% - 24px); height: 1px; background: var(--slate-200); }
.login-divider::before { left: 0; }
.login-divider::after  { right: 0; }
.login-divider span { background: rgba(255,255,255,0.92); padding: 0 10px; position: relative; z-index: 1; }

.login-google { margin-top: 24px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 13px 18px; background: var(--white); border: 1px solid #DADCE0; border-radius: 12px; color: #1F1F1F; font-size: 15px; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 1px 2px rgba(15,23,42,0.06), 0 4px 12px -4px rgba(15,23,42,0.08); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease; -webkit-tap-highlight-color: transparent; }
.login-google:hover { transform: translateY(-1px); border-color: #C9CCD1; background: #FAFBFC; box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 2px 4px rgba(15,23,42,0.08), 0 12px 28px -8px rgba(15,23,42,0.18); }
.login-google:active { transform: translateY(0) scale(0.99); transition-duration: .08s; }
.login-google:focus-visible { outline: none; border-color: #4285F4; box-shadow: 0 0 0 3px rgba(66,133,244,0.20); }
.login-google__icon { width: 18px; height: 18px; flex-shrink: 0; }

.login-benefits { list-style: none; margin: 24px 0 0; padding: 16px; background: rgba(248,250,252,0.7); border: 1px solid #EEF2F7; border-radius: 14px; display: flex; flex-direction: column; gap: 10px; }
.login-benefits li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--slate-700); }
.login-benefits__icon { width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.login-benefits__icon--blue  { background: rgba(42,79,190,0.10); color: var(--primary-blue); }
.login-benefits__icon--mint  { background: rgba(34,198,154,0.12); color: #15A876; }
.login-benefits__icon--amber { background: rgba(245,158,11,0.14); color: #B45309; }

.login-fineprint { margin: 18px 0 0; font-size: 11px; line-height: 1.55; color: var(--slate-500); text-align: center; }
.login-fineprint a { color: var(--primary-blue); font-weight: 500; }
.login-fineprint a:hover { text-decoration: underline; }

.login-back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 9999px; font-size: 13px; font-weight: 600; text-decoration: none; width: fit-content; background: rgba(255,255,255,0.92); color: var(--dark-navy); border: 1px solid rgba(255,255,255,0.55); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 4px 12px -4px rgba(15,23,42,0.18); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.login-back:hover { background: var(--white); transform: translateX(-2px); box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 6px 16px -4px rgba(15,23,42,0.22); }
.login-back:active { transform: translateX(-2px) scale(0.98); }
.login-back i, .login-back svg { transition: transform .2s ease; }
.login-back:hover i, .login-back:hover svg { transform: translateX(-2px); }
.login-back--top { display: inline-flex; margin: 0 0 16px 0; }

@media (max-width: 767px) {
  /* === LOGIN MOBILE — SPACING FIX v4 ===
     Card pegado al header al ras (header 64px = padding-top 64px, 0px de gap).
     Pildora "Volver al inicio" compacta y con margin minimo para no inflar el alto. */
  body.no-tabbar main.login-main {
    align-items: flex-start !important;
    padding: 64px 14px 24px !important;
    min-height: 0 !important;
  }
  /* Pildora compacta — minimo alto visual entre header y card */
  body.no-tabbar .login-back--top {
    margin: 6px 0 6px 0 !important;
    padding: 4px 10px 4px 8px !important;
    font-size: 11px !important;
  }
  body.no-tabbar .login-back--top i,
  body.no-tabbar .login-back--top svg {
    width: 12px !important;
    height: 12px !important;
  }
  /* Footer respira con su margin-top natural cuando viene despues del login */
  body.no-tabbar main.login-main + footer { margin-top: 48px !important; }
  /* Y el card aporta su propio "buffer" inferior (no depende de adjacency) */
  body.no-tabbar .login-wrap { margin-bottom: 24px; }

  /* "Volver al inicio": glass pill compacto pero LEGIBLE sobre cualquier fondo */
  .login-back--top {
    display: inline-flex;
    margin: 0 0 8px 0;
    padding: 6px 12px 6px 10px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.85);
    color: var(--dark-navy);
    border: 1px solid rgba(255,255,255,0.55);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    box-shadow:
      0 1px 0 rgba(255,255,255,0.6) inset,
      0 2px 8px -2px rgba(15,23,42,0.20);
  }
  .login-back--top:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateX(-2px);
    box-shadow:
      0 1px 0 rgba(255,255,255,0.6) inset,
      0 4px 12px -2px rgba(15,23,42,0.25);
  }

  .login-card { border-radius: 22px; padding: 22px 18px 20px; }
  .login-card__head { margin-bottom: 4px; }
  .login-icon { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 14px; }
  .login-icon svg { width: 26px; height: 26px; }
  .login-title { font-size: 20px; }
  .login-sub { font-size: 13px; }
  .login-tabs { margin-bottom: 14px; }
  .login-tab { padding: 9px 8px; font-size: 13px; }
  .login-form { gap: 11px; margin-top: 14px; }
  .login-field__input { padding: 11px 12px 11px 36px; font-size: 14px; }
  .login-field__icon { left: 11px; }
  .login-field__label { font-size: 11px; margin-bottom: 4px; }
  .login-row { flex-wrap: wrap; gap: 8px; font-size: 12px; }
  .login-submit { padding: 12px 20px; font-size: 14.5px; }
  .login-google { padding: 11px 16px; font-size: 14px; margin-top: 16px; }
  .login-benefits { padding: 12px 14px; gap: 8px; margin-top: 16px; }
  .login-benefits li { font-size: 12.5px; }
  .login-fineprint { font-size: 10.5px; margin-top: 12px; }

  /* Blobs mas suaves, no compiten con el card */
  .login-blob--1 { width: 220px; height: 220px; top: -80px; right: -70px; opacity: 0.22; }
  .login-blob--2 { width: 200px; height: 200px; bottom: -80px; left: -60px; opacity: 0.22; }
  .login-blob--3 { display: none; }
}

/* ============================================================
   PERFIL DE PERSONAL — modo APP (mobile-first, web-friendly)
   ============================================================ */
.profile-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-banner__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.20) 0%, rgba(15,23,42,0.10) 50%, rgba(15,23,42,0.30) 100%);
}
.profile-banner__tags {
  position: absolute;
  bottom: 16px; left: 16px;
  display: flex; gap: 8px;
}
.profile-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.profile-tag--cat { text-transform: uppercase; }
.profile-tag--avail { color: #047857; }
.profile-tag--top {
  position: absolute;
  top: 16px; right: 16px;
  background: #FCD34D; color: #78350F;
  font-weight: 700;
  box-shadow: 0 4px 10px -4px rgba(15,23,42,0.30);
}
.dot { width: 6px; height: 6px; border-radius: 9999px; background: #10B981; }
.dot--pulse { animation: softPulse 2.4s ease-in-out infinite; }

/* ----- Curva + Avatar ----- */
.profile-curve { position: relative; background: var(--white); }
.profile-curve > svg { display: block; width: 100%; height: 28px; margin-top: -16px; }
@media (min-width: 768px) {
  .profile-curve {
    margin-left: max(16px, calc(50vw - 28rem + 16px));
    margin-right: max(16px, calc(50vw - 28rem + 16px));
  }
}

.profile-avatar {
  position: absolute;
  top: -88px;
  left: 50%;
  transform: translateX(-50%);
  width: 168px; height: 168px;
  border-radius: 9999px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 6px var(--white), 0 16px 32px -12px rgba(15,23,42,0.30);
  z-index: 5;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar__initials { font-size: 56px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
@media (min-width: 768px) {
  .profile-avatar {
    width: 200px; height: 200px;
    top: -100px;
    left: max(40px, calc(50vw - 28rem + 40px));
    transform: none;
  }
  .profile-avatar__initials { font-size: 72px; }
}

/* ----- Identidad ----- */
.profile-identity { background: var(--white); padding: 90px 20px 16px; text-align: center; }
@media (min-width: 768px) {
  .profile-identity {
    margin-left: max(16px, calc(50vw - 28rem + 16px));
    margin-right: max(16px, calc(50vw - 28rem + 16px));
    padding: 24px 40px 16px;
    padding-left: 280px;
    text-align: left;
    min-height: 110px;
    display: flex; flex-direction: column; justify-content: center;
  }
}
.profile-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--dark-navy); margin: 0; }
.profile-role { font-size: 14px; color: var(--slate-500); margin: 4px 0 0; }
@media (min-width: 768px) {
  .profile-name { font-size: 32px; }
  .profile-role { font-size: 15px; }
}

/* ----- Stats pills ----- */
.profile-stats { background: var(--white); padding: 8px 16px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 768px) {
  .profile-stats {
    margin-left: max(16px, calc(50vw - 28rem + 16px));
    margin-right: max(16px, calc(50vw - 28rem + 16px));
    padding: 12px 40px 24px;
    gap: 12px;
  }
}
.profile-stat {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 14px;
  border: 1px solid #EEF2F7;
  min-width: 0;
}
.profile-stat__icon { width: 18px; height: 18px; flex-shrink: 0; }
.profile-stat__icon--amber { color: #F59E0B; fill: #F59E0B; }
.profile-stat__icon--blue  { color: var(--primary-blue); }
.profile-stat__icon--mint  { color: #059669; }
.profile-stat__value { font-size: 15px; font-weight: 700; color: var(--dark-navy); line-height: 1.1; margin: 0; white-space: nowrap; }
.profile-stat__label { font-size: 10px; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.04em; margin: 2px 0 0; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ----- Secciones ----- */
.profile-sections { background: var(--soft-bg); padding: 16px; display: flex; flex-direction: column; gap: 12px; border-top-left-radius: 24px; border-top-right-radius: 24px; margin-top: 8px; }
@media (min-width: 768px) {
  .profile-sections { background: transparent; margin: 16px auto 0; max-width: 56rem; padding: 0 16px 24px; gap: 16px; border-radius: 0; }
}
.profile-section { background: var(--white); border-radius: 18px; padding: 18px 18px 20px; box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
@media (min-width: 768px) { .profile-section { border-radius: 16px; padding: 20px 24px 22px; box-shadow: var(--shadow-sm); } }
.profile-section__title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--primary-blue); margin: 0 0 10px; }
.profile-section__text { font-size: 15px; color: var(--slate-700); margin: 0; line-height: 1.55; }

.profile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 9999px; font-size: 12px; font-weight: 500; background: rgba(42,79,190,0.06); color: var(--primary-blue); border: 1px solid rgba(42,79,190,0.12); }

.profile-exp-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .profile-exp-grid { grid-template-columns: 1fr 1fr; } }
.profile-exp-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--slate-200); border-radius: 12px; background: var(--white); }
.profile-exp-item__icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-exp-item__icon i { width: 18px; height: 18px; }
.profile-exp-item__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--dark-navy); line-height: 1.2; }
.profile-exp-item__sub   { margin: 2px 0 0; font-size: 12px; color: var(--slate-500); }

.profile-zone { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; background: #F1F5F9; border-radius: 9999px; font-size: 13px; color: var(--slate-700); }
.profile-zone strong { color: var(--dark-navy); }
.profile-zone__sep { color: var(--slate-400); margin: 0 2px; }

.profile-cta-card { padding: 28px 24px; text-align: center; }
.profile-cta-card__eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 4px; }
.profile-cta-card__title { font-size: 22px; font-weight: 800; color: var(--dark-navy); letter-spacing: -0.01em; margin: 0 0 8px; }
.profile-cta-card__text { font-size: 14px; color: var(--slate-600); margin: 0 auto; max-width: 28rem; }
.profile-cta-card__actions { margin-top: 18px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.profile-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 40;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 -8px 24px -8px rgba(15,23,42,0.10);
}
.profile-bottom-bar .btn-cta { width: 100%; padding: 14px 20px; }

@media (prefers-reduced-motion: reduce) { .profile-topbar { transition: none; } }

/* ============================================================
   MOBILE TAB BAR (bottom navigation estilo APP)
   ============================================================ */
.mobile-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 -4px 16px -4px rgba(15,23,42,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(64px + env(safe-area-inset-bottom, 0px));
}
/* Cuando el drawer mobile esta abierto, ocultamos la tab bar para foco total */
body.drawer-open .mobile-tabbar { display: none !important; }
body.drawer-open .fab-whatsapp { display: none !important; }
.mobile-tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  color: var(--slate-500);
  text-decoration: none;
  transition: color .2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.mobile-tab__icon { width: 22px; height: 22px; transition: transform .2s ease; }
.mobile-tab__avatar {
  width: 24px; height: 24px;
  border-radius: 9999px;
  overflow: hidden;
  display: inline-flex;
  border: 1.5px solid currentColor;
  transition: transform .2s ease;
}
.mobile-tab__avatar img { width: 100%; height: 100%; object-fit: cover; }
.mobile-tab__label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; line-height: 1; }
.mobile-tab.is-active { color: var(--primary-blue); }
.mobile-tab.is-active .mobile-tab__icon { transform: translateY(-1px); }
.mobile-tab.is-active::before {
  content: ""; position: absolute; top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--primary-blue);
}
.mobile-tab:active .mobile-tab__icon { transform: scale(0.92); }

.mobile-tab--cta { position: relative; padding-top: 0; }
.mobile-tab__cta-button {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px;
  border-radius: 9999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(135deg, #2A4FBE 0%, #3D6FE0 50%, #6BB7E8 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -1px 0 rgba(15,23,42,0.10) inset,
    0 8px 18px -6px rgba(42,79,190,0.55),
    0 0 0 4px #fff;
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .2s ease;
}
.mobile-tab__label--cta { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); color: var(--primary-blue); }
.mobile-tab--cta:active .mobile-tab__cta-button { transform: translateX(-50%) scale(0.94); }
.mobile-tab--cta.is-active .mobile-tab__cta-button {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -1px 0 rgba(15,23,42,0.10) inset,
    0 8px 18px -6px rgba(42,79,190,0.65),
    0 0 0 4px #fff,
    0 0 0 6px rgba(42,79,190,0.18);
}
.mobile-tab--cta.is-active::before { display: none; }
.mobile-tab--whatsapp:active { color: #16A34A; }

@media (max-width: 767px) {
  body:not(.has-app-view) main, body:not(.has-app-view) footer { padding-bottom: 0; }
  body:not(.has-app-view) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .fab-whatsapp { display: none !important; }
  body.has-app-view .profile-bottom-bar {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px -8px rgba(15,23,42,0.08);
  }
  body.has-app-view { padding-bottom: calc(64px + 80px + env(safe-area-inset-bottom, 0px)); }
  body.has-app-view .profile-app { padding-bottom: 0 !important; }
}

/* ============================================================
   ADDRESS PICKER — mapa Leaflet + dropdown de busqueda
   ============================================================ */
.address-map { width: 100%; height: 360px; z-index: 1; overflow: hidden; }
@media (max-width: 640px) { .address-map { height: 280px; } }
.address-map .leaflet-container { font-family: var(--font-sans); }

.map-pin svg { width: 36px; height: 36px; filter: drop-shadow(0 4px 8px rgba(15,23,42,0.30)); }

.addr-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  z-index: 30;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  box-shadow: 0 10px 28px -8px rgba(15,23,42,0.18);
  max-height: 280px;
  overflow-y: auto;
}
.addr-results__item {
  width: 100%;
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  text-align: left;
  background: transparent;
  transition: background .15s ease;
  cursor: pointer;
}
.addr-results__item:last-child { border-bottom: none; }
.addr-results__item:hover { background: #F8FAFC; }
.addr-results__primary { font-size: 13.5px; font-weight: 600; color: var(--dark-navy); line-height: 1.3; }
.addr-results__secondary { font-size: 12px; color: var(--slate-500); margin-top: 2px; }
.addr-results__empty { padding: 14px; text-align: center; color: var(--slate-500); font-size: 13px; }

.profile-stats { background: var(--white); padding: 8px 16px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 768px) {
  .profile-stats { margin-left: max(16px, calc(50vw - 28rem + 16px)); margin-right: max(16px, calc(50vw - 28rem + 16px)); padding: 12px 40px 24px; gap: 12px; }
}
.profile-stat { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #F8FAFC; border-radius: 14px; border: 1px solid #EEF2F7; min-width: 0; }
.profile-stat__icon { width: 18px; height: 18px; flex-shrink: 0; }
.profile-stat__icon--amber { color: #F59E0B; fill: #F59E0B; }
.profile-stat__icon--blue  { color: var(--primary-blue); }
.profile-stat__icon--mint  { color: #059669; }
.profile-stat__value { font-size: 15px; font-weight: 700; color: var(--dark-navy); line-height: 1.1; margin: 0; white-space: nowrap; }
.profile-stat__label { font-size: 10px; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.04em; margin: 2px 0 0; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.profile-sections { background: var(--soft-bg); padding: 16px; display: flex; flex-direction: column; gap: 12px; border-top-left-radius: 24px; border-top-right-radius: 24px; margin-top: 8px; }
@media (min-width: 768px) { .profile-sections { background: transparent; margin: 16px auto 0; max-width: 56rem; padding: 0 16px 24px; gap: 16px; border-radius: 0; } }
.profile-section { background: var(--white); border-radius: 18px; padding: 18px 18px 20px; box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
@media (min-width: 768px) { .profile-section { border-radius: 16px; padding: 20px 24px 22px; box-shadow: var(--shadow-sm); } }
.profile-section__title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--primary-blue); margin: 0 0 10px; }
.profile-section__text { font-size: 15px; color: var(--slate-700); margin: 0; line-height: 1.55; }

.profile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 9999px; font-size: 12px; font-weight: 500; background: rgba(42,79,190,0.06); color: var(--primary-blue); border: 1px solid rgba(42,79,190,0.12); }
.profile-exp-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .profile-exp-grid { grid-template-columns: 1fr 1fr; } }
.profile-exp-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--slate-200); border-radius: 12px; background: var(--white); }
.profile-exp-item__icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-exp-item__icon i { width: 18px; height: 18px; }
.profile-exp-item__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--dark-navy); line-height: 1.2; }
.profile-exp-item__sub { margin: 2px 0 0; font-size: 12px; color: var(--slate-500); }
.profile-zone { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; background: #F1F5F9; border-radius: 9999px; font-size: 13px; color: var(--slate-700); }
.profile-zone strong { color: var(--dark-navy); }
.profile-zone__sep { color: var(--slate-400); margin: 0 2px; }
.profile-cta-card { padding: 28px 24px; text-align: center; }
.profile-cta-card__eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 4px; }
.profile-cta-card__title { font-size: 22px; font-weight: 800; color: var(--dark-navy); letter-spacing: -0.01em; margin: 0 0 8px; }
.profile-cta-card__text { font-size: 14px; color: var(--slate-600); margin: 0 auto; max-width: 28rem; }
.profile-cta-card__actions { margin-top: 18px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.profile-bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,0.96); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid rgba(15,23,42,0.06); box-shadow: 0 -8px 24px -8px rgba(15,23,42,0.10); }
.profile-bottom-bar .btn-cta { width: 100%; padding: 14px 20px; }
@media (prefers-reduced-motion: reduce) { .profile-topbar { transition: none; } }

/* ============================================================
   CHAT WIDGET — Bot + asesor humano (flotante)
   ============================================================ */
.chat-widget { position: fixed; bottom: 16px; right: 16px; z-index: 60; }
@media (max-width: 767px) { .chat-widget { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); right: 12px; } }

.chat-fab {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0) 50%),
    linear-gradient(135deg, #2A4FBE 0%, #3D6FE0 50%, #6BB7E8 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -1px 0 rgba(15,23,42,0.10) inset,
    0 12px 28px -8px rgba(42,79,190,0.55);
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .25s ease;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.05); }
.chat-fab.is-open { background: var(--white); color: var(--dark-navy); }
.chat-fab__badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9999px;
  background: #EF4444; color: #fff;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--white);
}

.chat-panel {
  position: absolute;
  bottom: 70px; right: 0;
  width: min(92vw, 380px);
  height: min(72vh, 580px);
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 64px -12px rgba(15,23,42,0.32), 0 4px 16px -4px rgba(15,23,42,0.10);
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.06);
}
@media (max-width: 767px) { .chat-panel { width: calc(100vw - 24px); height: calc(100vh - 200px); } }

.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(135deg, #2A4FBE 0%, #3D6FE0 50%, #6BB7E8 100%);
  color: #fff;
}
.chat-header__avatar {
  width: 38px; height: 38px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.40);
  display: flex; align-items: center; justify-content: center;
}
.chat-header__avatar.is-human { background: rgba(34,198,154,0.30); border-color: rgba(34,198,154,0.55); }
.chat-header__info { flex: 1; min-width: 0; }
.chat-header__name { font-weight: 700; font-size: 14px; margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
.chat-header__status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; opacity: 0.92; margin: 2px 0 0; }
.chat-header__dot { width: 7px; height: 7px; border-radius: 9999px; background: #34D399; box-shadow: 0 0 0 3px rgba(52,211,153,0.30); }
.chat-header__close {
  width: 30px; height: 30px;
  border: none;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.chat-header__close:hover { background: rgba(255,255,255,0.32); }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(107,183,232,0.06) 0%, rgba(107,183,232,0) 60%),
    #F8FBFE;
  display: flex; flex-direction: column; gap: 10px;
}

.chat-msg { max-width: 85%; display: flex; flex-direction: column; gap: 6px; }
.chat-msg--user { align-self: flex-end; }
.chat-msg--bot, .chat-msg--admin, .chat-msg--system { align-self: flex-start; }
.chat-msg__bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.chat-msg--user .chat-msg__bubble {
  background: linear-gradient(135deg, #2A4FBE 0%, #3D6FE0 100%);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 6px 14px -6px rgba(42,79,190,0.45);
}
.chat-msg--bot .chat-msg__bubble {
  background: var(--white);
  color: var(--dark-navy);
  border: 1px solid rgba(15,23,42,0.08);
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 10px -4px rgba(15,23,42,0.08);
}
.chat-msg--admin .chat-msg__bubble {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  color: #065F46;
  border: 1px solid rgba(34,198,154,0.30);
  border-bottom-left-radius: 6px;
}
.chat-msg--system .chat-msg__bubble {
  background: rgba(245,158,11,0.10);
  color: #92400E;
  border: 1px dashed rgba(245,158,11,0.40);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  align-self: center;
  border-radius: 9999px;
  padding: 6px 14px;
}

.chat-quickies { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chat-quickie {
  padding: 7px 12px;
  font-size: 12.5px; font-weight: 600;
  background: var(--white);
  color: var(--primary-blue);
  border: 1px solid rgba(42,79,190,0.20);
  border-radius: 9999px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.chat-quickie:hover { background: rgba(42,79,190,0.06); border-color: var(--primary-blue); }

/* Indicador "escribiendo" */
.chat-typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 16px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 9999px; background: var(--slate-400); animation: chatBlink 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes chatBlink { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1); } }

.chat-input {
  display: flex; align-items: center; gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(15,23,42,0.08);
  background: var(--white);
}
.chat-input input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  font-size: 14px;
  background: #F8FAFC;
  -webkit-appearance: none;
}
.chat-input input:focus { outline: none; border-color: var(--primary-blue); background: #fff; box-shadow: 0 0 0 3px rgba(42,79,190,0.12); }
.chat-input button {
  width: 40px; height: 40px;
  border: none; border-radius: 9999px;
  background: linear-gradient(135deg, #2A4FBE 0%, #3D6FE0 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
  box-shadow: 0 4px 12px -4px rgba(42,79,190,0.45);
}
.chat-input button:hover:not(:disabled) { transform: translateY(-1px); }
.chat-input button:disabled { opacity: 0.4; cursor: not-allowed; }

[x-cloak] { display: none !important; }

/* ============================================================
   ADDRESS CARDS — tarjetas de direccion del dashboard del usuario
   ============================================================ */
.address-card {
  position: relative;
  padding: 18px 18px 16px;
  border: 1.5px solid var(--slate-200);
  border-radius: 16px;
  background: var(--white);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.address-card:hover { border-color: rgba(42,79,190,0.30); box-shadow: 0 12px 28px -12px rgba(42,79,190,0.18); }
.address-card--default {
  border-color: rgba(34,198,154,0.50);
  background: linear-gradient(180deg, rgba(34,198,154,0.04) 0%, var(--white) 100%);
  box-shadow: 0 8px 20px -8px rgba(34,198,154,0.20);
}
.address-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.address-card__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 14px; color: var(--dark-navy); margin: 0;
}
.address-card--default .address-card__label i { color: #15A876; fill: #15A876; }
.address-card__pill {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: linear-gradient(135deg, #15A876 0%, #22C69A 100%);
  color: #fff;
  padding: 3px 9px; border-radius: 9999px;
  box-shadow: 0 4px 10px -4px rgba(34,198,154,0.50);
}
.address-card__addr { font-size: 14px; color: var(--slate-700); margin: 0; line-height: 1.4; }
.address-card__dist { font-size: 12px; color: var(--slate-500); margin: 2px 0 0; }
.address-card__ref  { font-size: 12px; color: var(--slate-500); margin: 8px 0 0; }
.address-card__switch { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--slate-200); }
.address-card__actions { margin-top: 12px; display: flex; gap: 12px; }
.address-card__btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--primary-blue); text-decoration: none;
}
.address-card__btn:hover { text-decoration: underline; }

/* ============================================================
   TOGGLE SWITCH grande (estilo iOS)
   ============================================================ */
.toggle-switch {
  display: inline-flex; align-items: center; gap: 12px;
  cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.toggle-switch.is-locked { cursor: default; }
.toggle-switch input { display: none; }
.toggle-switch__track {
  position: relative;
  width: 50px; height: 28px;
  border-radius: 9999px;
  background: var(--slate-200);
  transition: background .25s ease, box-shadow .25s ease;
  flex-shrink: 0;
}
.toggle-switch__thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 24px; height: 24px;
  border-radius: 9999px;
  background: var(--white);
  box-shadow: 0 2px 4px rgba(15,23,42,0.20), 0 1px 0 rgba(15,23,42,0.05) inset;
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toggle-switch.is-on .toggle-switch__track {
  background: linear-gradient(135deg, #15A876 0%, #22C69A 100%);
  box-shadow: 0 4px 12px -2px rgba(34,198,154,0.40);
}
.toggle-switch.is-on .toggle-switch__thumb { transform: translateX(22px); }
.toggle-switch:hover:not(.is-locked) .toggle-switch__track { box-shadow: 0 0 0 4px rgba(42,79,190,0.10); }
.toggle-switch__label { font-size: 13px; font-weight: 600; color: var(--slate-700); }
.toggle-switch.is-on .toggle-switch__label { color: #15A876; }
.toggle-switch.is-locked .toggle-switch__label { color: #15A876; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============================================================
   NAV TABS — admin y usuario, todas con el mismo ancho
   ============================================================ */
.nav-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
@media (min-width: 640px) {
  .nav-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .nav-tabs { grid-template-columns: repeat(var(--tabs-count, 4), minmax(0, 1fr)); }
}
.nav-tab {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  text-align: center;
  text-decoration: none;
  min-width: 0;
}
.nav-tab__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639px) {
  .nav-tab { font-size: 12.5px; padding: 9px 8px; }
}

/* ============================================================
   ADDRESS STEPS — guia visual para seleccionar ubicacion
   ============================================================ */
.address-steps {
  margin: 18px 24px 0;
  padding: 18px;
  background: linear-gradient(135deg, rgba(42,79,190,0.04) 0%, rgba(107,183,232,0.06) 100%);
  border: 1px solid rgba(42,79,190,0.10);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 768px) {
  .address-steps {
    margin: 18px 32px 0;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

.address-step {
  position: relative;
  padding: 14px 14px 14px 50px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid rgba(42,79,190,0.08);
  box-shadow: 0 4px 12px -6px rgba(15,23,42,0.06);
}

.address-step__num {
  position: absolute;
  top: 14px; left: 12px;
  width: 28px; height: 28px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #2A4FBE 0%, #6BB7E8 100%);
  color: #fff;
  font-size: 14px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px -3px rgba(42,79,190,0.45);
}

.address-step__icon {
  position: absolute;
  top: 14px; right: 14px;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: rgba(107,183,232,0.18);
  color: var(--primary-blue);
  display: inline-flex; align-items: center; justify-content: center;
}
.address-step__icon i { width: 14px; height: 14px; }

.address-step__title {
  font-size: 14px; font-weight: 700; color: var(--dark-navy);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.address-step__desc {
  font-size: 12.5px; color: var(--slate-600);
  margin: 0; line-height: 1.45;
}
.address-step__desc strong { color: var(--primary-blue); font-weight: 600; }

/* Hint sobre el mapa */
.map-hint {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 10px;
  color: #92400E;
  font-size: 12.5px;
  line-height: 1.4;
}
.map-hint strong { color: #78350F; font-weight: 700; }
.map-hint i { color: #F59E0B; }

/* ============================================================
   ADDRESS PICKER (wizard) — tarjetas seleccionables tipo radio
   ============================================================ */
.addr-pick {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 2px solid var(--slate-200);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
  text-decoration: none;
  color: inherit;
}
.addr-pick:hover { border-color: var(--sky-blue); background: linear-gradient(180deg, #F8FBFF 0%, #FFFFFF 100%); }
.addr-pick.is-active {
  border-color: var(--primary-blue);
  background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
  box-shadow: 0 0 0 4px rgba(42,79,190,0.08), 0 4px 12px -4px rgba(42,79,190,0.18);
}

.addr-pick__radio {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 9999px;
  border: 2px solid var(--slate-300);
  background: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px;
  transition: border-color .2s ease;
}
.addr-pick__radio-dot {
  width: 10px; height: 10px;
  border-radius: 9999px;
  background: var(--primary-blue);
  transform: scale(0);
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.addr-pick.is-active .addr-pick__radio { border-color: var(--primary-blue); }
.addr-pick.is-active .addr-pick__radio-dot { transform: scale(1); }

.addr-pick__radio--add {
  border-style: dashed;
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.addr-pick--add {
  border-style: dashed;
  border-color: rgba(42,79,190,0.30);
  color: var(--primary-blue);
}
.addr-pick--add:hover { border-color: var(--primary-blue); background: rgba(42,79,190,0.05); }
.addr-pick--add .addr-pick__label { color: var(--primary-blue); }

.addr-pick__body { flex: 1; min-width: 0; }
.addr-pick__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.addr-pick__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 14px; color: var(--dark-navy); margin: 0;
}
.addr-pick__pill {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: linear-gradient(135deg, #15A876 0%, #22C69A 100%);
  color: #fff;
  padding: 2px 8px; border-radius: 9999px;
}
.addr-pick__addr { font-size: 13.5px; color: var(--slate-700); margin: 4px 0 0; line-height: 1.4; }
.addr-pick__dist { font-size: 12px; color: var(--slate-500); margin: 2px 0 0; }
.addr-pick__ref  { font-size: 12px; color: var(--slate-500); margin: 6px 0 0; }

/* ============================================================
   PAYMENT CARDS — metodos de pago en wizard paso 5
   ============================================================ */
.payment-card { padding: 16px; }
.payment-card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.payment-card__icon--blue {
  background: linear-gradient(135deg, rgba(0,158,227,0.12) 0%, rgba(0,158,227,0.20) 100%);
  color: #009EE3;
  border: 1px solid rgba(0,158,227,0.25);
}
.payment-card__icon--purple {
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(168,85,247,0.20) 100%);
  color: #7C3AED;
  border: 1px solid rgba(124,58,237,0.25);
}
.payment-card__icon--mint {
  background: linear-gradient(135deg, rgba(34,198,154,0.12) 0%, rgba(34,198,154,0.20) 100%);
  color: #15A876;
  border: 1px solid rgba(34,198,154,0.25);
}

/* Boton persistente "hablar con asesor" en el chat-widget */
.chat-transfer-bar {
  padding: 8px 12px 0;
  background: var(--white);
}
.chat-transfer-btn {
  width: 100%;
  padding: 8px 12px;
  background: rgba(34,198,154,0.10);
  color: #047857;
  border: 1px dashed rgba(34,198,154,0.40);
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .2s ease, border-color .2s ease;
}
.chat-transfer-btn:hover {
  background: rgba(34,198,154,0.18);
  border-color: #15A876;
  border-style: solid;
}

/* ============================================================
   ADMIN CHATS — layout estable de 2 columnas con altura fija
   ============================================================ */
.admin-chats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  height: calc(100vh - 280px);
  min-height: 500px;
  max-height: 800px;
}
@media (min-width: 1024px) {
  .admin-chats-grid {
    grid-template-columns: 320px 1fr;
  }
}
@media (max-width: 1023px) {
  .admin-chats-grid {
    height: auto;
    grid-template-rows: 200px 1fr;
    max-height: none;
  }
}

/* Lista de conversaciones (izquierda) */
.admin-chats-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.admin-chats-list__head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-100);
  background: var(--white);
}
.admin-chats-list__items {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Panel de chat (derecha) */
.admin-chats-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  height: 100%;
}
.admin-chats-panel__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.admin-chats-panel__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.admin-chats-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--slate-100);
  background: var(--white);
  flex-shrink: 0;
}
.admin-chats-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: linear-gradient(180deg, #F8FBFE 0%, #F1F5F9 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.admin-chats-panel__input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--slate-100);
  background: var(--white);
  flex-shrink: 0;
}
.admin-chats-panel__input .input { padding: 10px 14px; }
.admin-chats-panel__input .btn-cta { padding: 10px 18px; flex-shrink: 0; }

/* ============================================================
   ORDER TIMELINE — linea de tiempo del estado del pedido
   ============================================================ */
.order-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 14px 0 4px;
}
.order-timeline__step {
  flex: 1 1 0;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 4px;
}
/* Linea conectora entre dots */
.order-timeline__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--slate-200);
  z-index: 0;
}
.order-timeline__step.is-done:not(:last-child)::after {
  background: linear-gradient(90deg, #15A876 0%, #22C69A 100%);
}

.order-timeline__dot {
  position: relative;
  z-index: 1;
  width: 36px; height: 36px;
  border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--slate-100);
  border: 2px solid var(--slate-200);
  color: var(--slate-400);
  margin-bottom: 8px;
  transition: all .25s ease;
}
.order-timeline__dot i { width: 16px; height: 16px; }

.order-timeline__step.is-done .order-timeline__dot {
  background: linear-gradient(135deg, #15A876 0%, #22C69A 100%);
  border-color: #15A876;
  color: #fff;
}
.order-timeline__step.is-current .order-timeline__dot {
  background: linear-gradient(135deg, #2A4FBE 0%, #6BB7E8 100%);
  border-color: var(--primary-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(42,79,190,0.18), 0 8px 18px -6px rgba(42,79,190,0.45);
  transform: scale(1.08);
}

.order-timeline__label {
  font-size: 12px; font-weight: 600;
  color: var(--slate-500);
  margin: 0;
  letter-spacing: -0.01em;
}
.order-timeline__step.is-done .order-timeline__label,
.order-timeline__step.is-current .order-timeline__label {
  color: var(--dark-navy);
}
.order-timeline__desc {
  font-size: 11px;
  color: var(--slate-500);
  margin: 2px 0 0;
}

/* En mobile: timeline vertical */
@media (max-width: 639px) {
  .order-timeline { flex-direction: column; align-items: stretch; gap: 12px; }
  .order-timeline__step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
    padding: 0;
  }
  .order-timeline__step:not(:last-child)::after {
    top: 36px; bottom: -12px;
    left: 17px; right: auto;
    width: 2px; height: auto;
  }
  .order-timeline__dot { margin-bottom: 0; flex-shrink: 0; }
  .order-timeline__body { flex: 1; }
}

/* Cuando el page declara $hide_mobile_tabbar (ej. login), removemos el padding-bottom del body */
@media (max-width: 767px) {
  body.no-tabbar { padding-bottom: env(safe-area-inset-bottom, 0px) !important; }
}

/* === DIAGNOSTICO TEMPORAL — marker login mobile ===
   Si ves un punto azul fijo abajo a la derecha SOLO en login mobile,
   significa que el CSS v3 SI llego al navegador (NO hay cache).
   Si NO lo ves, el navegador esta sirviendo CSS cacheado. */
@media (max-width: 767px) {
  body.no-tabbar.has-login-marker::after {
    content: "CSS v4";
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 9999;
    padding: 4px 8px;
    background: var(--primary-blue);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9999px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(15,23,42,0.30);
  }
}

/* ============================================================
   MOBILE DRAWER — side menu desde la derecha
   ============================================================ */
.mobile-drawer {
  will-change: transform;
  transform: translateZ(0);
  -webkit-overflow-scrolling: touch;
}

/* Cabecera del drawer */
.mobile-drawer__head {
  flex-shrink: 0;
}

/* Tarjeta de usuario */
.mobile-drawer__user {
  text-decoration: none;
  color: inherit;
}

/* Links del nav */
.mobile-drawer__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark-navy);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.mobile-drawer__link i[data-lucide]:first-child,
.mobile-drawer__link svg:first-child {
  color: var(--primary-blue);
  flex-shrink: 0;
}
.mobile-drawer__link span {
  flex: 1;
}
.mobile-drawer__chev {
  color: #cbd5e1;
  flex-shrink: 0;
}
.mobile-drawer__link:hover,
.mobile-drawer__link:active {
  background: #f1f5f9;
}
.mobile-drawer__link:active {
  transform: scale(0.985);
}

/* Variante peligrosa (cerrar sesion) */
.mobile-drawer__link--danger {
  color: #dc2626;
}
.mobile-drawer__link--danger i:first-child,
.mobile-drawer__link--danger svg:first-child {
  color: #dc2626 !important;
}
.mobile-drawer__link--danger:hover,
.mobile-drawer__link--danger:active {
  background: #fef2f2;
}

/* Divisor sutil */
.mobile-drawer__divider {
  height: 1px;
  background: #f1f5f9;
  margin: 10px 6px;
}

/* Footer fijo */
.mobile-drawer__foot {
  flex-shrink: 0;
}

/* ============================================================
   PWA INSTALL BANNER — "Instalar como app"
   ============================================================ */
.pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  background: rgba(255,255,255,0.98);
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 12px 30px -8px rgba(15,23,42,0.18),
    0 4px 12px -4px rgba(15,23,42,0.10);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
/* En desktop, lo centramos y limitamos el ancho */
@media (min-width: 768px) {
  .pwa-install-banner {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 380px;
  }
}
/* En mobile, si hay tab bar, subimos el banner para no chocar */
@media (max-width: 767px) {
  body:not(.no-tabbar) .pwa-install-banner {
    bottom: calc(64px + 12px + env(safe-area-inset-bottom, 0px));
  }
}
.pwa-install-banner__icon img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 10px -2px rgba(42,79,190,0.30);
}
.pwa-install-banner__body { flex: 1; min-width: 0; }
.pwa-install-banner__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark-navy);
  line-height: 1.2;
}
.pwa-install-banner__sub {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}
.pwa-install-banner__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.pwa-install-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.pwa-install-banner__btn:active { transform: scale(0.96); }
.pwa-install-banner__btn--primary {
  background: var(--primary-blue);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(42,79,190,0.55);
}
.pwa-install-banner__btn--primary:hover { background: #1f3a96; }
.pwa-install-banner__btn--ghost {
  background: transparent;
  color: #94a3b8;
  padding: 8px 8px;
}
.pwa-install-banner__btn--ghost:hover { background: #f1f5f9; color: #475569; }

/* ============================================================
   KANBAN — admin/candidatos.php
   ============================================================ */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
@media (max-width: 1100px) {
  .kanban-grid {
    grid-template-columns: repeat(5, 280px);
  }
}
.kanban-col {
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}
.kanban-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  background: #fff;
  border-radius: 16px 16px 0 0;
}
.kanban-col__head[data-color="amber"]   { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.kanban-col__head[data-color="sky"]     { color: #0369a1; background: #f0f9ff; border-color: #bae6fd; }
.kanban-col__head[data-color="emerald"] { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.kanban-col__head[data-color="rose"]    { color: #be123c; background: #fff1f2; border-color: #fecdd3; }
.kanban-col__count {
  background: rgba(15,23,42,0.06);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  min-width: 22px;
  text-align: center;
}
.kanban-col__body {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}
.kanban-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: grab;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  user-select: none;
}
.kanban-card:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 4px 12px -4px rgba(15,23,42,0.10);
  transform: translateY(-1px);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card--ghost { opacity: 0.4; background: #f1f5f9; }
.kanban-card--chosen { box-shadow: 0 8px 24px -6px rgba(42,79,190,0.30); border-color: var(--primary-blue); }
.kanban-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: #f1f5f9;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}
.kanban-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.kanban-card__pill {
  font-size: 10px;
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kanban-card__date {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}
