/* AIM OFFICE · AIM Enviar. Solo variables del estilo elegido (el código QR es una imagen con su propio
   fondo claro, que es lo que leen las cámaras). Móvil primero. */
.en-pagina { gap: 16px; }
.en-pestanas .ap-pestana { display: inline-flex; align-items: center; gap: 8px; }
.en-pestanas .ap-pestana svg { width: 18px; height: 18px; }
.en-panel { display: flex; flex-direction: column; gap: 14px; }
.en-panel[hidden] { display: none; }
@media (max-width: 559px) {
  .en-pestanas .ap-pestana { flex: 1 1 0; justify-content: center; padding: 10px 4px; font-size: 14px; white-space: normal; text-align: center; line-height: 1.2; }
  .en-pestanas .ap-pestana svg { display: none; }
}
.en-dos { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .en-dos { grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 22px; } }

/* Tarjeta principal */
.en-tarjeta { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 18px; box-shadow: 0 12px 40px color-mix(in srgb, var(--tinta) 7%, transparent); transition: box-shadow .15s, outline-color .15s; }
.en-soltando { outline: 3px dashed var(--ap-acento); outline-offset: 4px; box-shadow: 0 0 0 8px var(--ap-suave); }
.en-zona { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.en-anadir { display: flex; align-items: center; gap: 16px; width: 100%; padding: 18px; border: 2px dashed var(--linea-2); border-radius: 14px; background: color-mix(in srgb, var(--ap-acento) 4%, var(--blanco)); cursor: pointer; text-align: left; transition: border-color .12s, background .12s; }
.en-anadir:hover, .en-anadir:focus-visible { border-color: var(--ap-acento); background: var(--ap-suave); }
.en-anadir-mas { width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--ap-acento); color: var(--ap-sobre); box-shadow: 0 6px 18px color-mix(in srgb, var(--ap-acento) 35%, transparent); }
.en-anadir-mas svg { width: 26px; height: 26px; stroke-width: 2.2; }
.en-anadir-texto { display: flex; flex-direction: column; gap: 2px; }
.en-anadir-texto b { font: 750 18px/1.2 var(--titulo); color: var(--tinta); }
.en-anadir-texto small { color: var(--tinta-3); font-size: 14px; }
.en-anadir-carpeta { align-self: flex-start; margin-left: 4px; font-size: 14px; }

.en-lista { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; border: 1px solid var(--linea); border-radius: 12px; background: var(--papel); }
.en-lista-publica { max-height: 360px; }
.en-archivo { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 4px 4px 4px 10px; border-radius: 9px; }
.en-archivo:hover { background: color-mix(in srgb, var(--tinta) 4%, transparent); }
.en-archivo > svg { color: var(--tinta-3); }
.en-archivo-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.en-archivo-texto b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tinta); }
.en-archivo-texto small { color: var(--tinta-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.en-archivo .ap-boton { min-height: 36px; width: 36px; }
.en-mas { justify-content: center; color: var(--tinta-3); font-size: 14px; }
.en-zona-pie { display: flex; flex-direction: column; gap: 6px; }
.en-zona-pie .ap-boton { min-height: 34px; padding: 4px 10px; font-size: 14px !important; }
.en-total-fila { display: flex; align-items: baseline; gap: 10px; }
.en-total-fila .en-total { flex: 1; }
.en-quitar-todos { font-size: 14px; }
.en-nota-llavero { align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--linea); background: var(--blanco); }
.en-nota-llavero span { flex: 1; min-width: 200px; }
.en-total { font-size: 14px; color: var(--tinta-2); font-variant-numeric: tabular-nums; }
.en-total-mal { color: var(--error-tinta); font-weight: 650; }

.en-campos { gap: 12px; }
.en-opciones { border: 1px solid var(--linea); border-radius: 12px; padding: 0 14px; background: var(--papel); }
.en-opciones summary { display: flex; align-items: center; gap: 8px; min-height: 46px; cursor: pointer; font-weight: 650; color: var(--tinta-2); list-style: none; }
.en-opciones summary::-webkit-details-marker { display: none; }
.en-opciones summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.en-opciones[open] summary::after { transform: rotate(-135deg); }
.en-opciones summary svg { width: 18px; height: 18px; color: var(--tinta-3); }
.en-opciones > .ap-formulario { padding: 4px 0 16px; }
.en-con-boton { display: flex; gap: 8px; align-items: stretch; }
.en-con-boton .ap-campo { flex: 1; min-width: 0; }
.en-enviar { width: 100%; min-height: 50px; font-size: 17px !important; border-radius: 999px; }
.en-nota { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--tinta-2); }
.en-nota svg { width: 17px; height: 17px; margin-top: 2px; color: var(--tinta-3); }
.en-nota-suave { color: var(--tinta-3); font-size: 13px; justify-content: center; text-align: center; }
.en-centro { justify-content: center; }

/* Escena de la derecha */
.en-escena { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: 26px 22px; border-radius: 18px; border: 1px solid var(--linea);
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--ap-acento) 22%, var(--blanco)) 0%, var(--blanco) 62%); }
.en-escena h2 { font: 800 clamp(22px, 3vw, 32px)/1.12 var(--titulo); max-width: 22ch; color: var(--tinta); }
.en-escena-dibujo { position: relative; height: 120px; }
.en-orbita { position: absolute; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--ap-acento) 35%, transparent); }
.en-orbita-1 { width: 200px; height: 200px; left: -40px; top: -60px; }
.en-orbita-2 { width: 120px; height: 120px; left: 120px; top: 10px; border-style: solid; border-color: color-mix(in srgb, var(--ap-acento) 18%, transparent); }
.en-avion { position: absolute; left: 40px; top: 24px; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--ap-acento); color: var(--ap-sobre); box-shadow: 0 14px 34px color-mix(in srgb, var(--ap-acento) 40%, transparent); transform: rotate(-8deg); }
.en-avion svg { width: 38px; height: 38px; stroke-width: 1.8; }
.en-ventajas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.en-ventajas li { display: flex; gap: 12px; align-items: flex-start; color: var(--tinta-2); font-size: 15.5px; }
.en-ventajas svg { width: 22px; height: 22px; color: var(--ap-acento); margin-top: 1px; }
.en-uso { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--linea); font-size: 14.5px; color: var(--tinta-2); }
.en-uso small { color: var(--tinta-3); font-size: 13px; }
.en-uso-lista { border: 0; padding: 0; }
.en-pro { align-self: flex-start; font-size: 14px; }
@media (max-width: 959px) { .en-escena-dibujo { display: none; } .en-escena { padding: 18px; } .en-escena h2 { font-size: 21px; } }

/* Subiendo */
.en-subiendo, .en-hecho { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 10px 0; }
.en-subiendo-titulo, .en-hecho-titulo { font: 750 21px/1.2 var(--titulo); }
.en-subiendo-titulo:focus, .en-hecho-titulo:focus, .en-p-titulo:focus, .en-estado h2:focus, .en-secreto h2:focus { outline: none; }
.en-anillo { --en-pct: 0; position: relative; width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; margin: 6px 0 4px;
  background: conic-gradient(var(--ap-acento) calc(var(--en-pct) * 1%), color-mix(in srgb, var(--tinta) 9%, transparent) 0); transition: background .2s; }
.en-anillo::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--blanco); }
.en-anillo-cifra { position: relative; font: 800 34px/1 var(--titulo); font-variant-numeric: tabular-nums; color: var(--tinta); }
.en-linea { font: 650 16px/1.3 var(--cuerpo); font-variant-numeric: tabular-nums; }
.en-detalle { font-variant-numeric: tabular-nums; min-height: 1.4em; }
.en-hecho-icono { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-fondo); color: var(--ok-tinta); }
.en-hecho-icono svg { width: 34px; height: 34px; stroke-width: 2.4; }

/* Resultado: enlace, QR y acciones */
.en-resultado { width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.en-enlace { font: 14px/1.3 ui-monospace, monospace !important; }
.en-resultado-dos { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.en-qr-bloque { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.en-qr { display: block; width: 148px; height: 148px; border-radius: 12px; border: 1px solid var(--linea); image-rendering: pixelated; }
.en-qr-botones .ap-boton { min-height: 34px; font-size: 13.5px !important; }
.en-resultado-acciones { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.en-resultado-acciones .ap-suave { display: flex; gap: 6px; align-items: center; }
.en-resultado-acciones .ap-suave svg { width: 16px; height: 16px; }

/* Mensaje secreto */
.en-tarjeta-secreto textarea { min-height: 150px; font-family: ui-monospace, monospace !important; }
.en-s-archivo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.en-s-archivo .ap-chip svg { width: 15px; height: 15px; }
.en-cuenta { margin-top: -8px; text-align: right; }

/* Mis envíos */
.en-envios-cab h2 { font: 750 21px/1.2 var(--titulo); }
.en-envios-cab { flex-wrap: nowrap; }
.en-envios-cab h2 { white-space: nowrap; }
.en-envios-cab select { width: auto; min-width: 0; max-width: 190px; }
.en-tabla td { vertical-align: middle; }
.en-c-titulo { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.en-c-icono { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--ap-suave); color: color-mix(in srgb, var(--ap-acento) 80%, var(--tinta)); }
.en-c-icono svg { width: 18px; height: 18px; }
.en-c-texto { display: flex; flex-direction: column; min-width: 0; }
.en-c-texto b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36ch; }
.en-c-texto small { color: var(--tinta-3); font-size: 13px; }
.en-c-acciones { width: 1%; white-space: nowrap; }
.en-acciones { display: flex; gap: 2px; justify-content: flex-end; }
.en-acciones .ap-boton { min-height: 36px; width: 36px; }
@media (max-width: 719px) {
  .en-tabla thead { display: none; }
  .en-tabla, .en-tabla tbody, .en-tabla tr, .en-tabla td { display: block; width: 100%; }
  .en-tabla tr { position: relative; padding: 10px 12px; border-bottom: 1px solid var(--linea); }
  .en-tabla tr:last-child { border-bottom: 0; }
  .en-tabla td { border: 0; padding: 2px 0; }
  .en-tabla td[data-etiqueta]:not(.en-c-titulo)::before { content: attr(data-etiqueta) ": "; color: var(--tinta-3); font-size: 13px; }
  .en-tabla td.num { text-align: left; }
  .en-tabla .en-c-titulo { padding-right: 84px; min-width: 0; }
  .en-tabla .en-c-acciones { position: absolute; top: 10px; right: 8px; width: auto; }
  .en-c-texto b { max-width: none; }
}

/* ── Página pública ─────────────────────────────────────────────────────── */
.ap-publico .ap-cuerpo { background: radial-gradient(110% 70% at 50% 0%, color-mix(in srgb, var(--ap-acento) 14%, var(--papel)) 0%, var(--papel) 70%); }
.en-publica { min-height: 100%; padding: 28px 16px 48px; display: flex; justify-content: center; align-items: flex-start; }
.en-publica-caja { width: 100%; max-width: 620px; padding: 26px 22px; border-radius: 20px; box-shadow: 0 18px 60px color-mix(in srgb, var(--tinta) 10%, transparent); }
.en-cargando { text-align: center; padding: 30px 0; }
.en-estado { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.en-estado h2 { font: 800 24px/1.2 var(--titulo); }
.en-estado p { color: var(--tinta-2); max-width: 48ch; }
.en-estado-icono { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; flex: 0 0 auto; background: color-mix(in srgb, var(--tinta) 7%, transparent); color: var(--tinta-2); }
.en-estado-icono svg { width: 32px; height: 32px; }
.en-estado-acento { background: var(--ap-acento); color: var(--ap-sobre); box-shadow: 0 12px 30px color-mix(in srgb, var(--ap-acento) 35%, transparent); }
.en-grande { min-height: 50px; padding: 10px 26px; font-size: 17px !important; border-radius: 999px; }
.en-contrasena-publica { width: 100%; max-width: 360px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.en-secreto { display: flex; flex-direction: column; gap: 14px; }
.en-secreto h2 { font: 800 22px/1.2 var(--titulo); }
.en-secreto-texto { margin: 0; padding: 16px; border-radius: 12px; background: var(--papel); border: 1px solid var(--linea); font: 16px/1.5 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 50vh; overflow: auto; color: var(--tinta); }
.en-secreto .en-nota { padding: 12px; border-radius: 12px; background: var(--aviso-fondo); color: var(--aviso-tinta); }
.en-secreto .en-nota svg { color: currentColor; }
.en-envio { display: flex; flex-direction: column; gap: 16px; }
.en-envio-cab { display: flex; gap: 14px; align-items: center; }
.en-envio-cab .en-estado-icono { width: 56px; height: 56px; border-radius: 16px; }
.en-envio-cab-texto { min-width: 0; }
.en-de { color: var(--tinta-3); font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.en-p-titulo { font: 800 clamp(22px, 4vw, 28px)/1.15 var(--titulo); overflow-wrap: anywhere; }
.en-mensaje { white-space: pre-line; color: var(--tinta-2); padding: 12px 14px; border-left: 4px solid var(--ap-acento); background: var(--ap-suave); border-radius: 0 10px 10px 0; overflow-wrap: anywhere; }
.en-metas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; color: var(--tinta-2); }
.en-metas li { display: inline-flex; align-items: center; gap: 6px; }
.en-metas svg { width: 17px; height: 17px; color: var(--tinta-3); }
.en-bajada { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--linea); background: var(--papel); font-variant-numeric: tabular-nums; }
.en-bajada-titulo { font-weight: 650; overflow-wrap: anywhere; }
.en-envio-pie { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.en-envio-pie .en-grande { width: 100%; }
.en-vista { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }
.en-vista-pdf { width: 100%; height: 70vh; border: 1px solid var(--linea); }
@media (max-width: 520px) { .en-publica { padding: 14px 10px 32px; } .en-publica-caja { padding: 20px 16px; } .en-tarjeta { padding: 16px; } }
