/* 47.3.0 · NextPanel (/portal/empresa/nextpanel): resumen, editor del sitio, estadísticas, dominio, espacio y Nix.
   Usa los colores del sitio (site.css) y funciona desde 320 px sin desbordes. */
.np { min-width: 0; }
.np .panel + .panel, .np .panel + .np-dos, .np .np-dos + .panel { margin-top: 18px; }
.np-demo { display: flex; gap: 8px; align-items: center; }
.np-selector select { width: auto; max-width: 100%; margin-left: 8px; }
.np-acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.np-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.np-kpis .stat { min-width: 0; display: grid; gap: 4px; align-content: start; }
.np-kpis .stat .badge { justify-self: start; }
.np-stat-txt { font-size: 1.05rem !important; overflow-wrap: anywhere; }
.np-medidor { margin-top: 10px; }
.np-medidor p { margin: 8px 0 0; }
.np-barra-alerta span { background: linear-gradient(90deg, var(--warn), var(--danger)) !important; box-shadow: none !important; }
.np-tabla-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.np-tabla-wrap .data { min-width: 0; }
.np-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.np-dos .panel { margin: 0; min-width: 0; }

/* Barras de visitas por día (sin librerías) */
.np-barras { display: flex; align-items: flex-end; gap: 3px; height: 140px; margin: 14px 0 4px; padding: 8px; border-radius: 10px; background: rgba(5, 12, 30, .45); }
.np-bar-dia { flex: 1; min-width: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #2ec5ff, var(--blue)); }
.np-barras-eje { display: flex; justify-content: space-between; color: var(--mist); font-size: .78rem; padding: 0 8px; }
.np-tabla-dias { margin-top: 10px; }
.np-tabla-dias summary { cursor: pointer; color: var(--mist); font-size: .9rem; }
.np-ruta { display: block; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; font-size: .86rem; }
.np-mini { display: block; height: 4px; margin-top: 4px; border-radius: 9px; background: rgba(46, 139, 255, .12); overflow: hidden; }
.np-mini i { display: block; height: 100%; background: var(--blue); }
.np-dispositivos { display: flex; height: 18px; border-radius: 99px; overflow: hidden; background: rgba(46, 139, 255, .12); }
.np-d-movil { background: var(--blue); }
.np-d-pc { background: var(--ok); }
.np-leyenda { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0; font-size: .9rem; }
.np-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.np-leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

/* Dominio */
.np-dominios { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.np-dominios li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--trace-soft); border-radius: var(--radius-m); background: rgba(5, 12, 30, .3); }
.np-dominios li > div { display: grid; gap: 4px; min-width: 0; flex: 1 1 220px; }
.np-dominios li b { overflow-wrap: anywhere; }
.np-dominios li .badge { justify-self: start; }
.np-dominios .is-ocupado { opacity: .6; }
.np-exc { color: #ffd59a; }
.np-dns code { overflow-wrap: anywhere; word-break: break-all; }
.np .toolbar input { min-width: 0; }

/* Espacio y fotos */
.np-archivo { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.np-archivo input { max-width: 100%; min-width: 0; }
.np-fotos { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.np-fotos li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 10px; border: 1px solid var(--trace-soft); border-radius: var(--radius-m); }
.np-fotos li > button { grid-column: 1 / -1; justify-self: start; }
.np-fotos img, .np-foto-vacia { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--ink-2); display: grid; place-items: center; color: var(--mist); }
.np-fotos div { display: grid; gap: 2px; min-width: 0; }
.np-nombre { overflow-wrap: anywhere; }

/* Editor */
.np-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.np-ed-col { display: grid; gap: 18px; min-width: 0; }
.np-ed-col .panel + .panel { margin-top: 0; }
.np-secciones .panel-head { flex-wrap: wrap; gap: 10px; }
.np-ed-prev { position: sticky; top: calc(var(--header-h) + 12px); min-width: 0; padding: 16px; }
.np-prev-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.np-prev-head h2 { margin: 0; font-size: 1.05rem; }
.np-prev-tam { display: flex; gap: 6px; }
.np-prev-tam [aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: #fff; }
.np-prev-marco { border-radius: 12px; overflow: hidden; background: #fff; margin: 0 auto; transition: max-width .2s; }
.np-prev-marco[data-tam="pc"] { max-width: 100%; }
.np-prev-marco[data-tam="movil"] { max-width: 375px; }
.np-prev-marco iframe { display: block; width: 100%; height: min(72vh, 760px); border: 0; background: #fff; }

.np-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.np-sec { display: flex; align-items: center; gap: 6px; border: 1px solid var(--trace-soft); border-radius: var(--radius-m); background: rgba(5, 12, 30, .3); }
.np-sec.is-sel { border-color: var(--blue); background: var(--blue-soft); }
.np-sec.is-oculto .np-sec-nombre { opacity: .55; }
.np-sec-nombre { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; border-radius: var(--radius-m); }
.np-sec-nombre > span:last-child { display: grid; min-width: 0; }
.np-sec-nombre b, .np-sec-nombre small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-sec-nombre small { color: var(--mist); }
.np-sec-nombre i { color: var(--blue); width: 22px; text-align: center; }
.np-sec-n { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--ink-2); color: var(--mist); font-size: .8rem; }
.np-oculta { color: var(--warn) !important; }
.np-sec-acc { display: flex; align-items: center; gap: 0; padding-right: 4px; flex-shrink: 0; }
.np-sec-acc .icon-button, .np-mini-acc .icon-button { width: 36px; height: 36px; font-size: .9rem; }
.np-sec-acc .icon-button:disabled, .np-mini-acc .icon-button:disabled { opacity: .3; cursor: default; }
.np-sec-nombre:focus-visible, .np-switch input:focus-visible ~ i, .np .icon-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Interruptor mostrar/ocultar */
.np-switch { position: relative; display: inline-flex; align-items: center; width: 40px; height: 36px; cursor: pointer; }
.np-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.np-switch i { width: 34px; height: 20px; border-radius: 99px; background: var(--trace); position: relative; transition: background .2s; }
.np-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.np-switch input:checked ~ i { background: var(--ok); }
.np-switch input:checked ~ i::after { transform: translateX(14px); }

.np-form .panel-head { margin-bottom: 8px; }
.np-form h2:focus { outline: none; }
.np-grid { gap: 12px 14px; }
.np-campo { display: grid; gap: 6px; min-width: 0; }
.np-campo label, .np-foto > label { font-size: .88rem; color: var(--mist); }
.np-campo input, .np-campo textarea, .np-campo select, .np-foto select { width: 100%; min-width: 0; }
.np-grupo { border: 1px solid var(--trace-soft); border-radius: var(--radius-m); padding: 12px 14px 14px; margin: 0; min-width: 0; }
.np-grupo legend { padding: 0 6px; font-weight: 600; }
.np-grupo > .btn { margin-top: 10px; }
.np-elemento { border-top: 1px dashed var(--trace-soft); padding-top: 10px; margin-top: 10px; }
.np-elemento:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.np-elemento-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.np-elemento-head > b { min-width: 0; overflow-wrap: anywhere; }
.np-mini-acc { display: inline-flex; flex-shrink: 0; }
.np-pares { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.np-pares li { display: flex; gap: 6px; align-items: flex-start; }
.np-par-campos { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.np-par-campos label { display: grid; align-content: start; gap: 4px; font-size: .85rem; color: var(--mist); min-width: 0; }
.np-par-campos input, .np-par-campos textarea { width: 100%; min-width: 0; }
.np-cat { padding: 10px 0; border-top: 1px dashed var(--trace-soft); }
.np-cat:first-of-type { border-top: 0; padding-top: 0; }
.np-cat-nombre { flex: 1 1 200px; }
.np-tabla th, .np-tabla td { vertical-align: top; padding: 6px; }
.np-tabla input, .np-tabla textarea { width: 100%; min-width: 0; }
.np-tabla td:nth-child(1) { min-width: 150px; }
.np-tabla td:nth-child(2) { min-width: 180px; }
.np-tabla td:nth-child(3), .np-tabla td:nth-child(4) { width: 110px; }
.np-td-acc { white-space: nowrap; width: 1%; }
.np-foto-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.np-foto-fila img, .np-foto-fila .np-foto-vacia { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--ink-2); display: grid; place-items: center; color: var(--mist); flex-shrink: 0; }
.np-foto-fila select { flex: 1 1 160px; width: auto; }
.np-subir-foto { position: relative; cursor: pointer; }
.np-subir-foto.is-busy { opacity: .6; pointer-events: none; }
.np-subir-foto input:focus-visible { outline: none; }
.np-subir-foto:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.np-colores { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.np-color { display: flex; align-items: center; gap: 10px; font-size: .9rem; min-width: 0; }
.np-color input { width: 44px; height: 36px; padding: 2px; flex-shrink: 0; border-radius: 8px; cursor: pointer; }
.np-muestra { font-size: 1.1rem; color: var(--white); }
.np-campo input[type="range"] { padding: 0; }

.np-barra { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; padding: 12px 16px;
    border: 1px solid var(--trace-soft); border-radius: var(--radius-m); background: rgba(7, 19, 49, .94); backdrop-filter: blur(8px); }
.np-barra > span { margin-right: auto; color: var(--mist); font-size: .9rem; }
.np-barra.is-sucio > span { color: var(--warn); font-weight: 600; }

/* Elegir diseño */
.np-elegir { margin-top: 8px; }
.np-elegir-filtros { display: grid; gap: 12px; margin-bottom: 10px; }
.np-elegir-filtros input[type="search"] { width: 100%; max-width: 560px; }
.np-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.np-disenos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.np-diseno { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--trace-soft); border-radius: var(--radius-l); background: var(--panel); overflow: hidden; }
.np-diseno.is-actual { border-color: var(--blue); }
.np-diseno-foto { aspect-ratio: 16 / 10; background: var(--ink-2); display: grid; place-items: center; color: var(--mist); font-size: 2rem; }
.np-diseno-foto img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.np-diseno-txt { padding: 14px 16px 0; display: grid; gap: 8px; flex: 1; align-content: start; }
.np-diseno-txt h3 { margin: 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.np-diseno-txt p { margin: 0; color: var(--mist); }
.np-funciones { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.np-funciones li { font-size: .76rem; padding: 2px 8px; border-radius: 99px; background: var(--blue-soft); color: #9fc8ff; }
.np-diseno-acc { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 16px; }
.np-diseno-acc .btn { flex: 1 1 auto; justify-content: center; }
.np-disenos-vacio { grid-column: 1 / -1; }

/* 47.3.0 · Constructor: añadir/quitar secciones, controles del esquema, fotos, video, precios y chat */
.np-par-campos { grid-template-columns: repeat(var(--np-cols, 2), minmax(0, 1fr)); }
.np-renglones { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.np-renglones li { display: flex; gap: 6px; align-items: flex-end; }
.np-renglones li > .np-campo { flex: 1; }
.np-grupo > .np-agregar, .np-nodo > .np-agregar { margin-top: 10px; justify-self: start; }
.np-insertar { display: flex; justify-content: center; margin: -3px 0; }
.np-insertar button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 12px; border: 1px dashed transparent; border-radius: 99px; background: none; color: var(--mist); font-size: .78rem; cursor: pointer; opacity: .6; }
.np-insertar button:hover, .np-insertar button:focus-visible { opacity: 1; border-color: var(--blue); color: #fff; background: var(--blue-soft); outline: none; }
.np-insertar-fin { margin-top: 6px; }
.np-insertar-fin .btn { width: 100%; justify-content: center; border-style: dashed; }
.np-deshacer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 12px; border-radius: var(--radius-m); background: rgba(255, 196, 0, .1); border: 1px solid rgba(255, 196, 0, .35); }
.np-deshacer:empty { display: none; }
.np-quitar:hover { color: var(--danger); }
.np-form .panel-head { flex-wrap: wrap; gap: 10px; }
.np-ajustes { border: 1px solid var(--trace-soft); border-radius: var(--radius-m); padding: 10px 14px; }
.np-ajustes summary, .np-mas summary, .np-pasos summary, .np-lineas summary { cursor: pointer; color: var(--mist); font-weight: 600; }
.np-ajustes[open] summary { margin-bottom: 10px; }
.np-check label { display: flex; align-items: center; gap: 8px; color: inherit; font-size: .92rem; cursor: pointer; }
.np-check input { width: auto; }
.np-precio { display: flex; align-items: center; gap: 6px; }
.np-precio input { flex: 1; min-width: 0; }
.np-precio span { color: var(--mist); font-size: .85rem; }
.np-precio-fmt { min-height: 1em; }
.np-icono-fila { display: flex; align-items: center; gap: 8px; }
.np-icono-fila select { flex: 1; min-width: 0; }
.np-ico { width: 28px; height: 28px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--blue); }
.np-etq { font-size: .88rem; color: var(--mist); }
.np-galeria { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.np-galeria li { display: grid; gap: 6px; min-width: 0; }
.np-galeria img, .np-galeria .np-foto-vacia { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--ink-2); display: grid; place-items: center; color: var(--mist); }
.np-galeria-acc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; }
.np-galeria-acc .icon-button { width: 32px; height: 32px; }
.np-prods { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.np-prod { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--trace-soft); border-radius: var(--radius-m); min-width: 0; }
.np-prod-fila { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.np-prod-fila > .np-mini-acc { align-self: center; }
.np-mas .form-grid { margin-top: 10px; }
.np-video-fila { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; align-items: start; }
.np-video-prev { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--ink-2); display: grid; place-items: center; color: var(--mist); }
.np-video-prev img, .np-video-prev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-video-vacio { display: grid; place-items: center; gap: 4px; text-align: center; font-size: 1.4rem; }
.np-video-vacio .small { font-size: .75rem; }
.np-video-campos { display: grid; gap: 6px; min-width: 0; }
.np-video-estado { margin: 0; color: var(--mist); }
.np-video-estado.is-error { color: #ff9b9b; }
.np-video-sel { width: auto; max-width: 100%; flex: 1 1 180px; }
.np-acciones-fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.np-ofrecer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.np-subir { position: relative; cursor: pointer; }
.np-subir.is-busy { opacity: .6; pointer-events: none; }
.np-subir input:focus-visible { outline: none; }
.np-subir:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Selector de fotos */
.np-picker { display: grid; gap: 10px; }
.np-picker-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.np-picker input[type="search"] { width: 100%; }
.np-picker .form-status:empty { display: none; }
.np-picker-grid { list-style: none; margin: 0; padding: 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 10px; max-height: min(55vh, 520px); overflow: auto; }
.np-picker-foto { width: 100%; display: grid; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 10px; background: var(--ink-2); color: inherit; cursor: pointer; text-align: left; }
.np-picker-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; display: block; }
.np-picker-foto span { font-size: .75rem; color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-picker-foto:hover, .np-picker-foto:focus-visible { border-color: var(--blue); outline: none; }
.np-picker-foto.is-actual { border-color: var(--ok); }
.np-picker-mas { margin: 0; text-align: center; }
/* Catálogo «Añadir sección» */
.np-cat-secciones { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.np-cat-sec { width: 100%; height: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--trace-soft); border-radius: var(--radius-m); background: rgba(5, 12, 32, .4); color: inherit; text-align: left; cursor: pointer; }
.np-cat-sec:hover, .np-cat-sec:focus-visible { border-color: var(--blue); background: var(--blue-soft); outline: none; }
.np-cat-sec > span:last-child { display: grid; gap: 3px; min-width: 0; }
.np-cat-sec small { color: var(--mist); }
.np-cat-ico { flex: 0 0 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
/* Chat del sitio */
.np-modos { display: grid; gap: 8px; }
.np-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--trace-soft); border-radius: var(--radius-m); cursor: pointer; }
.np-radio input { width: auto; margin-top: 3px; }
.np-radio span { display: grid; gap: 2px; }
.np-radio small { color: var(--mist); }
.np-radio:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.np-radio:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.np-nodos { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.np-nodos > .np-nodo { border: 1px solid var(--trace-soft); border-radius: var(--radius-m); padding: 10px 12px; margin: 0; display: grid; gap: 8px; }
.np-nota, .np-nix-aviso { display: flex; gap: 8px; align-items: flex-start; }
/* Cobros */
.np-cobro { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--trace-soft); border-radius: var(--radius-m); min-width: 0; }
.np-cobro h3 { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 1.02rem; }
.np-cobro .form-status:empty { display: none; }
.np-pasos ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.np-revisa { white-space: normal; margin-top: 4px; }
.np-lineas ul { margin: 4px 0 0; padding-left: 18px; }
/* Mensajes */
.np-mensajes { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.np-mensajes .panel { margin: 0 !important; min-width: 0; }
.np-chats-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 65vh; overflow: auto; }
.np-chat-item { width: 100%; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--trace-soft); border-radius: var(--radius-m); background: none; color: inherit; text-align: left; cursor: pointer; }
.np-chat-item.is-sel { border-color: var(--blue); background: var(--blue-soft); }
.np-chat-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.np-chat-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
.np-chat-top b, .np-chat-ultimo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.np-chat-ultimo { color: var(--mist); }
.np-conv { display: grid; gap: 10px; }
.np-conv-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.np-conv-head h2 { margin: 0; font-size: 1.05rem; }
.np-conv-head h2:focus { outline: none; }
.np-msgs { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 55vh; min-height: 200px; overflow: auto; border-radius: var(--radius-m); background: rgba(5, 12, 32, .35); }
.np-msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; background: var(--ink-2); align-self: flex-start; }
.np-msg.de-negocio { align-self: flex-end; background: var(--blue-soft); border: 1px solid rgba(46, 139, 255, .4); }
.np-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.np-msg small { display: block; margin-top: 3px; color: var(--mist); font-size: .72rem; }
.np-responder { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.np-responder textarea { width: 100%; min-width: 0; resize: vertical; }
.np-responder .form-status { grid-column: 1 / -1; margin: 0; }
.np-responder .form-status:empty { display: none; }

@media (max-width: 1100px) {
    .np-editor { grid-template-columns: minmax(0, 1fr); }
    .np-ed-prev { position: static; }
}
@media (max-width: 480px) {
    .np-prod-fila { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 900px) {
    .np-mensajes { grid-template-columns: minmax(0, 1fr); }
    .np-chats-lista { max-height: 40vh; }
}
@media (max-width: 760px) {
    .np-prod-fila { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .np-prod-fila > .np-campo:first-child, .np-prod-fila > .np-mini-acc { grid-column: 1 / -1; }
    .np-prod-fila > .np-mini-acc { justify-self: end; }
    .np-video-fila { grid-template-columns: minmax(0, 1fr); }
    .np-video-prev { max-width: 240px; }
    .np-responder { grid-template-columns: minmax(0, 1fr); }
    .np-msg { max-width: 92%; }
    .np-grupo .np-grupo { padding: 10px 8px 12px; }
    .np-grupo .np-grupo .np-grupo { padding: 8px 0 10px; border-width: 1px 0 0; border-radius: 0; }
    .np-prod { padding: 8px; }
    .np-dos { grid-template-columns: minmax(0, 1fr); }
    .np-par-campos { grid-template-columns: minmax(0, 1fr); }
    .np .form-grid { grid-template-columns: minmax(0, 1fr); }
    /* Tabla de productos como tarjetas en celular */
    .np-tabla thead { display: none; }
    .np-tabla, .np-tabla tbody, .np-tabla tr, .np-tabla td { display: block; width: 100%; }
    .np-tabla tr { border: 1px solid var(--trace-soft); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
    .np-tabla td { padding: 4px 0; min-width: 0 !important; border: 0; }
    .np-tabla td { padding: 4px 0 !important; min-height: 0; }
    table.data.np-tabla td::before, table.data.np-tabla td:first-child::before { content: attr(data-label); position: static; display: block; width: auto; font-size: .8rem; color: var(--mist); margin-bottom: 2px; }
    table.data.np-tabla td[data-label=""]::before { display: none; }
    table.data.np-tabla td:first-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 4px; }
    .np-tabla td:nth-child(3), .np-tabla td:nth-child(4) { width: 100%; }
    .np-td-acc { width: 100%; text-align: right; }
    .np-prev-marco iframe { height: 70vh; }
    .np-barra { padding: 10px; }
    .np-barra > span { flex-basis: 100%; font-size: .82rem; }
    .np-barra { gap: 8px; }
    .np-barra .btn { flex: 1 1 auto; justify-content: center; }
    .np .panel { padding: 16px; }
}

/* 47.3.0 · Celular: el editor se usa por partes (Secciones, Editar, Vista) para cambios rápidos.
   Fuera de este @media solo se esconden las piezas del celular: en la computadora todo se ve igual que antes. */
:is(.np, .np-picker) :is(.np-solo-movil, .np-txt-m, .np-estado-m, .np-barra-nav, .np-sw-txt) { display: none; }
.np-foto-fila > img, .np-foto-fila > .np-foto-vacia { cursor: pointer; }
@media (max-width: 767px) {
    :is(.np, .np-picker) .np-txt-pc { display: none; }
    :is(.np, .np-picker) .np-txt-m { display: inline; }
    .np .np-solo-movil { display: inline-flex; }
    /* Aviso: mejor en la computadora */
    .np .np-aviso-pc.np-solo-movil { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: start; margin: 0 0 12px; padding: 12px 12px 10px 14px;
        border: 1px solid rgba(46, 139, 255, .4); border-radius: var(--radius-m); background: var(--blue-soft); }
    .np:has(.np-editor:not([data-np-panel="secciones"])) .np-aviso-pc.np-solo-movil { display: none; }
    .np-aviso-pc > i { color: var(--blue); font-size: 1.2rem; margin-top: 3px; }
    .np-aviso-pc p { margin: 0; font-size: .92rem; line-height: 1.45; }
    .np-aviso-pc-acc { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
    .np-aviso-pc-acc .btn { flex: 1; justify-content: center; }
    /* Tamaños para el dedo y letra de 16 px (así el teléfono no hace zoom al escribir) */
    .np .btn, .np-picker .btn { min-height: 44px; }
    .np .icon-button, .np-sec-acc .icon-button, .np-mini-acc .icon-button, .np-galeria-acc .icon-button { width: 44px; height: 44px; min-width: 44px; }
    .np-editor :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="file"]), select, textarea) { font-size: 16px; min-height: 44px; }
    .np-editor .np-check label { min-height: 44px; }
    .np-editor details > summary { padding-block: 10px; }
    .np-editor :is(.np-check, .np-radio) input { width: 22px; height: 22px; flex-shrink: 0; }
    .np-color input { width: 52px; height: 44px; }
    /* Una parte a la vez */
    .np-editor { display: block; margin-bottom: calc(110px + env(safe-area-inset-bottom)); }
    .np-ed-col { display: block; }
    .np-editor[data-np-panel="secciones"] :is(.np-form, .np-ed-prev),
    .np-editor[data-np-panel="editar"] :is(.np-secciones, .np-ed-prev),
    .np-editor[data-np-panel="vista"] .np-ed-col { display: none; }
    .np-secciones, .np-form, .np-ed-prev { scroll-margin-top: calc(var(--header-h) + 8px); }
    /* Secciones como tarjetas a todo lo ancho */
    .np-secciones .panel-head .btn { flex: 1 1 auto; justify-content: center; }
    .np-editor .panel-head h2 { font-size: 1.25rem; }
    .np-lista { gap: 10px; }
    .np-sec { flex-wrap: wrap; gap: 0; }
    .np-sec-nombre { flex: 1 1 100%; min-height: 56px; padding: 10px 14px; }
    .np-sec-nombre b, .np-sec-nombre small { white-space: normal; overflow-wrap: anywhere; }
    .np-sec-acc { flex: 1 1 100%; justify-content: flex-end; gap: 8px; padding: 6px 8px 8px; border-top: 1px solid var(--trace-soft); }
    .np-sec-acc > .np-switch { margin-right: auto; }
    .np-switch { width: auto; height: 44px; gap: 8px; padding: 0 6px; }
    .np .np-sw-txt { display: inline; font-size: .85rem; color: var(--mist); }
    .np-insertar { display: none; }
    .np-insertar-fin .btn { min-height: 48px; }
    .np-deshacer .btn { flex: 1 1 auto; justify-content: center; }
    /* Editar: pantalla completa con «Secciones» y «Listo» siempre arriba */
    .np .np-form-movil.np-solo-movil { position: sticky; top: var(--header-h); z-index: 6; display: flex; align-items: center; gap: 8px; margin: -16px -16px 12px; padding: 8px 10px;
        background: rgba(7, 19, 49, .97); border-bottom: 1px solid var(--trace-soft); border-radius: var(--radius-l) var(--radius-l) 0 0; }
    .np-form-movil .btn { flex-shrink: 0; padding-inline: 12px; }
    .np-form-movil-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92rem; text-align: center; }
    .np-form .panel-head h2 { font-size: 1.15rem; }
    .np-form .panel-head > .btn { flex: 1 1 100%; justify-content: center; }
    .np-foto-fila img, .np-foto-fila .np-foto-vacia { width: 88px; height: 88px; }
    .np-foto-fila .btn { flex: 1 1 140px; justify-content: center; }
    /* Vista: la página al ancho del teléfono */
    .np-editor[data-np-panel="vista"] .np-ed-prev { margin-inline: calc(-1 * var(--gutter, 16px)); padding: 10px 0 0; border-radius: 0; border-width: 1px 0; }
    .np-prev-head { flex-wrap: nowrap; justify-content: flex-start; gap: 10px; padding: 0 12px; }
    .np-prev-head h2 { font-size: 1rem; }
    .np-prev-head h2:focus { outline: none; }
    .np-prev-tam { display: none; }
    .np-prev-marco, .np-prev-marco[data-tam] { max-width: 100%; border-radius: 0; }
    .np-prev-marco iframe { height: calc(100dvh - var(--header-h) - 190px); min-height: 380px; }
    .np-ed-prev > p { padding: 0 12px; }
    /* Barra fija abajo: estado, partes del editor, Guardar y Publicar */
    .np-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; border-radius: 0; border-width: 1px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
    .np-barra > #np-sucio { display: none; }
    .np .np-estado-m { grid-column: 1 / -1; margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 18px; font-size: .78rem; color: var(--mist); }
    .np-estado-m.is-sucio { color: var(--warn); font-weight: 600; }
    .np-estado-m.is-ok { color: var(--ok); }
    .np .np-barra-nav { grid-column: span 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .np-barra-nav button, .np-barra > .btn { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 2px; font-size: .74rem; font-weight: 600; line-height: 1.1; border-radius: 10px; white-space: nowrap; }
    .np-barra-nav button { background: none; border: 0; color: var(--mist); cursor: pointer; font-family: inherit; }
    .np-barra-nav button[aria-pressed="true"] { color: #fff; background: var(--blue-soft); }
    .np-barra-nav button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
    .np-barra-nav i, .np-barra > .btn i { font-size: 1.05rem; }
    body:has(.np-barra) .chat-launcher { bottom: calc(104px + env(safe-area-inset-bottom)); }
    body:has(.np-barra) #toasts { bottom: calc(108px + env(safe-area-inset-bottom)); }
    /* Fotos: hoja con miniaturas grandes en 3 columnas; «Subir desde mi teléfono» primero */
    dialog.modal.np-hoja { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: var(--radius-l) var(--radius-l) 0 0; border-bottom: 0; }
    .np-picker-barra { flex-direction: column-reverse; align-items: stretch; }
    .np-picker-barra .np-subir { min-height: 48px; justify-content: center; }
    .np-picker .chips { display: flex; gap: 8px; }
    .np-picker .chip { flex: 1; min-height: 44px; justify-content: center; }
    .np-picker input[type="search"] { font-size: 16px; min-height: 44px; }
    .np-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: none; overflow: visible; padding: 0; }
    .np-picker-foto { position: relative; padding: 2px; border-radius: 8px; }
    .np-picker-foto img { aspect-ratio: 1; border-radius: 6px; }
    .np-picker-foto span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .np-picker-mas .btn { width: 100%; justify-content: center; }
    .np-cat-sec { min-height: 56px; }
}
/* Con el teclado abierto se esconde la barra para dejar lugar al campo («Listo» sigue arriba). */
@media (max-width: 767px) and (pointer: coarse) {
    body:has(.np-form :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="file"]), textarea):focus) .np-barra { display: none; }
}
