/* Demostraciones interactivas (/automatizaciones/<demo>). Se carga después de base.css (la hoja de
   la calculadora de seguimiento: cabecera, títulos, paneles, deslizadores, tarjetas y botones) y
   añade lo propio: zona de subida, pasos del proceso, revisión de campos, el «ERP Banteq» y la
   calculadora de ahorro. Las ventanas del ERP repiten el aspecto de las animaciones de la home
   (barra con tres puntos, tablas finas, estados en píldora). */
:root {
  --azul: #5f7dff;
  --azul-suave: #f1f4ff;
  --verde: #1f9d55;
  --ambar: #8a5300;
  --ambar-fondo: #fdefd9;
  --linea-suave: #f0f0f2;
}

/* Los bloques con display propio (flex, grid) siguen ocultos con el atributo hidden. */
[hidden] {
  display: none !important;
}

h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* --- Disposición: flujo a la izquierda, ERP a la derecha (debajo en pantallas estrechas) --- */
.demo {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 20px;
  align-items: start;
}
.demo-flujo {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.demo-erp {
  position: sticky;
  top: 20px;
  min-width: 0;
}
.demo .panel h2 {
  margin-bottom: 16px;
  font-size: 20px;
}
.datos-ejemplo {
  margin: 18px 0 0;
  color: var(--suave);
  font-size: 12.5px;
  text-align: center;
}
@media (max-width: 979.98px) {
  .demo {
    grid-template-columns: minmax(0, 1fr);
  }
  .demo-erp {
    position: static;
  }
}

/* --- Subida --- */
.subida {
  position: relative;
}
.subida-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.subida-zona {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 18px;
  border: 1.5px dashed rgba(0, 0, 0, 0.18);
  border-radius: 22px;
  background: #fff;
  color: var(--tinta);
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.subida-zona svg {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 50%;
  background: var(--iris);
  fill: none;
  stroke: var(--tinta);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  box-sizing: content-box;
}
.subida-zona u {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  font-weight: 500;
}
/* En pantallas táctiles no se arrastra: solo «Elegir archivo». */
.subida-tactil {
  display: none;
}
@media (hover: none) and (pointer: coarse) {
  .subida-escritorio {
    display: none;
  }
  .subida-tactil {
    display: inline;
  }
}
.subida-zona small {
  color: var(--gris);
  font-size: 13px;
}
@media (hover: hover) {
  .subida-zona:hover {
    border-color: var(--azul);
    background: #fafbff;
  }
}
.subida-input:focus-visible + .subida-zona {
  outline: 2px solid var(--tinta);
  outline-offset: 3px;
}
.subida-zona.subida-encima {
  border-color: var(--azul);
  background: var(--azul-suave);
  transform: scale(1.01);
}
.subida-zona.subida-mal {
  border-color: var(--error);
}
.subida-privacidad {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--ok);
  font-size: 13px;
  font-weight: 500;
}
.subida-privacidad svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.subida-error {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fdecea;
  color: var(--error);
  font-size: 14px;
}
.ejemplos-tit {
  margin: 18px 0 8px;
  color: var(--gris);
  font-size: 14px;
}
.ejemplos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ejemplo,
.boton-sec {
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  color: var(--tinta);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .ejemplo:hover,
  .boton-sec:hover {
    box-shadow: inset 0 0 0 1px var(--azul), 0 4px 12px rgba(95, 125, 255, 0.12);
  }
}
.ejemplo:active,
.boton-sec:active {
  transform: scale(0.98);
}
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
details summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--tinta);
  outline-offset: 3px;
}

/* --- Proceso: vista previa del documento y pasos --- */
.proceso-vacio {
  margin: 0;
  color: var(--gris);
  font-size: 14px;
}
.proceso-cuerpo {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.vista {
  margin: 0;
}
.vista-hoja {
  position: relative;
  overflow: hidden;
  aspect-ratio: 210 / 297;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(20, 20, 30, 0.08);
}
.vista-hoja canvas,
.vista-hoja img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
}
.vista-xml {
  margin: 0;
  padding: 8px;
  height: 100%;
  overflow: hidden;
  color: #3a3a3a;
  font: 7.5px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
}
/* Barrido de lectura sobre el documento mientras se lee (como en la animación de la home). */
.vista-leyendo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 22%;
  background: linear-gradient(180deg, rgba(95, 125, 255, 0), rgba(95, 125, 255, 0.18) 70%, rgba(95, 125, 255, 0.55));
  border-bottom: 2px solid var(--azul);
  animation: barrido 1.6s ease-in-out infinite alternate;
}
@keyframes barrido {
  to {
    transform: translateY(360%);
  }
}
.pasos {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}
.paso {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  counter-increment: paso;
  transition: background-color 0.25s ease, opacity 0.25s ease;
}
.paso[data-estado="espera"] {
  opacity: 0.5;
}
.paso[data-estado="activo"] {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(95, 125, 255, 0.3);
}
.paso-icono {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  color: var(--gris);
  font-size: 12.5px;
  font-weight: 600;
}
.paso-icono::before {
  content: counter(paso);
}
.paso[data-estado="activo"] .paso-icono::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(95, 125, 255, 0.25);
  border-top-color: var(--azul);
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
}
.paso[data-estado="hecho"] .paso-icono,
.paso[data-estado="aviso"] .paso-icono,
.paso[data-estado="error"] .paso-icono {
  box-shadow: none;
  color: #fff;
}
.paso[data-estado="hecho"] .paso-icono {
  background: var(--verde);
}
.paso[data-estado="aviso"] .paso-icono {
  background: #d98a00;
}
.paso[data-estado="error"] .paso-icono {
  background: var(--error);
}
.paso[data-estado="hecho"] .paso-icono::before {
  content: "✓";
}
.paso[data-estado="aviso"] .paso-icono::before {
  content: "!";
}
.paso[data-estado="error"] .paso-icono::before {
  content: "×";
  font-size: 16px;
}
@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}
.paso-texto {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 2px;
}
.paso-texto b {
  font-size: 15px;
  font-weight: 600;
}
.paso-texto small {
  color: var(--gris);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.paso-texto small:empty {
  display: none;
}
.proceso-aviso {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  color: var(--texto);
  font-size: 13.5px;
  line-height: 1.45;
}
.proceso-aviso[data-tipo="aviso"] {
  background: var(--ambar-fondo);
  box-shadow: none;
  color: #6b4100;
}
@media (max-width: 559.98px) {
  .proceso-cuerpo {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }
}

/* --- Revisión de los campos --- */
.revision > .nota {
  margin: -8px 0 16px;
}
.campos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.campos .campo {
  margin: 0;
  min-width: 0;
}
.campos .campo-ancho {
  grid-column: 1 / -1;
}
.campos label {
  display: block;
  margin-bottom: 5px;
  color: var(--gris);
  font-size: 13px;
  font-weight: 500;
}
.campos input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  color: var(--tinta);
  font: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  -webkit-appearance: none;
  appearance: none;
}
.campos input:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 1px;
}
.campos input[aria-invalid="true"] {
  border-color: #d98a00;
  background: #fffaf2;
}
.campos input:disabled {
  background: #f8f8f9;
  color: var(--texto);
  opacity: 1;
  -webkit-text-fill-color: var(--texto);
}
.campos .importe input {
  text-align: right;
}
.campo-aviso {
  display: block;
  margin-top: 4px;
  color: #8a5300;
  font-size: 12.5px;
}
/* Los campos entran uno a uno, como si los fuera rellenando alguien. */
.campos-entran .campo {
  animation: campo-entra 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.campos-entran .campo input {
  animation: campo-brillo 1.2s ease backwards;
  animation-delay: calc(var(--i, 0) * 70ms + 0.15s);
}
@keyframes campo-entra {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@keyframes campo-brillo {
  from {
    box-shadow: inset 0 0 0 1px rgba(95, 125, 255, 0.6), 0 0 0 4px rgba(95, 125, 255, 0.12);
    background: var(--azul-suave);
  }
}
.checks-tit {
  margin: 22px 0 8px;
}
.checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  line-height: 1.4;
}
.check svg {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
}
.check-aviso {
  color: #6b4100;
}
.check-error {
  color: var(--error);
}
.i-ok circle {
  fill: var(--verde);
}
.i-aviso circle {
  fill: #d98a00;
}
.i-error circle {
  fill: var(--error);
}
.i-ok path,
.i-aviso path,
.i-error path {
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.boton-aviso {
  background: radial-gradient(140% 220% at 12% 0%, #6b4a12 0%, #3d2a07 60%, #2a1c03 100%);
}
.aviso-final {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 16px;
  background: #141416;
  color: #fff;
  font-size: 14.5px;
  line-height: 1.45;
}
.aviso-final svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.aviso-final[data-tipo="aviso"] {
  background: var(--ambar-fondo);
  color: #4f3000;
}
@media (max-width: 559.98px) {
  .campos {
    grid-template-columns: minmax(0, 1fr);
  }
  .acciones .boton,
  .acciones .boton-sec {
    width: 100%;
    justify-content: space-between;
  }
}

/* --- Asistente: vista de un Word o un TXT y conversación --- */
.vista-texto {
  height: 100%;
  overflow: hidden;
  padding: 9px;
  color: #3a3a3a;
  font-size: 6.5px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.chat {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 10px 30px rgba(20, 20, 30, 0.06);
}
.chat-barra {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid var(--linea-suave);
  background: #fafafb;
}
.chat-barra i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dcdce0;
}
.chat-barra b {
  overflow: hidden;
  margin-left: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat-mensajes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  min-height: 120px;
  overflow-y: auto;
  padding: 16px;
  scroll-behavior: smooth;
}
.burbuja {
  max-width: 92%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.5;
  animation: burbuja-entra 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.burbuja p {
  margin: 0;
}
.burbuja p + p {
  margin-top: 6px;
}
.burbuja-yo {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--tinta);
  color: #fff;
}
.burbuja-ia {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: var(--tarjeta);
  color: var(--tinta);
}
.burbuja-ia.no-esta {
  background: var(--ambar-fondo);
  color: #4f3000;
}
@keyframes burbuja-entra {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.burbuja-intro {
  color: var(--gris);
  font-size: 13px;
}
.cita {
  margin: 6px 0 0;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--azul);
}
/* La frase que mejor responde, subrayada línea a línea. */
.frase-clave > span {
  background: linear-gradient(transparent 58%, rgba(95, 125, 255, 0.2) 58%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(255, 214, 102, 0.55);
  color: inherit;
}
.fuente {
  display: flex !important;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px !important;
  color: var(--gris);
  font-size: 12.5px;
  font-weight: 500;
}
.i-doc {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  stroke: currentColor;
  stroke-width: 1.4;
}
.seccion-completa {
  margin-top: 8px;
  font-size: 13.5px;
}
.seccion-completa summary {
  color: var(--tinta);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.seccion-completa p {
  margin-top: 6px !important;
  color: var(--texto);
}
.puntos {
  display: inline-flex;
  gap: 4px;
  padding: 4px 2px;
}
.puntos i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--suave);
  animation: puntos 1s ease-in-out infinite;
}
.puntos i:nth-child(2) {
  animation-delay: 0.15s;
}
.puntos i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes puntos {
  50% {
    opacity: 0.3;
    transform: translateY(-2px);
  }
}
.chat-sugerencias {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}
.chat-sugerencias .ejemplo {
  padding: 7px 12px;
  font-size: 13px;
  text-align: left;
}
.chat-entrada {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--linea-suave);
}
.chat-entrada input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--tarjeta);
  color: var(--tinta);
  font: inherit;
  font-size: 16px;
}
.chat-entrada input:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 1px;
}
.boton-enviar {
  flex: none;
}
.chat-nota {
  margin: 12px 4px 0;
}
.erp-subtitulo {
  margin: 0;
  padding: 14px 12px 6px;
  color: var(--gris);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 559.98px) {
  .boton-enviar span:first-child {
    display: none;
  }
  .boton-enviar {
    padding: 7px;
  }
  .chat-mensajes {
    max-height: 60vh;
    padding: 12px;
  }
}

/* --- CRM: pestañas de entrada, formulario web de prueba, ficha, correo y tarea --- */
.modos {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.modos [role="tab"] {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--gris);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.modos [aria-selected="true"] {
  background: var(--tinta);
  color: #fff;
}
.web,
.correo {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(20, 20, 30, 0.06);
}
.web-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 16px;
}
.web-titulo {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 600;
}
.web-ancho {
  grid-column: 1 / -1;
}
.web-campo label {
  display: block;
  margin-bottom: 4px;
  color: var(--gris);
  font-size: 12.5px;
  font-weight: 500;
}
.web-campo input,
.web-campo textarea,
.web-campo select,
.res-ver select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--tarjeta);
  color: var(--tinta);
  font: inherit;
  font-size: 16px;
}
.web-campo textarea {
  resize: vertical;
}
.web-campo [aria-invalid="true"] {
  border-color: var(--error);
}
.web-campo :focus-visible,
.res-ver select:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 1px;
}
.form-error {
  margin: 0;
  color: var(--error);
  font-size: 13.5px;
}
.web-acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.entrada-nota {
  margin-top: 10px !important;
}
.entrada-intro {
  margin: 0 0 12px !important;
}
.plantilla {
  margin: 12px 0 0;
  color: var(--gris);
  font-size: 13.5px;
}
.plantilla a {
  color: var(--tinta);
  font-weight: 500;
}
.proceso-solo {
  grid-template-columns: minmax(0, 1fr);
}
.res-resumen {
  margin: -4px 0 12px;
  color: var(--texto);
  font-size: 14.5px;
}
.tabla-res {
  border-radius: 16px;
  background: #fff;
  font-size: 13px;
}
.tabla-res small {
  display: block;
  color: var(--gris);
  font-size: 11.5px;
}
.res-dup {
  color: var(--ambar);
  font-weight: 500;
}
.res-mal {
  color: var(--error);
}
.res-ver {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 16px 0 12px;
  font-size: 14px;
  font-weight: 500;
}
.res-ver select {
  flex: 1 1 220px;
  width: auto;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.ficha {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.ficha-ava {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--iris);
  font-size: 14px;
  font-weight: 600;
}
.ficha-datos {
  flex: 1;
  min-width: 0;
}
.ficha-datos > b {
  display: block;
  font-size: 15.5px;
}
.ficha-datos > small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--gris);
  font-size: 13px;
}
.ficha-id {
  flex: none;
  color: var(--suave);
  font-size: 12px;
  font-weight: 600;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--tarjeta);
  color: var(--texto);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.chip-alta {
  background: #dcf2e5;
  color: var(--ok);
  font-weight: 600;
}
.chip-media {
  background: var(--azul-suave);
  color: #3d55c4;
}
.chip-baja {
  background: #f1f1f3;
  color: #666;
}
.ficha-porque {
  margin: 8px 0 0;
  color: var(--texto);
  font-size: 13px;
  line-height: 1.45;
}
.correo-cab {
  display: flex;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--linea-suave);
  font-size: 13.5px;
}
.correo-cab small {
  flex: none;
  width: 52px;
  color: var(--suave);
}
.correo-cab span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.correo-cuerpo {
  padding: 14px 16px;
  color: var(--tinta);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.correo-estado {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--linea-suave);
  color: var(--gris);
  font-size: 12.5px;
}
.correo-estado svg {
  width: 14px;
  height: 14px;
}
.tarea {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.tarea-ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--azul-suave);
  color: var(--azul);
  font-weight: 600;
}
.tarea > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.tarea b {
  display: block;
  font-size: 14.5px;
}
.tarea small {
  color: var(--gris);
  font-size: 13px;
}
.erp-accion {
  display: block;
  min-width: 9em;
  color: var(--texto);
  font-size: 11.5px;
  line-height: 1.35;
}
@media (max-width: 559.98px) {
  .web-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .tarea .chip {
    display: none;
  }
}

/* --- Informes: elegir columnas, panel de dirección y gráficos --- */
.mapa {
  margin-top: 22px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(95, 125, 255, 0.35);
}
.mapa h3 {
  margin-bottom: 4px;
}
.mapa > .nota {
  margin: 0 0 14px;
}
.mapa-filas {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.mapa-fila {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
}
.mapa-fila label {
  font-size: 14px;
  font-weight: 500;
}
.mapa-fila select {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--tarjeta);
  color: var(--tinta);
  font: inherit;
  font-size: 15px;
}
.mapa-fila select:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 1px;
}
.mapa-ej {
  grid-column: 2;
  overflow: hidden;
  color: var(--gris);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mapa .form-error {
  margin-bottom: 10px;
}
.panel-periodo {
  margin: -6px 0 14px;
  color: var(--gris);
  font-size: 14px;
  font-weight: 500;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.kpi {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.kpi h3 {
  color: var(--gris);
  font-size: 13px;
  font-weight: 500;
}
.kpi-valor {
  margin: 4px 0 2px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.kpi-gris {
  color: var(--suave);
}
.kpi-alerta {
  color: #b45309;
}
.kpi-aviso {
  box-shadow: inset 0 0 0 1px rgba(217, 138, 0, 0.45);
}
.kpi-var {
  margin: 0;
  color: var(--gris);
  font-size: 12.5px;
  line-height: 1.35;
}
.kpi-var.sube {
  color: var(--ok);
  font-weight: 500;
}
.kpi-var.baja {
  color: var(--error);
  font-weight: 500;
}
.graficos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.grafico {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.grafico figcaption {
  margin-bottom: 10px;
  color: var(--gris);
  font-size: 13px;
  font-weight: 500;
}
.grafico svg {
  display: block;
  width: 100%;
  height: auto;
}
.grafico .barra {
  fill: #d9dff7;
}
.grafico .barra-actual {
  fill: var(--azul);
}
.grafico .eje {
  fill: var(--suave);
  font-size: 9.5px;
  text-anchor: middle;
}
.grafico .valor {
  fill: var(--tinta);
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
}
.top {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.top li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  font-size: 12.5px;
}
.top-nombre {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.top-valor {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.top-barra,
.stock-barra {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f6;
}
.top-barra i,
.stock-barra i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(130, 150, 255), rgb(150, 220, 205));
}
.stock-critico {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--ambar-fondo);
}
.stock-critico h3 {
  margin-bottom: 8px;
  color: #6b4100;
  font-size: 14px;
}
.stock-critico ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #4f3000;
  font-size: 13px;
}
.stock-critico li {
  display: grid;
  gap: 4px;
}
.stock-critico .stock-barra {
  background: rgba(255, 255, 255, 0.7);
}
.stock-critico .stock-barra i {
  background: #d98a00;
}
.adjunto {
  display: table;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tarjeta);
  color: var(--texto);
  font-size: 12.5px;
  white-space: nowrap;
}
@media (max-width: 559.98px) {
  .graficos {
    grid-template-columns: minmax(0, 1fr);
  }
  .mapa-fila {
    grid-template-columns: minmax(0, 1fr);
  }
  .mapa-ej {
    grid-column: 1;
  }
}

/* --- Reservas: calendario de videollamadas, formulario y agenda del día --- */
.cal-zona {
  margin: -8px 0 14px;
  color: var(--gris);
  font-size: 13px;
}
.cal-estado {
  margin: 0 0 10px;
  color: var(--gris);
  font-size: 14px;
}
.cal-inactivo {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ambar-fondo);
  color: #6b4100;
}
.cal-dias {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.cal-dia {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 10px 6px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  color: var(--tinta);
  font: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.cal-dia b {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
}
.cal-dia-sem,
.cal-dia-mes {
  color: var(--gris);
  font-size: 12.5px;
  text-transform: capitalize;
}
.cal-dia small {
  margin-top: 4px;
  color: var(--ok);
  font-size: 11.5px;
  font-weight: 500;
}
.cal-dia[aria-pressed="true"] {
  background: var(--tinta);
  box-shadow: none;
  color: #fff;
}
.cal-dia[aria-pressed="true"] .cal-dia-sem,
.cal-dia[aria-pressed="true"] .cal-dia-mes {
  color: rgba(255, 255, 255, 0.75);
}
.cal-dia[aria-pressed="true"] small {
  color: rgb(168, 230, 220);
}
.cal-dia:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.cal-franja {
  margin: 10px 0 6px;
  color: var(--gris);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cal-horas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 6px;
}
.cal-hora {
  padding: 10px 4px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  color: var(--tinta);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
@media (hover: hover) {
  .cal-dia:not(:disabled):not([aria-pressed="true"]):hover,
  .cal-hora:not(:disabled):not([aria-pressed="true"]):hover {
    box-shadow: inset 0 0 0 1.5px var(--azul);
  }
}
.cal-hora[aria-pressed="true"] {
  background: var(--azul);
  box-shadow: none;
  color: #fff;
}
.cal-hora:disabled {
  background: transparent;
  box-shadow: none;
  color: #b3b3b8;
  text-decoration: line-through;
  cursor: not-allowed;
}
.campo-ayuda {
  display: block;
  margin-top: 4px;
  color: var(--gris);
  font-size: 12px;
  line-height: 1.4;
}
/* El formulario de reservas va directamente sobre el panel gris: campos en blanco. */
.reserva-form {
  padding: 0;
}
.reserva-form .web-campo input,
.reserva-form .web-campo textarea {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.reserva-form .campo-casilla {
  margin-top: 4px;
}
.reserva-form .campo-casilla label {
  font-size: 13.5px;
}
.reserva-elegido {
  margin: 0;
  color: var(--tinta);
  font-size: 14.5px;
  font-weight: 600;
}
.reserva-elegido:empty {
  display: none;
}
.correo-cuando {
  display: block;
  color: var(--gris);
  font-size: 12px;
  font-style: normal;
}
.agenda {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.agenda h3 {
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: none;
}
.agenda h3::first-letter {
  text-transform: uppercase;
}
.agenda ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.agenda-fila {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 10px;
  color: var(--suave);
  font-size: 13px;
}
.agenda-fila small {
  width: 3em;
  color: var(--gris);
  font-variant-numeric: tabular-nums;
}
.agenda-ocupada {
  background: #f4f4f6;
  color: var(--gris);
}
.agenda-tuya {
  grid-column: 1 / -1;
  background: var(--azul-suave);
  color: var(--tinta);
  font-weight: 600;
  animation: campo-brillo 1.6s ease;
}
.agenda-tuya svg {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
}
@media (max-width: 559.98px) {
  .cal-horas {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .agenda ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- ERP Banteq --- */
.erp {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 14px 40px rgba(20, 20, 30, 0.08);
  font-size: 13px;
}
.erp-barra {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid var(--linea-suave);
  background: #fafafb;
}
.erp-barra i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dcdce0;
}
.erp-barra b {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 600;
}
.erp-entorno {
  margin: 0;
  padding: 7px 16px;
  border-bottom: 1px solid var(--linea-suave);
  background: repeating-linear-gradient(135deg, #fffaf0 0 8px, #fff6e6 8px 16px);
  color: #8a5300;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.erp-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--linea-suave);
  scrollbar-width: none;
}
.erp-tabs::-webkit-scrollbar {
  display: none;
}
.erp-tabs [role="tab"] {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  margin-bottom: -1px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--gris);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.erp-tabs [aria-selected="true"] {
  border-bottom-color: var(--tinta);
  color: var(--tinta);
}
.erp-tabs [role="tab"]:focus-visible {
  outline-offset: -2px;
  border-radius: 8px 8px 0 0;
}
.erp-cuenta {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--azul-suave);
  color: var(--azul);
  font-size: 11px;
  font-weight: 600;
}
.erp-panel {
  min-height: 190px;
}
.erp-panel:focus-visible {
  outline-offset: -3px;
}
.erp-tabla-caja {
  overflow-x: auto;
}
.erp-tabla {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.erp-tabla th,
.erp-tabla td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--linea-suave);
  text-align: left;
  vertical-align: top;
}
.erp-tabla th {
  color: var(--suave);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.erp-tabla td:first-child {
  white-space: nowrap;
  font-weight: 500;
}
.erp-tabla .erp-num {
  text-align: right;
  white-space: nowrap;
}
.erp-propia {
  background: #fbfcff;
}
.erp-nuevo svg {
  width: 13px;
  height: 13px;
  margin-right: 5px;
  vertical-align: -2px;
}
.erp-entra {
  animation: erp-entra 2.4s ease;
}
@keyframes erp-entra {
  0% {
    opacity: 0;
    transform: translateY(-6px);
    background: #dfe6ff;
  }
  12% {
    opacity: 1;
    transform: none;
    background: #dfe6ff;
  }
  100% {
    background: #fbfcff;
  }
}
.erp-estado {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f1f3;
  color: #555;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.erp-estado-registrada,
.erp-estado-confirmada,
.erp-estado-indexado {
  background: #dcf2e5;
  color: var(--ok);
  font-weight: 600;
}
.erp-estado-revisar {
  background: var(--ambar-fondo);
  color: var(--ambar);
  font-weight: 600;
}
.erp-motivo {
  display: block;
  max-width: 22em;
  margin-top: 3px;
  color: var(--gris);
  font-size: 11.5px;
  line-height: 1.35;
}
.erp-motivo::first-letter {
  text-transform: uppercase;
}
.erp-vacio {
  color: var(--suave);
  text-align: center !important;
}
.erp-pie {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px;
}
.erp-pie:has(.erp-vaciar[hidden]) {
  display: none;
}
.erp-vaciar {
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--gris);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
@media (max-width: 559.98px) {
  .erp-tabla .erp-opcional {
    display: none;
  }
  .erp-tabla th,
  .erp-tabla td {
    padding: 9px 8px;
  }
}

/* --- Ahorro --- */
.ahorro {
  padding-top: 72px;
}
.ahorro-tit {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.04em;
  text-align: center;
}
.ahorro-sub {
  max-width: 620px;
  margin: 12px auto 28px;
  color: var(--gris);
  font-size: 17px;
  text-align: center;
  text-wrap: pretty;
}
.ahorro .controles h3 {
  margin-bottom: 18px;
}
.tarjeta h4 {
  margin: 0;
  color: var(--gris);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.tarjeta-destacada h4 {
  color: rgba(255, 255, 255, 0.78);
}
.tarjeta-ancha {
  grid-column: 1 / -1;
}
.como {
  margin-top: 12px;
  padding: 16px 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.como summary {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.como-formula {
  margin: 12px 0 0;
  color: var(--texto);
  font-size: 14px;
  line-height: 1.55;
}
.supuestos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}
.supuestos legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}
.supuesto label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
}
.supuesto input {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--tarjeta);
  color: var(--tinta);
  font: inherit;
  font-size: 16px;
}
.supuesto small {
  display: block;
  margin-top: 4px;
  color: var(--gris);
  font-size: 12px;
  line-height: 1.4;
}
.ahorro-acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 18px;
}
.ahorro-acciones .nota {
  flex: 1 1 220px;
}
.ahorro .aviso-calculo {
  margin-top: 14px;
}

/* --- Cierre y pie --- */
.cierre h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.04em;
}
.cierre .sub {
  margin-bottom: 26px;
}
.cierre .boton {
  text-decoration: none;
}
.pie-idiomas a[aria-current="page"] {
  color: var(--tinta);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 559.98px) {
  .ahorro {
    padding-top: 56px;
  }
  .ahorro-sub {
    font-size: 15.5px;
  }
  .ahorro-acciones .boton {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vista-leyendo::after,
  .campos-entran .campo,
  .campos-entran .campo input,
  .erp-entra,
  .burbuja,
  .puntos i,
  .agenda-tuya {
    animation: none;
  }
  .erp-entra {
    background: #e8edff;
  }
  .paso[data-estado="activo"] .paso-icono::before {
    animation-duration: 2.4s;
  }
}
