/* Sistema visual de Wappsmart.
   Paleta e indicaciones de la identidad de marca (2026-11-09):
   verde oscuro, verde principal, verde brillante, verde menta y alertas en amarillo suave.
   La mascota es una imagen real recortada, animada con CSS y JavaScript. */
:root {
  --verde-oscuro: #063d28;
  --verde: #079447;
  --verde-vivo: #20c968;
  --menta: #e8f7ed;
  --fondo: #f5f8f6;
  --blanco: #ffffff;
  --texto: #14251d;
  --texto-2: #718078;
  --texto-3: #9aa69f;
  --linea: rgba(20, 37, 29, 0.1);
  --linea-fuerte: rgba(20, 37, 29, 0.18);

  --alerta: #8a5a00;
  --alerta-suave: #fff5d6;
  --alerta-linea: #f1dd9c;
  --peligro: #b3261e;
  --peligro-suave: #fdecea;
  --lila-suave: #eef0fb;
  --lila: #4a57a8;

  --acento: var(--verde);
  --sobre-acento: #ffffff;
  --chat-fondo: #efeae2;
  --chat-salida: #d9fdd3;

  --radio: 12px;
  --radio-tarjeta: 20px;
  --sombra-1: 0 1px 2px rgba(20, 37, 29, 0.05), 0 8px 24px -14px rgba(20, 37, 29, 0.2);
  --sombra-2: 0 2px 4px rgba(20, 37, 29, 0.05), 0 22px 44px -22px rgba(6, 61, 40, 0.38);
  --sombra-boton: 0 10px 22px -10px rgba(7, 148, 71, 0.7);
  --degradado-marca: linear-gradient(135deg, var(--verde-vivo), var(--verde));
  --fuente: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fuente-titulos: "Sora", "Poppins", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --lateral: 264px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--fuente); font-size: 15px; line-height: 1.5; color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--fuente-titulos); letter-spacing: -0.025em; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 19px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 16px; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icono { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* Iconos 3D (ver ICONOS_3D en app.js): un poco más grandes que los de trazo,
   porque la figura lleva aire alrededor. Sin fondo ni trazo. */
img.icono-3d { object-fit: contain; transform: scale(1.18); user-select: none; -webkit-user-drag: none; background: none !important; padding: 0 !important; filter: drop-shadow(0 2px 3px rgba(3, 30, 19, 0.18)); }
.nav button[aria-current="page"] img.icono-3d { transform: scale(1.3); }
.placa img.icono-3d { width: 30px; height: 30px; }
:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; }
.tenue { color: var(--texto-2); }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; word-break: break-all; }

/* ── La mascota ───────────────────────────────────────────────────────── */
.mascota { position: relative; width: calc(var(--tam, 160px) * var(--escala, 1)); aspect-ratio: var(--proporcion, 719 / 776); flex: none; isolation: isolate; -webkit-tap-highlight-color: transparent; }
.mascota[data-viva] { cursor: pointer; }
.mascota-sombra { position: absolute; left: 16%; right: 16%; bottom: -2%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(6, 40, 24, 0.34), transparent); z-index: -1; }
.mascota-salto, .mascota-balanceo, .mascota-cuerpo { position: absolute; inset: 0; transform-origin: 50% 97%; }
.mascota img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
/* La posición y el tamaño de cada ojo los pone app.js según la pose (medidas de cada imagen). */
.ojo { position: absolute; pointer-events: none; transform: rotate(var(--giro, 0deg)); }
/* "pelo" tapa el ojo original con pelaje tomado de la frente de la misma imagen. */
.ojo .pelo, .ojo .parpado {
  position: absolute; inset: 0; border-radius: 50%;
  background-image: var(--imagen-mascota); background-repeat: no-repeat; background-size: var(--bs); background-position: var(--bp);
  -webkit-mask-image: radial-gradient(ellipse closest-side, #000 68%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side, #000 68%, transparent 100%);
}
.ojo .pupila {
  position: absolute; left: 20.5%; top: 18.8%; width: 59%; height: 62.4%; border-radius: 50%;
  background: radial-gradient(ellipse at 34% 26%, #4a4d4a 0%, #121312 42%, #050505 100%);
  transform: translate(calc(var(--mx, 0) * 17%), calc(var(--my, 0) * 13%));
}
.ojo .parpado { clip-path: inset(0 0 100% 0); }
.ojo .arco { position: absolute; left: 14%; top: 30%; width: 72%; height: 50%; border: 0 solid #0b0c0b; border-top-width: calc(var(--tam, 160px) * 0.017); border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: 0; }
.mascota.parpadea .parpado { clip-path: inset(0); }
.mascota[data-estado="feliz"] .parpado { clip-path: inset(0); }
.mascota[data-estado="feliz"] .pupila { opacity: 0; }
.mascota[data-estado="feliz"] .arco { opacity: 1; }
.mascota[data-estado="dormida"] .parpado { clip-path: inset(0 0 40% 0); }
.mascota[data-estado="dormida"] .pupila { transform: translate(0, 12%); }
.mascota[data-estado="pensando"] .pupila { transform: translate(14%, -13%); }
/* Versión mínima (avisos, tamaños pequeños): solo la imagen. */
.mascota[data-simple] .ojo { display: none; }

/* Adornos que acompañan a la mascota: globo de puntos, burbuja de WhatsApp, destellos y mano. */
.globo { position: absolute; display: flex; align-items: center; gap: 5px; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: var(--blanco); box-shadow: 0 14px 28px -12px rgba(3, 30, 19, 0.55); }
.globo i { width: 9px; height: 9px; border-radius: 50%; background: var(--verde-vivo); }
.burbuja-wa { position: absolute; filter: drop-shadow(0 16px 22px rgba(3, 30, 19, 0.4)); }
.burbuja-wa .wa-fondo { fill: #fff; }
.burbuja-wa .wa-disco { fill: #25d366; }
.burbuja-wa .wa-telefono { fill: #fff; }
.destellos { position: absolute; overflow: visible; }
.destellos path { fill: none; stroke: #c9f24b; stroke-width: 6; stroke-linecap: round; transform-box: fill-box; transform-origin: center; }
.destellos.verdes path { stroke: var(--verde-vivo); }
.mano { display: inline-block; width: 0.95em; height: 0.95em; margin-left: 0.18em; vertical-align: -0.1em; transform-origin: 70% 88%; overflow: visible; }

/* ── Licencia: campo de la llave y botón dentro de los avisos ─────────── */
.campo-llave { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 17px !important; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.campo-llave::placeholder { font-weight: 500; letter-spacing: 0.02em; }
.aviso-sistema button.accion { width: auto; height: 34px; padding: 0 16px; border-radius: 999px; background: rgba(138, 90, 0, 0.12); color: #5c3d00; font-size: 14px; font-weight: 700; white-space: nowrap; }
.aviso-sistema button.accion:hover { background: rgba(138, 90, 0, 0.2); }
.aviso-sistema button.accion:disabled { opacity: 0.6; cursor: default; }

/* ── WhatsApp por código QR ───────────────────────────────────────────── */
.aviso-riesgo { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; background: var(--alerta-suave); border-color: var(--alerta-linea); }
.aviso-riesgo strong { display: block; color: #5c3d00; margin-bottom: 4px; }
.aviso-riesgo p { color: #6b4a06; font-size: 14.5px; }
.listado .principal-texto .fila { gap: 10px; margin-bottom: 2px; }
.listado .principal-texto .chip { font-size: 12.5px; color: var(--verde-oscuro); }
.listado .principal-texto .chip[data-tono="ambar"] { color: var(--alerta); }
.listado .principal-texto .chip[data-tono="rojo"] { color: var(--peligro); }
dialog.dialogo-qr { width: min(760px, calc(100% - 32px)); }
.qr-contenido { display: grid; gap: 20px; }
.qr-cuerpo { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; align-items: center; }
.qr-zona { display: grid; place-items: center; width: 300px; height: 300px; padding: 14px; border-radius: 22px; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra-1); }
.qr-imagen { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.qr-cargando, .qr-listo { display: grid; justify-items: center; gap: 12px; text-align: center; color: var(--texto-2); font-weight: 500; }
.qr-listo strong { font-family: var(--fuente-titulos); font-size: 19px; color: var(--verde-oscuro); }
.qr-pasos { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: grid; gap: 14px; }
.qr-pasos li { position: relative; padding-left: 44px; font-size: 15.5px; line-height: 1.45; }
.qr-pasos li::before { counter-increment: paso; content: counter(paso); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--degradado-marca); color: #fff; font-family: var(--fuente-titulos); font-weight: 700; font-size: 14px; }
.qr-estado { padding: 12px 16px; border-radius: 14px; background: var(--menta); color: var(--verde-oscuro); font-size: 14.5px; font-weight: 500; }
@media (max-width: 700px) {
  .qr-cuerpo { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .qr-zona { width: min(280px, 100%); height: auto; aspect-ratio: 1; }
}

/* ── Botones ──────────────────────────────────────────────────────────── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px; background: var(--degradado-marca); color: var(--sobre-acento);
  font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: var(--sombra-boton); text-decoration: none;
}
.boton:hover { filter: brightness(1.06); }
.boton:disabled { opacity: 0.55; cursor: default; filter: none; }
.boton.secundario { background: var(--blanco); color: var(--texto); border-color: var(--linea-fuerte); box-shadow: none; }
.boton.secundario:hover { background: var(--menta); border-color: transparent; color: var(--verde-oscuro); filter: none; }
.boton.oscuro { background: var(--verde-oscuro); box-shadow: 0 10px 22px -12px rgba(6, 61, 40, 0.8); }
.boton.claro { background: var(--blanco); color: var(--verde-oscuro); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5); }
.boton.claro:hover { background: var(--menta); filter: none; }
.boton.contorno { background: rgba(255, 255, 255, 0.07); color: #fff; border-color: rgba(255, 255, 255, 0.34); box-shadow: none; }
.boton.contorno:hover { background: rgba(255, 255, 255, 0.16); filter: none; }
.boton.discreto, .boton.peligro { background: none; box-shadow: none; }
.boton.discreto { color: var(--texto-2); }
.boton.discreto:hover { background: var(--menta); color: var(--verde-oscuro); filter: none; }
.boton.peligro { color: var(--peligro); }
.boton.peligro:hover { background: var(--peligro-suave); filter: none; }
.boton.cuadrado { width: 40px; height: 40px; padding: 0; }
.boton.chico { height: 38px; padding: 0 16px; font-size: 14px; }

/* ── Formularios ──────────────────────────────────────────────────────── */
.campo { display: grid; gap: 7px; align-content: start; min-width: 0; }
.campo > span { font-size: 14px; font-weight: 600; }
.campo > small { font-size: 13.5px; color: var(--texto-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px; border: 1.5px solid var(--linea-fuerte); border-radius: var(--radio);
  background: var(--blanco); color: var(--texto); font-size: 15px; outline: none;
}
textarea { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: rgba(20, 37, 29, 0.32); }
input:focus, select:focus, textarea:focus { border-color: var(--verde); box-shadow: 0 0 0 4px rgba(32, 201, 104, 0.2); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--verde); }
::placeholder { color: var(--texto-3); }
.rejilla, .actividad, .acciones, .configuracion, .pagina-interior { grid-template-columns: minmax(0, 1fr); }
.rejilla { display: grid; gap: 18px; }
.rejilla.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fila.entre { justify-content: space-between; }
.error-texto { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--radio); background: var(--peligro-suave); color: var(--peligro); font-size: 14px; font-weight: 500; }
.error-texto:empty { display: none; }

/* ── Tarjetas y títulos de sección ────────────────────────────────────── */
.tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio-tarjeta); padding: 26px; box-shadow: var(--sombra-1); }
.titulo-tarjeta { display: flex; align-items: center; gap: 12px; }
.titulo-tarjeta > div { flex: 1; min-width: 0; }
.titulo-tarjeta p { color: var(--texto-2); font-size: 14.5px; margin-top: 2px; }
.placa { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--menta); color: var(--verde); flex: none; }
.placa .icono { width: 23px; height: 23px; }
.placa.llena { background: var(--degradado-marca); color: #fff; box-shadow: 0 10px 18px -10px rgba(7, 148, 71, 0.8); }
.placa[data-tono="ambar"] { background: var(--alerta-suave); color: var(--alerta); }
.placa[data-tono="lila"] { background: var(--lila-suave); color: var(--lila); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--menta); color: var(--verde-oscuro); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.chip[data-tono="ambar"] { background: var(--alerta-suave); color: var(--alerta); }
.chip[data-tono="rojo"] { background: var(--peligro-suave); color: var(--peligro); }
.chip[data-tono="gris"] { background: #edf0ee; color: var(--texto-2); }

/* ── Carga inicial ────────────────────────────────────────────────────── */
.cargando { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 14px; margin: 0; color: var(--texto-2); font-weight: 500; text-align: center; }
.cargando-seccion { display: grid; place-items: center; align-content: center; gap: 12px; padding: 64px 24px; color: var(--texto-2); font-weight: 500; }

/* ── Entrada e instalación ────────────────────────────────────────────── */
.puerta { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.puerta-heroe { position: relative; display: flex; flex-direction: column; padding: 34px 52px 0; color: #fff; overflow: hidden;
  background:
    radial-gradient(70% 60% at 100% 100%, rgba(32, 201, 104, 0.55), transparent 62%),
    radial-gradient(50% 50% at 0% 0%, rgba(32, 201, 104, 0.2), transparent 70%),
    linear-gradient(140deg, var(--verde-oscuro) 0%, #06522f 55%, var(--verde) 100%); }
.puerta-heroe .logo { color: #fff; }
.heroe-texto { display: grid; gap: 16px; max-width: 520px; margin-top: 9vh; }
.heroe-texto h1 { font-size: clamp(32px, 3.4vw, 48px); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }
.heroe-texto h1 em { font-style: normal; color: var(--verde-vivo); }
.heroe-puntos { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.heroe-puntos li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: rgba(255, 255, 255, 0.92); }
.heroe-puntos .icono { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: rgba(32, 201, 104, 0.2); color: var(--verde-vivo); stroke-width: 2.6; }
.heroe-mascota { position: relative; align-self: flex-end; margin-top: auto; margin-right: 4%; }
.heroe-mascota .globo { left: -34%; top: 12%; }
.puerta-centro { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: radial-gradient(60% 50% at 100% 0%, rgba(32, 201, 104, 0.12), transparent 70%), var(--fondo); }
.puerta-caja { width: min(450px, 100%); display: grid; gap: 20px; padding: 38px; background: var(--blanco); border: 1px solid var(--linea); border-radius: 26px; box-shadow: var(--sombra-2); }
.puerta-caja > header p { margin-top: 6px; color: var(--texto-2); }
.puerta-caja h2 { font-size: 24px; }
.puerta-caja .boton { width: 100%; height: 50px; }
/* Cambio entre "Entrar" y "Crear cuenta con mi llave" (Wappsmart en la nube). */
.puerta-cambio { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--linea); text-align: center; }
.puerta-cambio > span { color: var(--texto-2); font-size: 14px; }
.boton-texto { justify-self: center; padding: 6px 10px; border: 0; background: none; color: var(--texto-2); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.puerta-caja .boton-texto { width: auto; height: auto; }

/* ── Estructura: barra lateral + columna principal ────────────────────── */
.app { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); height: 100dvh; }
.lateral { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 14px; scrollbar-width: thin; background: var(--blanco); border-right: 1px solid var(--linea); min-height: 0; overflow-y: auto; z-index: 30; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fuente-titulos); font-size: 22px; font-weight: 700; letter-spacing: -0.035em; color: var(--verde-oscuro); white-space: nowrap; }
.logo img { width: 46px; height: 46px; display: block; object-fit: contain; }
.lateral > .logo { padding: 2px 8px 6px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button { display: flex; align-items: center; gap: 13px; flex: none; height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: none; color: var(--texto-2); font-size: 15.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.nav button .icono { width: 22px; height: 22px; }
.nav button:hover { background: var(--fondo); color: var(--texto); }
.nav button[aria-current="page"] { background: var(--menta); color: var(--verde-oscuro); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(7, 148, 71, 0.14); }
.nav button[aria-current="page"] .icono { color: var(--verde); stroke-width: 2.3; }
.nav .contador { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--verde-vivo); color: var(--verde-oscuro); font-size: 12px; font-weight: 800; text-align: center; line-height: 22px; }

.ayuda { position: relative; margin-top: auto; display: grid; justify-items: center; gap: 4px; padding: 0 16px 16px; border-radius: 22px; background: linear-gradient(180deg, var(--menta) 0%, #f3fbf6 100%); border: 1px solid rgba(7, 148, 71, 0.12); text-align: center; }
.ayuda .mascota { margin-top: -6px; }
.ayuda strong { font-family: var(--fuente-titulos); font-size: 15.5px; letter-spacing: -0.02em; }
.ayuda p { font-size: 13.5px; color: var(--texto-2); margin-bottom: 8px; }
.plan { display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--linea); font-weight: 600; }
.plan .icono { color: #e0a419; }
.plan .chip { margin-left: auto; }

.columna { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.superior { display: flex; align-items: center; gap: 14px; padding: 16px 28px 6px; }
.abrir-menu { display: none; }
.selector { position: relative; display: flex; align-items: center; }
.selector > .icono { position: absolute; left: 16px; color: var(--verde); pointer-events: none; }
.selector select { width: auto; max-width: 300px; height: 48px; padding: 0 40px 0 46px; border: 1px solid var(--linea); border-radius: 999px; background-color: var(--blanco); font-weight: 600; box-shadow: var(--sombra-1); appearance: none; -webkit-appearance: none; }
.selector::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border: solid var(--texto); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.superior-der { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.conexion { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--texto-2); white-space: nowrap; }
.conexion i { width: 9px; height: 9px; border-radius: 50%; background: var(--verde-vivo); }
.conexion[data-estado="sin"] i { background: var(--peligro); }
.superior-der .divisor { width: 1px; height: 26px; background: var(--linea-fuerte); }
.cuenta { position: relative; }
.cuenta > button { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 0; border-radius: 999px; background: none; font-weight: 600; }
.cuenta > button:hover { background: var(--menta); }
.iniciales { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--menta); color: var(--verde-oscuro); font-family: var(--fuente-titulos); font-size: 14px; font-weight: 700; flex: none; }
.menu-cuenta { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 8px; border-radius: 18px; background: var(--blanco); border: 1px solid var(--linea); box-shadow: var(--sombra-2); z-index: 40; }
.menu-cuenta[hidden] { display: none; }
.menu-cuenta .quien { padding: 10px 12px 12px; border-bottom: 1px solid var(--linea); margin-bottom: 6px; }
.menu-cuenta .quien strong { display: block; }
.menu-cuenta .quien span { font-size: 13.5px; color: var(--texto-2); word-break: break-all; }
.menu-cuenta button { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: none; font-weight: 500; text-align: left; }
.menu-cuenta button:hover { background: var(--fondo); }
.menu-cuenta button.salir { color: var(--peligro); }
.menu-cuenta button.salir:hover { background: var(--peligro-suave); }

.pagina { flex: 1; min-height: 0; overflow: auto; }
.pagina-contenido { height: 100%; }
.avisos-sistema { display: grid; gap: 10px; padding: 10px 28px 0; }
.aviso-sistema { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-radius: 16px; background: var(--alerta-suave); border: 1px solid var(--alerta-linea); color: var(--alerta); font-size: 14.5px; font-weight: 500; }
.aviso-sistema > span { flex: 1; }
.aviso-sistema .icono { color: #e0a419; }
.aviso-sistema button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: inherit; }
.aviso-sistema button:hover { background: rgba(138, 90, 0, 0.12); }
.pagina-interior { max-width: 1180px; padding: 18px 28px 56px; display: grid; gap: 22px; }
.pagina-interior.angosta { max-width: 920px; }
.encabezado { display: flex; align-items: center; gap: 16px; padding-top: 8px; }
.encabezado > div { flex: 1; min-width: 0; }
.encabezado p { color: var(--texto-2); margin-top: 4px; font-size: 16px; }
.encabezado .placa { width: 54px; height: 54px; border-radius: 18px; }
.encabezado .placa .icono { width: 28px; height: 28px; }

/* ── Inicio ───────────────────────────────────────────────────────────── */
.banner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: center; min-height: 300px; margin-top: 30px; padding: 34px 38px; border-radius: 30px; color: #fff; box-shadow: var(--sombra-2);
  background: linear-gradient(105deg, #05301f 0%, var(--verde-oscuro) 38%, #075c34 100%); }
/* Fondo de curvas, como la referencia: tres ondas verdes que suben hacia la derecha. */
.banner-fondo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
.banner-fondo .onda-1 { fill: #0a7a3e; opacity: 0.62; }
.banner-fondo .onda-2 { fill: #14a552; opacity: 0.6; }
.banner-fondo .onda-3 { fill: var(--verde-vivo); opacity: 0.55; }
.banner-fondo .halo { fill: #fff; opacity: 0.07; }
.banner-texto { position: relative; display: grid; gap: 14px; justify-items: start; min-width: 0; z-index: 1; }
.banner .boton.brillante { background: linear-gradient(135deg, #7cf08f 0%, var(--verde-vivo) 100%); color: var(--verde-oscuro); box-shadow: 0 12px 26px -10px rgba(32, 201, 104, 0.9); }
.banner h1 { font-size: clamp(32px, 3.6vw, 46px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.banner .bajada { font-family: var(--fuente-titulos); font-size: clamp(18px, 1.7vw, 22px); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; max-width: 21em; }
.banner .bajada em { font-style: normal; color: var(--verde-vivo); }
.indicador { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 15px; font-weight: 600; }
.indicador i { width: 10px; height: 10px; border-radius: 50%; background: var(--verde-vivo); }
.banner .fila { margin-top: 6px; }
/* La mascota sobresale por arriba del banner, con la burbuja de WhatsApp a su lado. */
.banner-mascota { position: absolute; right: 84px; bottom: 2px; z-index: 1; }
.banner-mascota .burbuja-wa { right: -24%; top: 30%; width: 44%; }
.banner-mascota .destellos { left: -14%; top: 4%; width: 22%; }
.banner-mascota .destellos.verdes { left: auto; right: -30%; top: 74%; width: 13%; }

.estadisticas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.estadistica { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: start; padding: 20px; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio-tarjeta); box-shadow: var(--sombra-1); overflow: hidden; }
.estadistica .placa { grid-row: span 3; }
.estadistica strong { font-family: var(--fuente-titulos); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.estadistica .rotulo { color: var(--texto-2); font-size: 14.5px; }
.estadistica .cambio { display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--verde); }
.estadistica .cambio .icono { width: 15px; height: 15px; stroke-width: 2.6; }
.estadistica .cambio[data-sentido="baja"] { color: var(--alerta); }
.estadistica .cambio[data-sentido="baja"] .icono { transform: rotate(180deg); }
.estadistica .nota-dato { margin-top: 6px; font-size: 13px; color: var(--texto-3); }
.chispa { position: absolute; right: 14px; bottom: 14px; width: 84px; height: 34px; overflow: visible; }
.chispa polyline { fill: none; stroke: var(--verde-vivo); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chispa circle { fill: var(--verde); }

.dos-columnas { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
/* Tarjeta de configuración, como la referencia: lista a la izquierda y la mascota a la derecha. */
.configuracion { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 8px 12px; align-items: stretch; overflow: hidden; padding-right: 0; padding-bottom: 0; }
.config-texto { display: grid; gap: 14px; align-content: start; padding-bottom: 26px; min-width: 0; }
.config-titulo { display: flex; align-items: center; gap: 12px; }
.config-titulo .icono { width: 30px; height: 30px; color: var(--verde); stroke-width: 2.1; }
.config-titulo h2 { font-size: 19px; }
.config-bajada { color: var(--texto-2); font-size: 16px; margin-top: -8px; }
.config-avance { display: flex; align-items: center; gap: 12px; }
.config-avance .avance { flex: 1; height: 14px; border-radius: 999px; background: var(--menta); overflow: hidden; }
.config-avance .avance > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #06693a, var(--verde)); }
.config-avance .sello { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--verde); color: #fff; flex: none; box-shadow: 0 8px 14px -8px rgba(7, 148, 71, 0.9); }
.config-avance .sello .icono { width: 19px; height: 19px; stroke-width: 3; }
.config-avance .porcentaje { min-width: 48px; font-family: var(--fuente-titulos); font-weight: 700; color: var(--verde); text-align: right; }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pasos button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 42px; padding: 5px 8px 5px 2px; border: 0; border-radius: 14px; background: none; text-align: left; font-size: 16.5px; font-weight: 500; color: var(--texto); }
.pasos button:hover { background: var(--fondo); }
.pasos .marca-paso { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--linea-fuerte); color: transparent; flex: none; }
.pasos .marca-paso .icono { width: 15px; height: 15px; stroke-width: 3.2; }
.pasos li[data-hecho="si"] .marca-paso { border-color: transparent; background: var(--verde); color: #fff; }
.pasos li[data-hecho="no"] .texto-paso { color: var(--texto-2); }
.pasos .ir { margin-left: auto; color: var(--texto-3); opacity: 0; }
.pasos button:hover .ir, .pasos button:focus-visible .ir { opacity: 1; }
.config-mascota { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 240px;
  background: radial-gradient(closest-side at 50% 68%, rgba(32, 201, 104, 0.28), rgba(232, 247, 237, 0.6) 58%, transparent 100%); }
.config-mascota .mascota { margin-bottom: -4px; }
.config-mascota .destellos { left: 8%; top: 40%; width: 15%; }
.felicitacion { position: absolute; right: 18px; top: 4px; font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive; font-size: 21px; font-weight: 700; line-height: 1.15; color: var(--verde-oscuro); text-align: center; transform: rotate(-9deg); z-index: 1; }
.felicitacion::after { content: ""; display: block; height: 7px; margin: 3px 4px 0; border-bottom: 3px solid var(--verde-vivo); border-radius: 0 0 50% 50% / 0 0 100% 100%; }

.acciones { display: grid; gap: 16px; align-content: start; }
.acciones-rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.accion { display: grid; justify-items: center; gap: 10px; padding: 20px 10px 16px; border: 1px solid transparent; border-radius: 18px; background: var(--menta); color: var(--texto); font-weight: 600; font-size: 14.5px; text-align: center; line-height: 1.3; }
.accion .icono { width: 30px; height: 30px; color: var(--verde); stroke-width: 2; }
.accion[data-tono="lila"] { background: var(--lila-suave); }
.accion[data-tono="lila"] .icono { color: var(--lila); }
.accion:hover { border-color: rgba(7, 148, 71, 0.3); box-shadow: var(--sombra-1); }

.actividad { display: grid; gap: 8px; align-content: start; }
.actividad ul { list-style: none; margin: 0; padding: 0; }
.actividad li + li { border-top: 1px solid var(--linea); }
.actividad li button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 8px 6px; border: 0; background: none; text-align: left; border-radius: 12px; }
.actividad li button:hover { background: var(--fondo); }
.actividad .placa { width: 36px; height: 36px; border-radius: 12px; }
.actividad .placa .icono { width: 19px; height: 19px; }
.actividad .que { flex: 1; min-width: 0; }
.actividad .que strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actividad .que span { display: block; font-size: 13.5px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actividad time { font-size: 13px; color: var(--texto-3); white-space: nowrap; }

/* Tarjeta que presenta el apartado de dropshipping. Siempre va en negro y naranja,
   con su mascota, también dentro del panel verde. */
.promo-tienda { position: relative; display: grid; align-content: start; justify-items: start; gap: 12px; padding: 28px 26px 30px; border-radius: 24px; color: #fff; overflow: hidden; min-height: 250px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 22px 44px -22px rgba(0, 0, 0, 0.6);
  background: radial-gradient(70% 80% at 100% 100%, rgba(255, 122, 26, 0.6), transparent 62%), linear-gradient(150deg, #0b0b0d, #1e1309 72%); }
.sello-nuevo { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; background: #ff7a1a; color: #16110c; font-family: var(--fuente); font-size: 11.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
.promo-tienda h2 { font-size: 21px; max-width: 12em; }
.promo-tienda p { font-size: 14.5px; color: rgba(255, 255, 255, 0.84); max-width: calc(100% - 132px); }
.promo-tienda .boton { margin-top: 4px; background: linear-gradient(135deg, #ffa040, #ff7a1a); color: #16110c; box-shadow: 0 12px 24px -12px rgba(255, 122, 26, 0.9); }
.promo-tienda .promo-nota { max-width: calc(100% - 132px); font-size: 13.5px; font-weight: 600; color: #ffc38f; }
.promo-tienda .mascota { position: absolute; right: -2px; bottom: -12px; }

/* ── Bandeja ──────────────────────────────────────────────────────────── */
.bandeja { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: 100%; margin: 12px 28px 22px; height: calc(100% - 34px); background: var(--blanco); border: 1px solid var(--linea); border-radius: 24px; overflow: hidden; box-shadow: var(--sombra-1); }
.bandeja-lista { border-right: 1px solid var(--linea); display: flex; flex-direction: column; min-height: 0; }
.bandeja-lista > header { display: flex; align-items: center; gap: 12px; padding: 22px 22px 14px; }
.conversaciones { list-style: none; margin: 0; padding: 0 10px 12px; overflow: auto; flex: 1; }
.conversaciones button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; width: 100%; padding: 12px; border: 0; border-radius: 16px; background: none; text-align: left; }
.conversaciones button:hover { background: var(--fondo); }
.conversaciones button[aria-current="true"] { background: var(--menta); }
.conversaciones .avatar { grid-row: span 2; }
.conversaciones .quien { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversaciones .hora { font-size: 12px; color: var(--texto-3); }
.conversaciones .ultimo { color: var(--texto-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversaciones .marcas { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-family: var(--fuente-titulos); font-size: 15px; font-weight: 700; flex: none; background: var(--menta); color: var(--verde-oscuro); }
.avatar[data-tono="1"] { background: #def3f0; color: #0d6e66; }
.avatar[data-tono="2"] { background: var(--alerta-suave); color: var(--alerta); }
.avatar[data-tono="3"] { background: var(--lila-suave); color: var(--lila); }
.avatar[data-tono="4"] { background: #f9e6ee; color: #96305a; }
.punto { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--verde-vivo); color: var(--verde-oscuro); font-size: 12px; font-weight: 800; text-align: center; line-height: 22px; }
.vacio { display: grid; place-items: center; align-content: center; gap: 8px; padding: 40px 24px; text-align: center; color: var(--texto-2); height: 100%; }
.vacio strong { font-family: var(--fuente-titulos); font-size: 20px; font-weight: 700; color: var(--texto); letter-spacing: -0.025em; margin-top: 8px; }
.vacio > span { max-width: 38ch; }

.hilo { display: flex; flex-direction: column; min-height: 0; }
.hilo-cabecera { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--linea); }
.hilo-cabecera .quien { flex: 1; min-width: 0; }
.hilo-cabecera .quien strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hilo-cabecera .quien span { font-size: 13px; color: var(--texto-2); }
.volver { display: none; }
.modo { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--fondo); border: 1px solid var(--linea); }
.modo button { height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--texto-2); font-size: 14px; font-weight: 600; }
.modo button[aria-pressed="true"] { background: var(--degradado-marca); color: #fff; box-shadow: 0 8px 16px -10px rgba(7, 148, 71, 0.9); }
.mensajes { flex: 1; overflow: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; background: var(--chat-fondo); }
.burbuja { max-width: min(560px, 82%); padding: 9px 14px 7px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.1); }
.burbuja small { display: block; margin-top: 2px; font-size: 12px; opacity: 0.66; text-align: right; }
.burbuja.cliente { align-self: flex-start; background: #fff; border-top-left-radius: 6px; }
.burbuja.asistente { align-self: flex-end; background: var(--chat-salida); border-top-right-radius: 6px; }
.burbuja.humano { align-self: flex-end; background: var(--verde); color: #fff; border-top-right-radius: 6px; }
.burbuja.fallido { outline: 2px solid var(--peligro); }
.nota { align-self: center; max-width: 86%; padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); color: var(--texto-2); font-size: 12.5px; font-weight: 500; text-align: center; box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.08); }
.escribiendo { align-self: flex-end; display: flex; align-items: center; gap: 5px; padding: 12px 16px; border-radius: 18px 6px 18px 18px; background: var(--chat-salida); box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.1); }
.escribiendo i { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.redactar { display: flex; align-items: flex-end; gap: 10px; padding: 12px 20px 16px; background: var(--blanco); border-top: 1px solid var(--linea); }
.redactar textarea { min-height: 48px; max-height: 140px; resize: none; border-radius: 24px; padding: 12px 18px; background: var(--fondo); }
.redactar .boton.cuadrado { width: 48px; height: 48px; }

/* ── Listas y piezas sueltas ──────────────────────────────────────────── */
.listado { list-style: none; margin: 0; padding: 0; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio-tarjeta); overflow: hidden; box-shadow: var(--sombra-1); }
.listado > li { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--linea); }
.listado > li:first-child { border-top: 0; }
.listado > li:hover { background: #f8fcf9; }
.listado .principal-texto { flex: 1; min-width: 0; }
.listado .principal-texto strong { display: block; font-weight: 600; font-size: 16px; }
.listado .principal-texto span { color: var(--texto-2); font-size: 14px; }
.listado .precio { padding: 5px 14px; border-radius: 999px; background: var(--menta); color: var(--verde-oscuro); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barra-acciones { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.copiable { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border: 1.5px dashed var(--linea-fuerte); border-radius: var(--radio); background: var(--fondo); }
.copiable code { flex: 1; min-width: 0; }
.prueba { display: flex; flex-direction: column; height: min(600px, 66vh); border: 1px solid var(--linea); border-radius: 24px; overflow: hidden; box-shadow: var(--sombra-1); background: var(--blanco); }
.prueba-cabecera { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--linea); }
.prueba-cabecera strong { display: block; }
.prueba-cabecera span { font-size: 13px; color: var(--texto-2); }
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; margin: 0; }
.datos dt { font-size: 13.5px; color: var(--texto-2); }
.datos dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.guia-pasos { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: paso; }
.guia-pasos li { counter-increment: paso; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.guia-pasos li::before { content: counter(paso); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--menta); color: var(--verde-oscuro); font-weight: 800; font-size: 14px; }
.guia-pasos strong { display: block; }
.guia-pasos span { font-size: 14px; color: var(--texto-2); }

/* ── Diálogo y avisos emergentes ──────────────────────────────────────── */
dialog { width: min(480px, calc(100% - 32px)); padding: 30px; border: 0; border-radius: 26px; background: var(--blanco); color: var(--texto); box-shadow: 0 30px 70px -20px rgba(3, 30, 19, 0.55); }
dialog::backdrop { background: rgba(6, 40, 26, 0.55); }
dialog form { display: grid; gap: 18px; }
dialog h2 { font-size: 22px; }
dialog h2 + p { margin-top: 4px; }
.avisos { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 10px; z-index: 60; pointer-events: none; justify-items: center; }
.avisos > div { display: flex; align-items: center; gap: 12px; padding: 8px 22px 8px 10px; border-radius: 999px; background: var(--verde-oscuro); color: #fff; font-size: 14.5px; font-weight: 600; box-shadow: 0 16px 34px -14px rgba(3, 30, 19, 0.75); }
.avisos > div.error { padding-left: 22px; background: var(--peligro); }
.telon { display: none; }

/* ── Tabletas y portátiles pequeños ───────────────────────────────────── */
@media (max-width: 1180px) {
  .estadisticas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dos-columnas { grid-template-columns: minmax(0, 1fr); }
  .banner { grid-template-columns: minmax(0, 1fr) 300px; }
  .banner-mascota { right: 64px; }
  .banner-mascota .mascota { --tam: 230px !important; }
}

/* ── Teléfonos y pantallas angostas: el menú pasa a un panel deslizante ── */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); box-shadow: 0 0 60px rgba(3, 30, 19, 0.35); }
  .app[data-menu="abierto"] .lateral { transform: none; }
  .app[data-menu="abierto"] .telon { display: block; position: fixed; inset: 0; background: rgba(6, 40, 26, 0.5); z-index: 25; border: 0; }
  .abrir-menu { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--linea); border-radius: 14px; background: var(--blanco); color: var(--texto); box-shadow: var(--sombra-1); flex: none; }
  .superior { padding: 12px 16px 4px; gap: 10px; }
  .selector select { max-width: 46vw; height: 46px; }
  .conexion span, .cuenta .nombre, .superior-der .divisor { display: none; }
  .cuenta > button > .icono { display: none; }
  .avisos-sistema { padding: 8px 16px 0; }
  .pagina-interior { padding: 14px 16px 44px; gap: 18px; }
  .encabezado .placa { display: none; }

  .banner { grid-template-columns: minmax(0, 1fr); min-height: 0; margin-top: 8px; padding: 26px 22px 0; border-radius: 24px; }
  /* El margen de arriba deja sitio al brinco de la mascota (sube hasta un 17 % de su alto),
     para que no tape el botón que tiene encima. */
  .banner-mascota { position: relative; right: auto; bottom: auto; justify-self: end; margin: 40px 64px -2px 0; }
  .banner-mascota .mascota { --tam: 180px !important; }
  .banner .fila .boton { flex: 1 1 auto; }
  .configuracion { grid-template-columns: minmax(0, 1fr); padding-right: 20px; }
  .config-texto { padding-bottom: 4px; }
  .config-mascota { min-height: 210px; margin: 0 -20px 0 -20px; }
  .config-mascota .mascota { --tam: 150px !important; }
  .promo-tienda { min-height: 230px; }
  .promo-tienda .mascota { --tam: 124px !important; }
  .rejilla.dos { grid-template-columns: minmax(0, 1fr); }
  .tarjeta { padding: 20px; }

  .bandeja { grid-template-columns: minmax(0, 1fr); margin: 8px 0 0; height: calc(100% - 8px); border-radius: 22px 22px 0 0; border-bottom: 0; }
  .bandeja[data-abierta="si"] .bandeja-lista { display: none; }
  .bandeja:not([data-abierta="si"]) .hilo { display: none; }
  .volver { display: inline-flex; }
  .mensajes { padding: 16px 14px; }
  .hilo-cabecera { padding: 10px 12px; gap: 8px; }
  .modo button { padding: 0 12px; }
  .listado > li { padding: 14px 16px; gap: 10px; flex-wrap: wrap; }

  .puerta { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .puerta-heroe { padding: 22px 20px 0; }
  .heroe-texto { margin-top: 20px; gap: 10px; }
  .heroe-texto h1 { font-size: 28px; }
  .heroe-puntos { display: none; }
  .heroe-mascota { margin: 6px 6% 0 0; }
  .heroe-mascota .mascota { --tam: 130px !important; }
  .heroe-mascota .globo { display: none; }
  .puerta-centro { align-items: flex-start; padding: 22px 16px 40px; }
  .puerta-caja { padding: 26px; }
}

@media (max-width: 560px) {
  .estadisticas { grid-template-columns: minmax(0, 1fr); }
  .acciones-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 24px; }
  .chispa { width: 72px; }
}

/* ── Movimiento (se omite si la persona pidió reducirlo) ──────────────── */
@media (prefers-reduced-motion: no-preference) {
  .boton, .nav button, .conversaciones button, .accion, .pasos button, .pasos .ir, .listado > li, .actividad li button, .cuenta > button, .menu-cuenta button, input, select, textarea, .estadistica, .lateral {
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2), filter 0.16s ease, opacity 0.16s ease;
  }
  .boton:not(.discreto):not(.peligro):hover, .accion:hover, .estadistica:hover { transform: translateY(-2px); }
  .boton:active, .accion:active { transform: translateY(0) scale(0.97); }
  .nav button:hover .icono { transform: scale(1.12); }
  .nav button .icono { transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
  .accion:hover .icono { transform: scale(1.14) rotate(-6deg); }
  .accion .icono { transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
  .pagina-interior > *, .bandeja { animation: entrar 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .pagina-interior > :nth-child(2) { animation-delay: 0.05s; }
  .pagina-interior > :nth-child(3) { animation-delay: 0.1s; }
  .pagina-interior > :nth-child(4) { animation-delay: 0.15s; }
  .puerta-caja, .heroe-texto { animation: entrar 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .burbuja, .nota, .escribiendo { animation: aparecer 0.22s ease-out both; }
  .avisos > div { animation: aparecer 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
  .menu-cuenta { animation: aparecer 0.16s ease-out both; transform-origin: top right; }
  .avance > i { animation: llenar 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; transform-origin: left; }
  .chispa polyline { stroke-dasharray: 220; animation: trazar 1.1s 0.2s ease-out both; }
  .conexion i, .indicador i { animation: latido 2.2s ease-out infinite; }

  /* La mascota: respira, se balancea, parpadea, mira el cursor y salta. */
  .mascota { animation: llegar 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
  .mascota-cuerpo { animation: respirar 3.4s ease-in-out infinite; }
  .mascota-balanceo { animation: balanceo 6.5s ease-in-out infinite; }
  .ojo .pupila { transition: transform 0.14s ease-out, opacity 0.12s ease; }
  .ojo .parpado { transition: clip-path 0.08s ease-in; }
  .mascota[data-viva]:hover .mascota-salto, .mascota.salta .mascota-salto { animation: brinco 0.62s cubic-bezier(0.3, 0, 0.3, 1); }
  .mascota[data-estado="feliz"] .mascota-salto { animation: brinco 1.5s cubic-bezier(0.3, 0, 0.3, 1) infinite; }
  /* Alegre: brinca cada pocos segundos y se mece como saludando, con los ojos abiertos. */
  .mascota[data-estado="alegre"] .mascota-salto { animation: brinco-alegre 2.8s cubic-bezier(0.3, 0, 0.3, 1) infinite; }
  .mascota[data-estado="alegre"] .mascota-balanceo { animation: mecer 1.5s ease-in-out infinite; }
  .mascota[data-estado="alegre"] .mascota-sombra { animation: sombra-alegre 2.8s ease-in-out infinite; }
  .mano { animation: saludo 2.8s ease-in-out infinite; }
  .burbuja-wa { animation: flotar 4.2s ease-in-out infinite; }
  .destellos path { animation: destello 1.9s ease-in-out infinite; }
  .destellos path:nth-child(2) { animation-delay: 0.25s; }
  .destellos path:nth-child(3) { animation-delay: 0.5s; }
  .banner-fondo .onda-2 { animation: ondear 9s ease-in-out infinite; }
  .banner-fondo .onda-3 { animation: ondear 7s ease-in-out infinite reverse; }
  .mascota[data-estado="pensando"] .mascota-balanceo { animation: pensar 1.6s ease-in-out infinite; }
  .mascota[data-estado="dormida"] .mascota-cuerpo { animation-duration: 5.2s; }
  .mascota.salta .mascota-sombra, .mascota[data-estado="feliz"] .mascota-sombra { animation: sombra 0.62s ease-in-out; }
  .globo { animation: flotar 4.5s ease-in-out infinite; }
  .globo i, .escribiendo i { animation: puntos 1.2s ease-in-out infinite; }
  .globo i:nth-child(2), .escribiendo i:nth-child(2) { animation-delay: 0.15s; }
  .globo i:nth-child(3), .escribiendo i:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes entrar { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes llenar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes trazar { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(32, 201, 104, 0.6); } 100% { box-shadow: 0 0 0 9px rgba(32, 201, 104, 0); } }
@keyframes llegar { from { opacity: 0; transform: translateY(10%) scale(0.86); } 60% { opacity: 1; transform: translateY(-3%) scale(1.04); } to { transform: none; } }
@keyframes respirar { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, 0.98); } }
@keyframes balanceo { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@keyframes pensar { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes brinco {
  0% { transform: translateY(0) scale(1, 1); }
  16% { transform: translateY(0) scale(1.07, 0.9); }
  44% { transform: translateY(-13%) scale(0.96, 1.05) rotate(-3deg); }
  62% { transform: translateY(-9%) scale(0.98, 1.03) rotate(3deg); }
  80% { transform: translateY(0) scale(1.05, 0.94); }
  100% { transform: none; }
}
@keyframes sombra { 0%, 100% { transform: scale(1); opacity: 1; } 45% { transform: scale(0.72); opacity: 0.55; } }
@keyframes brinco-alegre {
  0%, 30%, 100% { transform: translateY(0) scale(1, 1); }
  5% { transform: translateY(0) scale(1.07, 0.91); }
  13% { transform: translateY(-12%) scale(0.96, 1.05); }
  19% { transform: translateY(-8%) scale(0.98, 1.03); }
  25% { transform: translateY(0) scale(1.05, 0.95); }
}
@keyframes sombra-alegre { 0%, 30%, 100% { transform: scale(1); opacity: 1; } 14% { transform: scale(0.72); opacity: 0.55; } }
@keyframes mecer { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(4deg); } }
@keyframes saludo { 0%, 55%, 100% { transform: rotate(0deg); } 8%, 24%, 40% { transform: rotate(18deg); } 16%, 32%, 48% { transform: rotate(-10deg); } }
@keyframes destello { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes ondear { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-2.5%); } }
@keyframes flotar { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes puntos { 0%, 60%, 100% { transform: translateY(0); opacity: 0.55; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ══════════════════════════════════════════════════════════════════════
   LIQUID GLASS (skill apple-design › liquid-glass.md y materials.md)
   Regla: el vidrio solo va en la capa funcional que flota sobre el
   contenido (barra lateral, barra superior, menús, ventanas, avisos).
   Las tarjetas y el contenido siguen opacos. Regular = texto abundante;
   clear = controles sobre fondos ricos (el banner verde).
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --vidrio-regular: rgba(255, 255, 255, 0.66);
  --vidrio-denso: rgba(255, 255, 255, 0.78);
  --vidrio-claro: rgba(255, 255, 255, 0.14);
  --vidrio-borde: rgba(255, 255, 255, 0.72);
  --vidrio-brillo: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(20, 37, 29, 0.04);
  --vidrio-sombra: 0 1px 2px rgba(20, 37, 29, 0.06), 0 18px 40px -22px rgba(6, 61, 40, 0.42);
  --desenfoque: blur(28px) saturate(1.5);
  --desenfoque-claro: blur(12px) saturate(1.4);
  --alto-superior: 78px;
}

/* Capa de contenido con color de marca: el vidrio necesita algo que reflejar. */
.app {
  background:
    radial-gradient(42% 46% at 0% 0%, rgba(32, 201, 104, 0.22), transparent 70%),
    radial-gradient(38% 42% at 100% 6%, rgba(7, 148, 71, 0.14), transparent 70%),
    radial-gradient(46% 50% at 30% 100%, rgba(32, 201, 104, 0.14), transparent 70%),
    var(--fondo);
}

/* Barra lateral: panel de vidrio regular que flota con margen. */
.lateral {
  margin: 12px 0 12px 12px; border: 1px solid var(--vidrio-borde); border-radius: 28px;
  background: var(--vidrio-denso); -webkit-backdrop-filter: var(--desenfoque); backdrop-filter: var(--desenfoque);
  box-shadow: var(--vidrio-brillo), var(--vidrio-sombra);
}
.nav button[aria-current="page"] { background: rgba(232, 247, 237, 0.85); box-shadow: inset 0 0 0 1px rgba(7, 148, 71, 0.16), 0 6px 14px -10px rgba(7, 148, 71, 0.6); }
.nav button:hover { background: rgba(20, 37, 29, 0.05); }
/* La tarjeta de ayuda es contenido dentro del vidrio: relleno tenue, sin vidrio encima de vidrio. */
.ayuda { background: rgba(232, 247, 237, 0.72); border-color: rgba(7, 148, 71, 0.1); }
.plan { border-top-color: rgba(20, 37, 29, 0.08); }

/* Barra superior: flota sobre el contenido, que pasa por debajo. */
.columna { position: relative; }
.superior { position: absolute; inset: 0 0 auto 0; z-index: 20; padding: 14px 28px 14px; pointer-events: none; }
.superior > * { pointer-events: auto; }
/* Efecto de borde de desplazamiento: el contenido se desenfoca y se desvanece al llegar a la barra. */
.superior::before {
  content: ""; position: absolute; inset: 0 0 -26px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(245, 248, 246, 0.7) 0%, rgba(245, 248, 246, 0.35) 70%, rgba(245, 248, 246, 0) 100%);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.pagina { display: flex; flex-direction: column; padding-top: var(--alto-superior); }
.pagina-contenido { flex: 1 0 auto; height: auto; }
.pagina-contenido:has(.bandeja) { flex: 1 1 0; min-height: 0; }

/* Controles de la barra: cápsulas de vidrio regular. */
.selector select, .superior-der, .abrir-menu {
  background-color: var(--vidrio-regular); border: 1px solid var(--vidrio-borde);
  -webkit-backdrop-filter: var(--desenfoque); backdrop-filter: var(--desenfoque);
  box-shadow: var(--vidrio-brillo), var(--vidrio-sombra);
}
.superior-der { gap: 12px; height: 52px; padding: 0 6px 0 16px; border-radius: 999px; }
.superior-der .divisor { background: rgba(20, 37, 29, 0.12); }

/* Menú de cuenta (popover), ventanas (sheets y alertas) y avisos: vidrio regular denso. */
.menu-cuenta, dialog {
  background: var(--vidrio-denso); border: 1px solid var(--vidrio-borde);
  -webkit-backdrop-filter: blur(32px) saturate(1.6); backdrop-filter: blur(32px) saturate(1.6);
  box-shadow: var(--vidrio-brillo), 0 30px 70px -24px rgba(3, 30, 19, 0.5);
}
dialog::backdrop { background: rgba(6, 40, 26, 0.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.avisos > div { background: rgba(6, 61, 40, 0.8); border: 1px solid rgba(255, 255, 255, 0.16); -webkit-backdrop-filter: var(--desenfoque); backdrop-filter: var(--desenfoque); }
.avisos > div.error { background: rgba(179, 38, 30, 0.86); }
.aviso-sistema {
  background: rgba(255, 245, 214, 0.74); border-color: rgba(241, 221, 156, 0.9);
  -webkit-backdrop-filter: var(--desenfoque); backdrop-filter: var(--desenfoque); box-shadow: var(--vidrio-brillo);
}

/* Vidrio claro solo sobre fondos ricos: el botón secundario del banner verde. */
.banner .boton.contorno {
  background: var(--vidrio-claro); border-color: rgba(255, 255, 255, 0.36);
  -webkit-backdrop-filter: var(--desenfoque-claro); backdrop-filter: var(--desenfoque-claro);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.banner .boton.contorno:hover { background: rgba(255, 255, 255, 0.24); }
.banner .indicador { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: var(--desenfoque-claro); backdrop-filter: var(--desenfoque-claro); }

/* Celular: el menú deslizante es el panel de vidrio; la barra superior se ajusta. */
@media (max-width: 900px) {
  :root { --alto-superior: 70px; }
  .lateral { margin: 0; border-radius: 0 28px 28px 0; border-left: 0; }
  .superior { padding: 12px 16px; }
  .superior-der { height: 48px; padding: 0 4px 0 12px; gap: 8px; }
  .app[data-menu="abierto"] .telon { background: rgba(6, 40, 26, 0.32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
}

/* Accesibilidad: sin transparencia o con más contraste, todo pasa a superficies opacas. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .lateral, .selector select, .superior-der, .abrir-menu, .menu-cuenta, dialog, .aviso-sistema, .avisos > div, .banner .boton.contorno, .banner .indicador, .superior::before, dialog::backdrop, .app[data-menu="abierto"] .telon {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  .lateral, .selector select, .superior-der, .abrir-menu, .menu-cuenta, dialog { background-color: var(--blanco); border-color: var(--linea-fuerte); }
  .superior::before { background: var(--fondo); -webkit-mask-image: none; mask-image: none; inset: 0; }
  .aviso-sistema { background: var(--alerta-suave); border-color: var(--alerta-linea); }
  .avisos > div { background: var(--verde-oscuro); }
  .avisos > div.error { background: var(--peligro); }
  .banner .boton.contorno, .banner .indicador { background: rgba(6, 61, 40, 0.92); border-color: rgba(255, 255, 255, 0.6); }
  dialog::backdrop { background: rgba(6, 40, 26, 0.6); }
}
@media (prefers-contrast: more) {
  .lateral, .selector select, .superior-der, .menu-cuenta, dialog, .tarjeta, .estadistica { border-color: rgba(20, 37, 29, 0.45); }
}
/* Navegadores sin desenfoque: fondos casi opacos para que el texto se lea. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lateral, .selector select, .superior-der, .abrir-menu, .menu-cuenta, dialog { background-color: rgba(255, 255, 255, 0.96); }
  .superior::before { background: rgba(245, 248, 246, 0.94); }
}

/* El icono de la tienda va encima de la cápsula de vidrio del selector. */
.selector > .icono { z-index: 1; }
.selector::after { z-index: 1; }

/* ══════════════════════════════════════════════════════════════════════
   LOS DOS APARTADOS
   Piezas que presentan el apartado de dropshipping dentro del panel verde
   (entrada, activación, crear negocio) y piezas nuevas de las tiendas, que
   funcionan con cualquiera de los dos temas.
   ══════════════════════════════════════════════════════════════════════ */

/* Entrada y activación: el apartado de dropshipping con su mascota naranja. */
.promo-puerta { position: absolute; left: 52px; bottom: 34px; z-index: 1; display: flex; align-items: center; gap: 12px; width: min(304px, 42%); padding: 14px 18px 14px 10px; border-radius: 22px; color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.75);
  background: radial-gradient(90% 120% at 0% 100%, rgba(255, 122, 26, 0.5), transparent 62%), linear-gradient(150deg, #0b0b0d, #1e1309 72%); }
.promo-puerta > div:not(.mascota) { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.promo-puerta strong { font-family: var(--fuente-titulos); font-size: 18px; letter-spacing: -0.02em; }
.promo-puerta p { font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.82); }
.apartados { display: grid; gap: 8px; }
.apartados-titulo { font-size: 13.5px; color: var(--texto-2); }
.apartados-fila { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.apartado { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--menta); color: var(--verde-oscuro); font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.apartado[data-tema="dropshipping"] { background: linear-gradient(150deg, #0b0b0d, #24160a); color: #ffc38f; }

/* Elegir qué se crea: un negocio (verde) o una tienda de dropshipping (negro y naranja). */
.tipos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tipo { position: relative; display: grid; justify-items: center; align-content: start; gap: 5px; padding: 14px 12px; border: 2px solid var(--linea); border-radius: 20px; background: var(--blanco); color: var(--texto); text-align: center; cursor: pointer; }
.tipo input { position: absolute; opacity: 0; pointer-events: none; }
.tipo strong { font-family: var(--fuente-titulos); font-size: 15px; letter-spacing: -0.02em; line-height: 1.2; }
.tipo span { font-size: 13px; line-height: 1.35; color: var(--texto-2); }
.tipo[data-tipo="negocio"] { background: #f1faf4; color: #14251d; border-color: rgba(7, 148, 71, 0.18); }
.tipo[data-tipo="negocio"] span { color: #5d6c64; }
.tipo[data-tipo="negocio"]:has(input:checked) { border-color: #079447; box-shadow: 0 0 0 4px rgba(32, 201, 104, 0.22); }
.tipo[data-tipo="dropshipping"] { background: linear-gradient(160deg, #0b0b0d, #24160a); color: #fff; border-color: #2c2c33; }
.tipo[data-tipo="dropshipping"] span { color: rgba(255, 255, 255, 0.74); }
.tipo[data-tipo="dropshipping"]:has(input:checked) { border-color: #ff7a1a; box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.28); }
.tipo:has(input:focus-visible) { outline: 2px solid var(--verde); outline-offset: 3px; }
.tipo[data-bloqueado] { opacity: 0.55; cursor: not-allowed; }

/* Logo con el nombre del apartado debajo. */
.logo-texto { display: grid; line-height: 1.05; }
.logo-texto small { font-family: var(--fuente); font-size: 11px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--verde); }

/* Buscador y filtros. */
.barra-filtros { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.buscador { position: relative; flex: 1 1 260px; min-width: 0; display: block; }
.buscador .icono { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--texto-3); pointer-events: none; }
.buscador input { padding-left: 46px; border-radius: 999px; }
.modo.filtros { flex-wrap: wrap; border-radius: 26px; }
.modo.filtros button { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; }
.modo .cuenta { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--linea-fuerte); font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.modo button[aria-pressed="true"] .cuenta { background: rgba(0, 0, 0, 0.18); }

/* Listas en las que toda la fila se puede tocar (pedidos, clientes). */
.listado.tocable > li { padding: 0; }
.listado.tocable > li > button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; width: 100%; padding: 16px 22px; border: 0; background: none; text-align: left; }
.fila-pedido .texto { display: grid; gap: 1px; min-width: 0; }
.fila-pedido .quien { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-pedido .detalle { color: var(--texto-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-pedido .lado { display: grid; justify-items: end; gap: 6px; }
.fila-pedido .chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fila-pedido .monto { font-family: var(--fuente-titulos); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip[data-tono="lila"] { background: var(--lila-suave); color: var(--lila); }

/* Ventana de ficha: pedido, cliente, buscador de Dropi. */
dialog.ventana { width: min(720px, calc(100% - 24px)); padding: 0; }
.ventana-cabecera { display: flex; align-items: center; gap: 12px; padding: 22px 20px 12px 26px; }
.ventana-cabecera h2 { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ventana-cuerpo { display: grid; gap: 16px; padding: 4px 26px 26px; max-height: min(76vh, 760px); overflow: auto; }
.bloque { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: var(--fondo); border: 1px solid var(--linea); }
.bloque h3 { font-family: var(--fuente); font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--texto-2); }
.datos small { display: block; margin-top: 2px; font-size: 12.5px; }
.acciones-ficha { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 2px; }
.alerta-ficha { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--peligro-suave); color: var(--peligro); font-size: 14.5px; font-weight: 500; }
.alerta-ficha > span { flex: 1 1 220px; min-width: 0; }
.alerta-ficha[data-tono="ambar"] { background: var(--alerta-suave); color: var(--alerta); }

/* Producto de una tienda: ofertas, enlace con Dropi y fotos. */
.producto-tienda { display: grid; gap: 18px; }
.producto-cabecera { display: flex; align-items: flex-start; gap: 12px; }
.producto-cabecera > div { flex: 1; min-width: 0; }
.descripcion-corta { margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ofertas-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ofertas-lista li { display: grid; gap: 2px; min-width: 138px; padding: 12px 16px; border-radius: 16px; background: var(--menta); }
.ofertas-lista strong { font-family: var(--fuente-titulos); font-size: 19px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ofertas-lista span { font-size: 13.5px; color: var(--texto-2); }
.ofertas-editor { display: grid; gap: 10px; }
.oferta-fila { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.25fr) 40px; gap: 8px; align-items: center; }
.oferta-fila.rotulos { font-size: 12.5px; font-weight: 600; color: var(--texto-2); }
.fotos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.foto { position: relative; width: 88px; height: 88px; border-radius: 16px; overflow: hidden; border: 1px solid var(--linea); background: var(--fondo); }
.foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.foto button { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.68); color: #fff; }
.foto button .icono { width: 15px; height: 15px; stroke-width: 2.4; }
.foto-nueva { display: grid; place-items: center; align-content: center; gap: 4px; width: 88px; height: 88px; border: 1.5px dashed var(--linea-fuerte); border-radius: 16px; background: none; color: var(--texto-2); font-size: 12.5px; font-weight: 600; }
.foto-nueva:hover { border-color: var(--verde); color: var(--verde); }
.oculto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Interruptor y conexión con Dropi. */
.interruptor { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.interruptor > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.interruptor span { font-size: 14px; }
.interruptor input[type="checkbox"] { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 52px; height: 30px; margin: 2px 0 0; border-radius: 999px; background: var(--linea-fuerte); cursor: pointer; }
.interruptor input[type="checkbox"]::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.interruptor input[type="checkbox"]:checked { background: var(--verde); }
.interruptor input[type="checkbox"]:checked::after { transform: translateX(22px); }
.conexion-dropi { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.conexion-dropi > div { flex: 1 1 240px; min-width: 0; }
.conexion-dropi .fila { margin-bottom: 2px; }

/* Curso. */
.curso-cabecera { display: flex; align-items: center; gap: 18px; }
.curso-cabecera > div:not(.mascota) { flex: 1; min-width: 0; display: grid; gap: 10px; }
.curso-cabecera .config-avance strong { white-space: nowrap; font-size: 14px; color: var(--texto-2); }
.lecciones { display: grid; gap: 12px; }
.leccion { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio-tarjeta); box-shadow: var(--sombra-1); overflow: hidden; }
.leccion > summary { display: flex; align-items: center; gap: 14px; padding: 16px 22px; cursor: pointer; list-style: none; }
.leccion > summary::-webkit-details-marker { display: none; }
.leccion > summary > div { flex: 1; min-width: 0; }
.leccion > summary strong { display: block; font-size: 16.5px; }
.leccion > summary span { font-size: 13.5px; color: var(--texto-2); }
.leccion > summary > .icono { color: var(--texto-3); }
.leccion[open] > summary > .icono { transform: rotate(180deg); }
.leccion .numero { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--menta); color: var(--verde-oscuro); font-family: var(--fuente-titulos); font-size: 15px; font-weight: 700; flex: none; }
.leccion .numero .icono { width: 19px; height: 19px; stroke-width: 3; }
.leccion[data-hecha="si"] .numero { background: var(--verde); color: var(--sobre-acento); }
.leccion-cuerpo { display: grid; gap: 14px; padding: 2px 22px 22px 74px; font-size: 15.5px; }
.leccion-cuerpo ol, .leccion-cuerpo ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.leccion-cuerpo li::marker { color: var(--verde); font-weight: 700; }
.consejo { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--alerta-suave); color: var(--alerta); font-size: 14.5px; font-weight: 500; }
.consejo .icono { margin-top: 1px; }

/* La burbuja del paquete, junto a la mascota de la tienda. */
/* Disco negro: la caja 3D (naranja) resalta y la burbuja sigue la pareja naranja y negro del panel. */
.burbuja-wa.pedido .wa-disco { fill: #16110c; }
.burbuja-wa .wa-caja-3d { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45)); }

@media (max-width: 900px) {
  .promo-puerta { position: static; width: auto; margin-top: 14px; padding: 10px 14px 10px 6px; }
  .promo-puerta p { display: none; }
  .promo-puerta .mascota { --tam: 58px !important; }
  .listado.tocable > li > button { padding: 14px 16px; grid-template-columns: minmax(0, 1fr) auto; }
  .listado.tocable > li > button > .placa, .listado.tocable > li > button > .avatar { display: none; }
  .ventana-cabecera { padding: 18px 12px 10px 18px; }
  .ventana-cuerpo { padding: 2px 18px 20px; max-height: 80vh; }
  .oferta-fila { grid-template-columns: 84px minmax(0, 1fr) 40px; }
  .oferta-fila .etiqueta { grid-column: 1 / 3; grid-row: 2; }
  .oferta-fila.rotulos { display: none; }
  .leccion > summary { padding: 14px 16px; }
  .leccion-cuerpo { padding: 2px 16px 18px; }
  .curso-cabecera .mascota { --tam: 84px !important; }
}
@media (max-width: 560px) {
  .tipos, .apartados-fila { grid-template-columns: minmax(0, 1fr); }
  .acciones-ficha .boton { flex: 1 1 auto; }
  /* En celular, el estado y el valor van debajo del nombre para que no lo recorten. */
  .listado.tocable > li > button { grid-template-columns: minmax(0, 1fr); }
  .fila-pedido .lado { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
  .fila-pedido .chips { justify-content: flex-start; }
}
@media (prefers-reduced-motion: no-preference) {
  .interruptor input[type="checkbox"], .interruptor input[type="checkbox"]::after, .tipo, .foto-nueva, .leccion > summary > .icono, .listado.tocable > li > button {
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2), color 0.16s ease;
  }
  .lecciones > *, .ventana-cuerpo > * { animation: aparecer 0.3s ease-out both; }
}

/* ══════════════════════════════════════════════════════════════════════
   TEMA DROPSHIPPING: NARANJA Y NEGRO
   Se enciende con data-tema="dropshipping" en <html> cuando el negocio
   abierto es una tienda. Misma estructura que el panel verde: cambian los
   colores (fondo negro, superficies carbón, acento naranja, texto de los
   botones en negro) y la mascota, que pasa a ser la naranja del moño negro.
   Los nombres de las variables se conservan ("--verde" es el color de marca).
   ══════════════════════════════════════════════════════════════════════ */
:root[data-tema="dropshipping"] {
  --verde-oscuro: #ffc38f;
  --verde: #ff7a1a;
  --verde-vivo: #ffa040;
  --menta: rgba(255, 122, 26, 0.14);
  --fondo: #0b0b0d;
  --blanco: #17171b;
  --texto: #f6f3ef;
  --texto-2: #ada69e;
  --texto-3: #918a82;
  --linea: rgba(255, 255, 255, 0.09);
  --linea-fuerte: rgba(255, 255, 255, 0.2);

  --alerta: #ffd166;
  --alerta-suave: rgba(255, 209, 102, 0.12);
  --alerta-linea: rgba(255, 209, 102, 0.28);
  --peligro: #ff8a80;
  --peligro-suave: rgba(255, 138, 128, 0.14);
  --lila: #b6beff;
  --lila-suave: rgba(182, 190, 255, 0.13);

  --sobre-acento: #16110c;
  --chat-fondo: #0f0f12;
  --chat-salida: #3a230f;

  --sombra-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 26px -16px rgba(0, 0, 0, 0.85);
  --sombra-2: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -22px rgba(0, 0, 0, 0.95);
  --sombra-boton: 0 10px 22px -10px rgba(255, 122, 26, 0.75);

  --vidrio-regular: rgba(36, 36, 42, 0.66);
  --vidrio-denso: rgba(24, 24, 28, 0.84);
  --vidrio-claro: rgba(255, 255, 255, 0.1);
  --vidrio-borde: rgba(255, 255, 255, 0.1);
  --vidrio-brillo: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  --vidrio-sombra: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px -22px rgba(0, 0, 0, 0.95);
  color-scheme: dark;
}

[data-tema="dropshipping"] .app {
  background:
    radial-gradient(42% 46% at 0% 0%, rgba(255, 122, 26, 0.17), transparent 70%),
    radial-gradient(38% 42% at 100% 6%, rgba(255, 160, 64, 0.08), transparent 70%),
    radial-gradient(46% 50% at 30% 100%, rgba(255, 122, 26, 0.08), transparent 70%),
    var(--fondo);
}

/* Capa de controles (vidrio oscuro). */
[data-tema="dropshipping"] .logo { color: #fff; }
[data-tema="dropshipping"] .nav button:hover { background: rgba(255, 255, 255, 0.06); }
[data-tema="dropshipping"] .nav button[aria-current="page"] { background: rgba(255, 122, 26, 0.17); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.32), 0 6px 14px -10px rgba(255, 122, 26, 0.7); }
[data-tema="dropshipping"] .nav .contador, [data-tema="dropshipping"] .punto { color: #16110c; }
[data-tema="dropshipping"] .ayuda { background: rgba(255, 122, 26, 0.1); border-color: rgba(255, 122, 26, 0.2); }
[data-tema="dropshipping"] .plan { border-top-color: rgba(255, 255, 255, 0.08); }
[data-tema="dropshipping"] .superior::before { background: linear-gradient(180deg, rgba(11, 11, 13, 0.8) 0%, rgba(11, 11, 13, 0.42) 70%, rgba(11, 11, 13, 0) 100%); }
[data-tema="dropshipping"] .superior-der .divisor { background: rgba(255, 255, 255, 0.14); }
[data-tema="dropshipping"] .conexion i { background: #3ddc84; }
[data-tema="dropshipping"] .menu-cuenta, [data-tema="dropshipping"] dialog { box-shadow: var(--vidrio-brillo), 0 30px 70px -24px rgba(0, 0, 0, 0.95); }
[data-tema="dropshipping"] dialog::backdrop { background: rgba(0, 0, 0, 0.58); }
[data-tema="dropshipping"] .avisos > div { background: rgba(34, 34, 40, 0.94); border-color: rgba(255, 122, 26, 0.45); }
[data-tema="dropshipping"] .avisos > div.error { background: rgba(150, 32, 24, 0.94); border-color: rgba(255, 255, 255, 0.16); }
[data-tema="dropshipping"] .aviso-sistema { background: rgba(255, 209, 102, 0.1); border-color: rgba(255, 209, 102, 0.26); box-shadow: none; }
[data-tema="dropshipping"] .aviso-sistema .icono { color: #ffd166; }
[data-tema="dropshipping"] .aviso-sistema button:hover { background: rgba(255, 209, 102, 0.16); }
[data-tema="dropshipping"] .aviso-sistema button.accion { background: rgba(255, 209, 102, 0.16); color: #ffe3a1; }
[data-tema="dropshipping"] .aviso-sistema button.accion:hover { background: rgba(255, 209, 102, 0.26); }

/* Campos y botones. */
[data-tema="dropshipping"] input:hover, [data-tema="dropshipping"] select:hover, [data-tema="dropshipping"] textarea:hover { border-color: rgba(255, 255, 255, 0.34); }
[data-tema="dropshipping"] input:focus, [data-tema="dropshipping"] select:focus, [data-tema="dropshipping"] textarea:focus { border-color: var(--verde); box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.26); }
[data-tema="dropshipping"] .boton.oscuro { background: var(--degradado-marca); box-shadow: var(--sombra-boton); }
[data-tema="dropshipping"] .boton.claro { background: #fff; color: #16110c; }
[data-tema="dropshipping"] .boton.claro:hover { background: #ffe9d6; }
[data-tema="dropshipping"] .placa.llena { color: #16110c; box-shadow: 0 10px 18px -10px rgba(255, 122, 26, 0.8); }
[data-tema="dropshipping"] .chip[data-tono="gris"] { background: rgba(255, 255, 255, 0.08); }
[data-tema="dropshipping"] .modo button[aria-pressed="true"] { color: #16110c; box-shadow: 0 8px 16px -10px rgba(255, 122, 26, 0.9); }
[data-tema="dropshipping"] .aviso-riesgo strong { color: #ffe3a1; }
[data-tema="dropshipping"] .aviso-riesgo p { color: #e6cf93; }
[data-tema="dropshipping"] .qr-pasos li::before { color: #16110c; }
/* El código QR necesita fondo blanco para que el celular lo lea. */
[data-tema="dropshipping"] .qr-zona { background: #fff; border-color: transparent; }
[data-tema="dropshipping"] .qr-cargando, [data-tema="dropshipping"] .qr-listo { color: #5a5550; }
[data-tema="dropshipping"] .qr-listo strong { color: #16110c; }

/* Bienvenida: negro con ondas naranjas oscuras, para que la mascota resalte. */
[data-tema="dropshipping"] .banner { background: linear-gradient(105deg, #0b0b0d 0%, #15100b 42%, #2a1404 100%); border: 1px solid rgba(255, 255, 255, 0.08); }
[data-tema="dropshipping"] .banner-fondo .onda-1 { fill: #3d1b05; opacity: 0.8; }
[data-tema="dropshipping"] .banner-fondo .onda-2 { fill: #7a3406; opacity: 0.62; }
[data-tema="dropshipping"] .banner-fondo .onda-3 { fill: #c4580c; opacity: 0.5; }
[data-tema="dropshipping"] .banner .boton.brillante { background: linear-gradient(135deg, #ffc27a 0%, #ff8a2b 100%); color: #16110c; box-shadow: 0 12px 26px -10px rgba(255, 122, 26, 0.9); }
[data-tema="dropshipping"] .destellos path { stroke: #ffd166; }
[data-tema="dropshipping"] .mascota-sombra { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.62), transparent); }

/* Inicio. */
[data-tema="dropshipping"] .config-avance .avance > i { background: linear-gradient(90deg, #c4580c, var(--verde-vivo)); }
[data-tema="dropshipping"] .config-avance .sello { color: #16110c; box-shadow: 0 8px 14px -8px rgba(255, 122, 26, 0.9); }
[data-tema="dropshipping"] .pasos li[data-hecho="si"] .marca-paso { color: #16110c; }
[data-tema="dropshipping"] .config-mascota { background: radial-gradient(closest-side at 50% 68%, rgba(255, 122, 26, 0.32), rgba(255, 122, 26, 0.08) 58%, transparent 100%); }
[data-tema="dropshipping"] .accion:hover { border-color: rgba(255, 122, 26, 0.42); }
[data-tema="dropshipping"] .listado > li:hover { background: rgba(255, 255, 255, 0.03); }

/* Conversaciones. */
[data-tema="dropshipping"] .burbuja.cliente { background: #26262d; }
[data-tema="dropshipping"] .burbuja.humano { color: #16110c; }
[data-tema="dropshipping"] .nota { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
[data-tema="dropshipping"] .avatar[data-tono="1"] { background: rgba(94, 234, 212, 0.13); color: #7ee8d6; }
[data-tema="dropshipping"] .avatar[data-tono="4"] { background: rgba(247, 168, 196, 0.13); color: #f7a8c4; }

@media (max-width: 900px) {
  [data-tema="dropshipping"] .app[data-menu="abierto"] .telon { background: rgba(0, 0, 0, 0.55); }
}
@media (prefers-reduced-motion: no-preference) {
  [data-tema="dropshipping"] .indicador i { animation-name: latido-naranja; }
}
@keyframes latido-naranja { 0% { box-shadow: 0 0 0 0 rgba(255, 160, 64, 0.6); } 100% { box-shadow: 0 0 0 9px rgba(255, 160, 64, 0); } }

/* Sin transparencia o con más contraste: superficies opacas también en este tema. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  [data-tema="dropshipping"] .avisos > div { background: #222228; }
  [data-tema="dropshipping"] .avisos > div.error { background: #96201a; }
  [data-tema="dropshipping"] .aviso-sistema { background: #2a2413; border-color: rgba(255, 209, 102, 0.4); }
  [data-tema="dropshipping"] .banner .boton.contorno, [data-tema="dropshipping"] .banner .indicador { background: rgba(11, 11, 13, 0.92); }
  [data-tema="dropshipping"] dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
}
@media (prefers-contrast: more) {
  [data-tema="dropshipping"] .lateral, [data-tema="dropshipping"] .selector select, [data-tema="dropshipping"] .superior-der, [data-tema="dropshipping"] .menu-cuenta, [data-tema="dropshipping"] dialog, [data-tema="dropshipping"] .tarjeta, [data-tema="dropshipping"] .estadistica { border-color: rgba(255, 255, 255, 0.5); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-tema="dropshipping"] .lateral, [data-tema="dropshipping"] .selector select, [data-tema="dropshipping"] .superior-der, [data-tema="dropshipping"] .abrir-menu, [data-tema="dropshipping"] .menu-cuenta, [data-tema="dropshipping"] dialog { background-color: rgba(24, 24, 28, 0.97); }
  [data-tema="dropshipping"] .superior::before { background: rgba(11, 11, 13, 0.94); }
}

/* ══════════════════════════════════════════════════════════════════════
   AYUDANTE DEL PANEL (ayudante.js)
   Botón flotante y ventana de chat que acompañan a las tiendas en todas las
   secciones. Es capa de controles: vidrio regular, con alternativa opaca.
   Usa las variables del tema, así que toma los colores del apartado abierto.
   ══════════════════════════════════════════════════════════════════════ */
.ayudante { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: grid; justify-items: end; gap: 12px; pointer-events: none; }
.ayudante[hidden] { display: none; }
.ayudante > * { pointer-events: auto; }
/* En Bandeja y Probar la esquina de abajo es del botón de enviar: el ayudante sube. */
.ayudante[data-seccion="bandeja"], .ayudante[data-seccion="probar"] { bottom: 98px; }
/* Las páginas dejan aire abajo para que el botón no tape lo último. */
html:has(.ayudante:not([hidden])) .pagina-interior { padding-bottom: 104px; }

.ayudante-boton {
  display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 22px 0 10px; border-radius: 999px;
  border: 1px solid var(--vidrio-borde); background: var(--vidrio-denso); color: var(--texto); font-size: 15px; font-weight: 700;
  -webkit-backdrop-filter: var(--desenfoque); backdrop-filter: var(--desenfoque); box-shadow: var(--vidrio-brillo), var(--sombra-2);
}
.ayudante-boton:hover { border-color: var(--verde); }
.ayudante-boton .mascota { pointer-events: none; }
.ayudante[data-abierto] .ayudante-boton { display: none; }

.ayudante-ventana {
  display: flex; flex-direction: column; width: min(404px, calc(100vw - 32px)); height: min(640px, calc(100vh - 44px)); height: min(640px, calc(100dvh - 44px));
  border-radius: 26px; overflow: hidden; border: 1px solid var(--vidrio-borde); background: var(--vidrio-denso); color: var(--texto);
  -webkit-backdrop-filter: blur(32px) saturate(1.6); backdrop-filter: blur(32px) saturate(1.6);
  box-shadow: var(--vidrio-brillo), 0 30px 70px -24px rgba(3, 30, 19, 0.5);
}
.ayudante-ventana[hidden] { display: none; }
[data-tema="dropshipping"] .ayudante-ventana { box-shadow: var(--vidrio-brillo), 0 30px 70px -24px rgba(0, 0, 0, 0.95); }
.ayudante-cabecera { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--linea); }
.ayudante-cabecera .quien { flex: 1; min-width: 0; display: grid; }
.ayudante-cabecera strong { font-family: var(--fuente-titulos); font-size: 16px; letter-spacing: -0.02em; }
.ayudante-cabecera .quien span { font-size: 13px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ayudante-cabecera .boton.cuadrado { width: 44px; height: 44px; flex: none; }

.ayudante-mensajes { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.ayudante-burbuja { max-width: 90%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.48; }
.ayudante-burbuja[data-autor="usuario"] { align-self: flex-end; background: var(--verde); color: var(--sobre-acento); font-weight: 500; border-bottom-right-radius: 6px; }
.ayudante-burbuja[data-autor="ayudante"] { align-self: flex-start; background: var(--menta); border-bottom-left-radius: 6px; }
.ayudante-burbuja[data-modo="sin_respuesta"] { background: var(--alerta-suave); }
.ayudante-pie-burbuja { align-self: flex-start; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 4px 4px; font-size: 12.5px; color: var(--texto-2); }
.ayudante-ir { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 14px; border-radius: 999px; border: 1px solid var(--linea-fuerte); background: none; color: var(--verde-oscuro); font-size: 13.5px; font-weight: 700; }
.ayudante-ir:hover { border-color: var(--verde); }
.ayudante-ir .icono { width: 16px; height: 16px; }
.ayudante-escribiendo { align-self: flex-start; display: flex; align-items: center; gap: 5px; padding: 14px 16px; border-radius: 18px 18px 18px 6px; background: var(--menta); }
.ayudante-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--verde); }
.ayudante-bienvenida { margin: auto; display: grid; justify-items: center; gap: 8px; padding: 8px 12px; text-align: center; color: var(--texto-2); font-size: 14.5px; }
.ayudante-bienvenida strong { font-family: var(--fuente-titulos); font-size: 19px; color: var(--texto); letter-spacing: -0.02em; }

.ayudante-sugerencias { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 10px; }
.ayudante-sugerencias[hidden] { display: none; }
.ayudante-sugerencias[data-compactas="si"] { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-top: 8px; border-top: 1px solid var(--linea); }
.ayudante-sugerencias[data-compactas="si"] button { flex: none; white-space: nowrap; }
.ayudante-sugerencias button { min-height: 38px; padding: 6px 14px; border-radius: 19px; border: 1px solid var(--linea-fuerte); background: none; color: var(--texto); font-size: 13.5px; font-weight: 600; text-align: left; line-height: 1.3; }
.ayudante-sugerencias button:hover { border-color: var(--verde); background: var(--menta); }
.ayudante-redactar { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--linea); }
.ayudante-redactar textarea { flex: 1; min-height: 46px; max-height: 120px; resize: none; border-radius: 23px; padding: 10px 16px; font-size: 15px; }
.ayudante-redactar .boton.cuadrado { width: 46px; height: 46px; flex: none; }
.ayudante-nota { margin: 0; padding: 0 16px 12px; font-size: 12px; color: var(--texto-3); text-align: center; }

@media (max-width: 560px) {
  .ayudante { right: 12px; bottom: 12px; left: 12px; }
  .ayudante[data-seccion="bandeja"], .ayudante[data-seccion="probar"] { bottom: 88px; }
  .ayudante[data-abierto] { bottom: 12px; }
  .ayudante-ventana { width: 100%; height: min(640px, calc(100vh - 24px)); height: min(640px, calc(100dvh - 24px)); }
  .ayudante-boton { height: 52px; padding: 0 18px 0 8px; }
  /* Sobre un chat (Bandeja, Probar) el botón se reduce a la mascota para tapar menos. */
  .ayudante[data-seccion="bandeja"] .ayudante-boton, .ayudante[data-seccion="probar"] .ayudante-boton { width: 52px; padding: 0; justify-content: center; }
  .ayudante[data-seccion="bandeja"] .ayudante-boton span, .ayudante[data-seccion="probar"] .ayudante-boton span { display: none; }
  .ayudante-sugerencias button, .ayudante-ir { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ayudante-ventana { animation: aparecer 0.22s cubic-bezier(0.16, 1, 0.3, 1) both; transform-origin: 100% 100%; }
  .ayudante-burbuja:nth-last-child(-n+3), .ayudante-pie-burbuja:nth-last-child(-n+2) { animation: aparecer 0.2s ease-out both; }
  .ayudante-escribiendo i { animation: puntos 1.2s ease-in-out infinite; }
  .ayudante-escribiendo i:nth-child(2) { animation-delay: 0.15s; }
  .ayudante-escribiendo i:nth-child(3) { animation-delay: 0.3s; }
  .ayudante-boton { transition: border-color 0.15s ease, transform 0.15s ease; }
  .ayudante-boton:active { transform: scale(0.97); }
}
/* Sin transparencia, con más contraste o sin desenfoque: superficies opacas. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .ayudante-boton, .ayudante-ventana { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--blanco); border-color: var(--linea-fuerte); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ayudante-boton, .ayudante-ventana { background: var(--blanco); }
}

/* ══════════════════════════════════════════════════════════════════════
   CONSTRUCTOR DE TIENDAS (constructor/panel.js)
   Lista de páginas, galería de diseños, creación conversando y vista previa.
   Las páginas se ven dentro de marcos: su propio diseño no depende de este archivo.
   ══════════════════════════════════════════════════════════════════════ */
.paginas-rejilla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.pagina-tarjeta { display: grid; gap: 14px; align-content: start; padding: 14px; }
.miniatura { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; border: 1px solid var(--linea); background: #fff; }
.miniatura iframe { position: absolute; top: 0; left: 0; width: 1200px; height: 900px; border: 0; background: #fff; transform-origin: 0 0; pointer-events: none; }
.miniatura.en-creacion { display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--menta); color: var(--texto-2); font-size: 14px; font-weight: 500; }
.pagina-datos { display: grid; gap: 4px; padding: 0 6px; min-width: 0; }
.pagina-datos .fila { justify-content: space-between; flex-wrap: nowrap; min-width: 0; }
/* El nombre cede el espacio (con puntos suspensivos) para que la etiqueta de al lado no se salga de la tarjeta. */
.pagina-datos strong { flex: 1; min-width: 0; font-family: var(--fuente-titulos); font-size: 16.5px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagina-datos .fila > .chip, .pagina-datos .fila > .muestras { flex: none; }
.pagina-datos .tenue { font-size: 13.5px; }
.pagina-datos .categoria { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pagina-datos p { margin-top: 2px; }
.muestras { display: inline-flex; gap: 4px; flex: none; }
.muestras i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--linea-fuerte); }
.pagina-acciones { display: flex; align-items: center; gap: 8px; padding: 0 2px 2px; }
.pagina-acciones .boton:first-child { flex: 1; }
.pagina-acciones .boton.cuadrado { width: 44px; height: 44px; }

.creador-cabecera { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 8px; }
.creador-titulo { flex: 1; min-width: 220px; display: grid; gap: 8px; }
.creador-titulo h1 { font-size: 24px; }
.creador-titulo .config-avance { max-width: 420px; font-size: 13.5px; font-weight: 600; color: var(--texto-2); }
.creador-titulo .config-avance .avance { height: 8px; }
.creador { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.creador-chat { display: flex; flex-direction: column; height: min(680px, 72vh); border: 1px solid var(--linea); border-radius: 24px; overflow: hidden; background: var(--blanco); box-shadow: var(--sombra-1); }
.creador-mensajes { flex: 1; min-height: 0; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--chat-fondo); }
.creador-burbuja { max-width: 86%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.48; box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.1); }
.creador-burbuja[data-autor="disenador"] { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; }
.creador-burbuja[data-autor="persona"] { align-self: flex-end; background: var(--verde); color: var(--sobre-acento); font-weight: 500; border-bottom-right-radius: 6px; }
[data-tema="dropshipping"] .creador-burbuja[data-autor="disenador"] { background: #26262d; }
.creador-fotos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.creador-fotos img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--menta); }
.creador-opciones { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; background: var(--blanco); }
.creador-opciones[hidden] { display: none; }
.creador-opciones button { display: grid; gap: 2px; min-height: 44px; padding: 8px 16px; border-radius: 14px; border: 1px solid var(--linea-fuerte); background: none; color: var(--texto); text-align: left; align-content: center; }
.creador-opciones button:hover { border-color: var(--verde); background: var(--menta); }
.creador-opciones button strong { font-size: 14.5px; }
.creador-opciones button span { font-size: 13px; color: var(--texto-2); line-height: 1.35; }
.creador-opciones button.con-detalle { flex: 1 1 210px; padding: 12px 16px; }
.creador-opciones button[data-principal] { border-color: transparent; background: var(--degradado-marca); color: var(--sobre-acento); box-shadow: var(--sombra-boton); padding: 0 22px; }
.creador-redactar .boton.secundario.cuadrado { width: 48px; height: 48px; flex: none; }
.creador-redactar .boton[hidden] { display: none; }
.creador-resumen { display: grid; gap: 14px; padding: 22px; }
.creador-resumen-cuerpo { display: grid; gap: 14px; }
.creador-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.creador-lista li { display: flex; align-items: flex-start; gap: 10px; }
.creador-lista li > div { display: grid; min-width: 0; }
.creador-lista strong { font-size: 14.5px; }
.creador-lista .tenue { font-size: 13.5px; overflow-wrap: anywhere; }
.creador-marca { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; flex: none; border-radius: 50%; border: 1.5px solid var(--linea-fuerte); }
.creador-lista li[data-listo="si"] .creador-marca { border-color: transparent; background: var(--verde); color: var(--sobre-acento); }
.creador-marca .icono { width: 14px; height: 14px; stroke-width: 3; }
.creador-nota { font-size: 13px; padding-top: 12px; border-top: 1px solid var(--linea); }

/* Ofertas, complementos y oferta especial de una página */
.comercio-formulario .bloque { display: grid; gap: 12px; }
.comercio-formulario .bloque + .bloque { padding-top: 16px; border-top: 1px solid var(--linea); }
.comercio-filas { display: grid; gap: 10px; }
.comercio-filas:empty { display: none; }
.comercio-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; align-items: end; padding: 12px; border-radius: 16px; border: 1px solid var(--linea); background: var(--fondo); }
.comercio-fila .campo > span { font-size: 12.5px; color: var(--texto-2); }
.comercio-fila input, .comercio-fila select { height: 44px; }
.comercio-fila .elegida { min-height: 44px; font-size: 13.5px; font-weight: 600; flex-wrap: nowrap; }
.comercio-fila .boton.cuadrado { width: 44px; height: 44px; justify-self: end; }
.lineas-pedido { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lineas-pedido li { display: flex; justify-content: space-between; gap: 12px; }
.lineas-pedido li span:last-child { flex: none; white-space: nowrap; }
/* La lista de productos ocupa el renglón entero de la ficha: en media columna los precios se partían. */
.datos > :has(.lineas-pedido) { grid-column: 1 / -1; }

.marco-pagina { width: 100%; height: min(860px, 80vh); margin-inline: auto; overflow: hidden; border: 1px solid var(--linea); border-radius: 22px; background: #fff; box-shadow: var(--sombra-1); }
.marco-pagina iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.marco-pagina[data-dispositivo="celular"] { width: min(406px, 100%); height: min(800px, 80vh); border: 8px solid #1c1c1f; border-radius: 40px; }
/* Dos marcos, uno encima del otro: el nuevo se muestra cuando ya cargó, sin parpadeo. */
.marco-pagina.doble { position: relative; }
.marco-pagina.doble iframe { position: absolute; top: 0; left: 0; visibility: hidden; transform-origin: 0 0; }
.marco-pagina.doble iframe.visible { visibility: visible; }

/* ── Editor de una página (constructor/editor.js) ── */
.editor-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.editor-barra .editor-empuje { flex: 1; }
.editor-barra .boton.cuadrado { width: 40px; height: 40px; }
.editor-guardado { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.editor-guardado[data-estado="error"] { color: var(--peligro); }
.editor-alerta:empty { display: none; }
.editor-barra .boton[hidden] { display: none; }
.editor-estado { gap: 8px; }
.editor-enlace { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; color: var(--verde); font-size: 13.5px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.editor-enlace:hover { text-decoration: underline; }
.editor-enlace .icono { width: 15px; height: 15px; flex: none; }
.editor-enlace.grande { font-size: 16px; }
.editor-resultados { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.editor-resultados li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--linea); background: var(--fondo); }
.editor-resultados li > div { display: grid; min-width: 0; }
.editor-resultados .tenue { font-size: 13px; }
.editor-resultados b { font-family: var(--fuente-titulos); font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; }
.editor { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.editor[data-modo="probar"] { grid-template-columns: minmax(0, 1fr); }
.editor[data-modo="probar"] .editor-panel { display: none; }
.editor-panel { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; padding: 14px; max-height: calc(100vh - 116px); min-height: 420px; }
.editor-pestanas { display: flex; align-self: stretch; }
.editor-pestanas button { flex: 1; padding: 0 10px; }
.editor-cuerpo { flex: 1; min-height: 0; overflow: auto; padding: 2px 4px 6px; overscroll-behavior: contain; }
.editor-formulario { display: grid; gap: 14px; align-content: start; }
.editor-formulario h2 { font-size: 19px; }
.editor-formulario > .tenue { font-size: 13.5px; }
.editor-formulario textarea { min-height: 84px; resize: vertical; }
.editor-lienzo { display: grid; gap: 10px; min-width: 0; }
.editor-pista { font-size: 13.5px; text-align: center; }
.boton.cuadrado.mini { width: 34px; height: 34px; border-radius: 10px; }
.boton.cuadrado.mini .icono { width: 17px; height: 17px; }

.editor-secciones { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.editor-secciones li { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 4px; border-radius: 14px; border: 1px solid var(--linea); background: var(--fondo); }
.editor-secciones li[data-elegida] { border-color: var(--verde); }
.editor-secciones li.arrastrando { opacity: 0.45; }
.editor-secciones li.destino { border-color: var(--verde); box-shadow: 0 -3px 0 var(--verde); }
.editor-secciones .agarre { display: grid; place-items: center; width: 24px; height: 40px; flex: none; color: var(--texto-2); cursor: grab; }
.editor-secciones .agarre.fijo { cursor: default; }
.editor-secciones .agarre .icono { width: 18px; height: 18px; stroke-width: 3; }
.editor-secciones .nombre { flex: 1; min-width: 0; display: grid; gap: 1px; min-height: 44px; padding: 4px 6px; border: 0; border-radius: 10px; background: none; color: var(--texto); text-align: left; align-content: center; }
.editor-secciones .nombre:hover { background: var(--menta); }
.editor-secciones .nombre strong { font-size: 14.5px; }
.editor-secciones .nombre span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-secciones .acciones { display: flex; flex: none; }

.editor-lista { display: grid; gap: 12px; margin: 0; padding: 14px; border-radius: 16px; border: 1px solid var(--linea); min-width: 0; }
.editor-lista legend { padding: 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--texto-2); }
.editor-lista > .tenue { font-size: 13px; }
.editor-item { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--fondo); border: 1px solid var(--linea); }
.editor-item .campo > span { font-size: 13px; color: var(--texto-2); }
.editor-foto .fila { gap: 10px; }
.editor-foto img, .editor-foto .sin-foto { width: 64px; height: 64px; flex: none; border-radius: 12px; object-fit: cover; background: var(--menta); border: 1px solid var(--linea); }
.editor-foto .sin-foto { display: grid; place-items: center; color: var(--texto-2); }
.editor-color { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.editor-color input[type="color"] { width: 48px; height: 44px; flex: none; padding: 3px; border-radius: 12px; border: 1px solid var(--linea-fuerte); background: var(--blanco); cursor: pointer; }
.editor-color > div { display: grid; min-width: 0; }
.editor-color strong { font-size: 14.5px; }
.editor-color .tenue { font-size: 13px; }
.editor-paletas { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-paletas button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linea-fuerte); background: none; color: var(--texto); font-size: 14px; font-weight: 600; }
.editor-paletas button:hover { border-color: var(--verde); background: var(--menta); }
.editor-formulario .modo { align-self: start; justify-self: start; flex-wrap: wrap; border-radius: 22px; }
.editor-formulario .modo button { padding: 0 14px; }
.editor-formulario .editor-nota { margin-top: -6px; font-size: 13px; }

.editor-disenador { height: 100%; min-height: 380px; grid-template-rows: auto minmax(160px, 1fr) auto auto auto; }
.editor-chat { border-radius: 16px; border: 1px solid var(--linea); padding: 12px; }
.editor-disenador .creador-opciones { padding: 0; background: none; }
.editor-disenador .creador-redactar { padding: 0; }
.editor-disenador .creador-redactar textarea { min-height: 52px; }

.editor-tipos, .editor-versiones, .editor-fotos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.editor-tipos button { width: 100%; display: grid; gap: 2px; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--linea); background: var(--fondo); color: var(--texto); text-align: left; }
.editor-tipos button:hover { border-color: var(--verde); background: var(--menta); }
.editor-tipos .tenue { font-size: 13.5px; }
.editor-versiones li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--linea); background: var(--fondo); }
.editor-versiones li > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.editor-versiones .tenue { flex-basis: 100%; font-size: 13px; overflow-wrap: anywhere; }
.editor-fotos { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.editor-fotos button { display: block; width: 100%; aspect-ratio: 1; padding: 0; border-radius: 14px; border: 2px solid transparent; overflow: hidden; background: var(--menta); }
.editor-fotos button:hover, .editor-fotos button:focus-visible { border-color: var(--verde); }
.editor-fotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Crear fotos con Higgsfield: fotos de referencia (más pequeñas, una queda marcada) y el costo. */
.editor-fotos.chicas { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); max-height: 156px; overflow-y: auto; }
.editor-fotos button[aria-pressed='true'] { border-color: var(--verde); box-shadow: 0 0 0 3px color-mix(in srgb, var(--verde) 30%, transparent); }
.higgs-costo { margin: 0; font-weight: 600; min-height: 1.4em; }
.lista-simple { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--texto-2); }

@media (max-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-panel { position: static; max-height: none; min-height: 0; }
  .editor-cuerpo { overflow: visible; }
  .editor-lienzo { order: -1; }
  .editor-lienzo .marco-pagina { height: min(560px, 62vh); }
  .editor-disenador { height: auto; }
  .editor-chat { max-height: 320px; }
}

@media (max-width: 1000px) {
  .creador { grid-template-columns: minmax(0, 1fr); }
  .creador-chat { height: min(640px, 70vh); }
}
@media (max-width: 560px) {
  .creador-cabecera .modo { order: 5; }
  .creador-chat { border-radius: 20px; }
  .ayudante[data-seccion="constructor"] { bottom: 88px; }
  .ayudante[data-seccion="constructor"] .ayudante-boton { width: 52px; padding: 0; justify-content: center; }
  .ayudante[data-seccion="constructor"] .ayudante-boton span { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  /* Solo se anima lo recién llegado: la conversación entera no parpadea al repintarse. */
  .creador-burbuja:nth-last-child(-n+2) { animation: aparecer 0.2s ease-out both; }
  .marco-pagina { transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.28s ease; }
}
