/* Ajustes propios de gPay.Net sobre iGemas.css (copiado de gInm). Colores por variables; nada en línea. */
:root {
	/* Magenta de gPay (el del logo; el legacy lo usa de acento). El verde #65E2C8 es de gInm. */
	--gpay-acento: #E91E63;
}

/* Acceso */
.AccesoFondo {
	padding: 0;
	/* La foto de la semana (acceso.js pone --fondo-acceso) va encima del degradado; si no carga, queda el degradado. */
	background-image: var(--fondo-acceso, none), radial-gradient(circle at 20% 20%, #1f3a5f 0%, #15253c 55%, #0d1726 100%);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
}
/* Velo sobre la foto: oscuro para leer el formulario, con un toque del magenta de gPay. */
.AccesoVelo {
	background: linear-gradient(135deg, rgba(233, 30, 99, .38) 0%, rgba(120, 20, 70, .5) 45%, rgba(13, 23, 38, .72) 100%);
}
.AccesoCaja { fill: var(--gpay-acento); }
.AccesoIcono,
.AccesoIcono:hover {
	background-color: var(--gpay-acento);
	border-color: var(--gpay-acento);
}
.AccesoBoton { color: var(--gpay-acento); }

/* Modo oscuro: iGemas.css solo aclara los <a class="dropdown-item">; los <button> (p. ej. «Modo claro/oscuro» del
   menú ⋮ de la barra en celular) quedaban con texto oscuro sobre fondo oscuro. */
body.dark-mode .dropdown-menu button.dropdown-item:not(:hover):not(:focus):not(.active) { color: #fff; }

/* Avisos (AGENTS 5.9): todo lo dice Gemi (gemi.css/gemi.js, paquete de Valeria). El velo negro «Procesando…» de gInm
   (.loading, lo encienden iGemas.js y acceso.js) no se muestra: tapaba la pantalla en cada llamada. */
.loading { display: none !important; }
.gemi-texto { white-space: pre-line; }   /* los <br> de los mensajes de gInm llegan como saltos de línea */
#geduAvisos { bottom: 3.25rem; }         /* encima del pie del shell (empresa · T.C.S.) */
/* En el celular el globo quedaba casi de lado a lado y se salía del contenedor de la página: va dentro de su margen
   (el del shell + el padding de la página), más angosto que el contenedor. */
@media (max-width: 575.98px) {
	#geduAvisos { right: 2.25rem; left: 2.25rem; max-width: none; justify-items: stretch; }
	#geduAvisos .gemi-globo { align-self: stretch; }
	#geduAvisos .gemi-cara { width: 64px; height: 64px; }
}
/* Modo oscuro: gemi.css usa las variables de Bootstrap, que el oscuro de gInm (body.dark-mode) no cambia; se usan sus
   mismos grises (iGemas.css: cuerpo del modal #1F2937, pie #111827). */
body.dark-mode .gemi-globo, body.dark-mode .gemi-globo::before { background: #1F2937; color: #E5E7EB; border-color: #374151; }
body.dark-mode .gemi-confirm { --bs-modal-color: #E5E7EB; color: #E5E7EB; }
body.dark-mode .gemi-confirm::after { background: #111827; border-color: #374151; }
body.dark-mode .gemi-cerrar { color: #9CA3AF; }
/* Modal de confirmar: cabecera de gInm (_Gemi.cshtml) con las esquinas redondeadas del globo de Gemi. */
.gemi-confirm .modal-header { border-top-left-radius: inherit; border-top-right-radius: inherit; }

/* Logo del sidebar (gInm lo hace con style en línea) */
.LogoBarra { height: 6.25rem; }

/* Versiones */
.TextoVersiones { white-space: pre-wrap; font-family: inherit; }

/* Configuración › Usuarios y Roles (spec 002): árbol y leyenda de gInm, que los pone con style= en línea. */
.MenuCopy { width: 250px; max-width: 100%; }
.LeyendaSi { color: #23E03A; }
.LeyendaNo { color: #FF0000; }
.LeyendaAlgunas { color: #FFFF00; }

/* Configuración › Preferencias (spec 003): vista previa del logo sobre el color de la marca. */
.PrefLogo { max-height: 100px; }

/* Catálogo › Productos (spec 005), del prototipo aprobado docs/developer/prototipos/catalogo/. */
body { --cp-card: #fff; --cp-line: #dee2e6; --cp-mut: #6c757d; --cp-soft: #eef0f3; --cp-txt: #212529; }
body.dark-mode { --cp-card: #1f2937; --cp-line: #374151; --cp-mut: #9ca3af; --cp-soft: #2b3646; --cp-txt: #f3f4f6; }
.cp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* Barra de botones al estilo de DataTables de gInm (.dt-buttons): un solo grupo, nunca en dos filas. */
.cp-botones { flex-wrap: nowrap; }
.dt-buttons.btn-group, .dt-buttons.btn-group.flex-wrap { flex-wrap: nowrap !important; }   /* DataTables le pone .flex-wrap */
/* datatables.min.css estira los botones al 100% en celular: quedan como un grupo más; si no caben, el siguiente baja. */
@media (max-width: 767.98px) { div.dt-buttons { width: auto; margin-bottom: 0; } }
.cp-botones .btn-user, .gp-botonera .btn-user { background: var(--cli-bck, #15253c); color: var(--cli-col, #fff); border-color: var(--cli-col, #fff); white-space: nowrap; }
.cp-botones .btn-user:hover, .gp-botonera .btn-user:hover { filter: brightness(1.2); }
.cp-botones .btn.active, .gp-botonera .btn.active { filter: brightness(1.45); }
.cp-botones .badge, .gp-botonera .badge { font-size: 11px; }
/* Filtro activado (aria-pressed): invertido, para que se note que se aplicó. !important porque iGemas.js les pone los
   colores de la marca en línea a todo .btn-user al iniciar una tabla. */
.cp-botones .btn-user[aria-pressed="true"], .gp-botonera .btn-user[aria-pressed="true"] {
	background: var(--cli-col, #fff) !important; color: var(--cli-bck, #15253c) !important; border-color: var(--cli-bck, #15253c) !important; filter: none; }

/* Botonera universal (AGENTS 5.8): la barra de toda página, con la forma de la de DataTables de gInm (B a la izquierda,
   .TblColTop a la derecha). Una sola fila: .gp-izq lleva los grupos de la izquierda y, si no caben (celular), se desliza
   sin barra de desplazamiento; .gp-der queda fija al extremo derecho. */
.gp-botonera { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; margin-bottom: .5rem; }
.gp-izq { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gp-izq::-webkit-scrollbar { display: none; }
.gp-der { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.gp-botonera .btn-group { flex-wrap: nowrap; flex: none; }
.gp-botonera .btn.active .gp-n { background: rgba(255, 255, 255, .3); }
/* Contador dentro de un botón (pestañas, categorías). Los avisos usan .badge.text-bg-danger. */
.gp-n { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .16); }
.gp-txt { font-size: 13px; color: var(--cp-mut); white-space: nowrap; }
/* Lupa (.gp-lupa, gpay.js), como la de gInm: un botón más del grupo que se ensancha ahí mismo, sin caja blanca. */
.gp-lupa { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.gp-lupa input { width: 0; min-width: 0; padding: 0; border: 0; outline: 0; opacity: 0; background: transparent; color: inherit; font: inherit;
	box-shadow: none; transition: width .2s ease-out, opacity .15s; }
.gp-lupa input::placeholder { color: inherit; opacity: .65; }
.gp-lupa input::-webkit-search-cancel-button { filter: invert(1); }
.gp-lupa.abierto input { width: min(190px, 42vw); opacity: 1; }
.gp-lupa.con-texto:not(.abierto) { filter: brightness(1.45); }
/* En el celular la barra de la tabla entra completa: botones más justos, las vistas sin contador (está en el menú) y, con
   la lupa abierta, solo ella: si no, el foco desliza el grupo y esconde los primeros botones. */
@media (max-width: 575.98px) {
	.dt-buttons > .btn, .dt-buttons > .btn-group > .btn, #PdFechas > .btn { padding-left: .4rem; padding-right: .4rem; }
	.dt-buttons > .btn-limpiar-sb.disabled { display: none; }   /* sin filtros que limpiar, deja sitio */
	#PdVistaMenu .gp-n { display: none; }
	.dt-buttons:has(.gp-lupa.abierto) > :not(.gp-lupa) { display: none; }
	.dt-buttons .gp-lupa { display: inline-flex !important; flex-wrap: nowrap; }
	.dt-buttons .gp-lupa.abierto input { width: min(220px, 52vw); }
}
/* La barra de DataTables (dom de gInm en iGemas.js) se comporta igual: una fila; los botones (B) se deslizan si no
   caben y .TblColTop queda al extremo derecho. Los menús de DataTables cuelgan del wrapper, no se recortan. */
:is(.dt-container, .dataTables_wrapper) > .row:first-child { flex-wrap: nowrap; }
:is(.dt-container, .dataTables_wrapper) > .row:first-child > .col-auto:first-child { flex-shrink: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
:is(.dt-container, .dataTables_wrapper) > .row:first-child > .col-auto:first-child::-webkit-scrollbar { display: none; }
.cp-vista .btn.active { filter: brightness(1.35); }
.cp-mini { width: 40px; height: 30px; object-fit: cover; border-radius: 6px; display: inline-grid; place-items: center; }
.cp-mini-vacia { background: var(--cp-soft); color: var(--cp-mut); }
.cp-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; margin: 18px 0 10px; }
.cp-sec h2:after { content: ""; flex: 1; height: 1px; background: var(--cp-line); order: 9; }
.cp-cnt { font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--cp-soft); color: var(--cp-mut); border: 1px solid var(--cp-line); }
.cp-aginfo { font-size: 12.5px; font-weight: 600; color: #dc3545; }
body.dark-mode .cp-aginfo { color: #f87171; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 16px; }
.cp-card { background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); transition: box-shadow .15s ease-out, border-color .15s ease-out; }
.cp-card:hover { box-shadow: 0 8px 22px rgba(15, 23, 42, .16); border-color: #aeb6c2; }
.cp-ph { position: relative; aspect-ratio: 4 / 3; background: #273140; cursor: pointer; overflow: hidden; }
.cp-ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.cp-ph-vacia { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; color: #9aa3b0; }
.is-out .cp-ph img, .is-out .cp-ph-vacia { filter: grayscale(1) brightness(.62); }
.cp-mi { position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .94); display: grid; place-items: center; font-size: 13px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.cp-outtag { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 8px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(190, 30, 45, .94); color: #fff; }
.cp-bd { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.cp-nm { font-size: 16px; font-weight: 600; line-height: 1.25; margin: 0; cursor: pointer; color: var(--cp-txt); overflow-wrap: anywhere; }
.cp-nm:hover { text-decoration: underline; }
.is-out .cp-nm, .is-out .cp-pr b { color: var(--cp-mut); }
.cp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-chip { display: inline-block; font-size: 12.5px; line-height: 1; padding: 5px 10px; border-radius: 999px; background: var(--cp-soft); border: 1px solid var(--cp-line); color: var(--cp-txt); }
.cp-pr { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 2px; }
.cp-pr b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cp-txt); }
.cp-pr small { font-size: 13px; color: var(--cp-mut); }
.cp-seg { margin: 12px 14px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 10px; background: var(--cp-soft); border: 1px solid var(--cp-line); }
.cp-seg button { border: 0; min-width: 0; height: 32px; border-radius: 7px; font-size: 13px; font-weight: 600; background: transparent; color: var(--cp-mut); padding: 0 4px; white-space: nowrap; }
.cp-seg button:hover:not(:disabled) { color: var(--cp-txt); }
.cp-seg button.on[data-set="1"] { background: #198754; color: #fff; }
.cp-seg button.on[data-set="0"] { background: #c82333; color: #fff; }
.cp-prev { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #e4e9f1; color: #2d3b50; font-size: 64px; }
.cp-prev img { width: 100%; height: 100%; object-fit: cover; }
.cp-w-sku { width: 170px; }
.cp-w-pre { width: 150px; }
@media (max-width: 575.98px) { .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Pedidos › Tablero por etapa (spec 008), del prototipo aprobado docs/developer/prototipos/pedidos/. */
.pt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pt-kpi { background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.pt-kpi small { color: var(--cp-mut); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; font-weight: 600; }
.pt-kpi b { font-size: 22px; color: var(--cp-txt); }
.pt-board { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)) auto; gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
/* Tablero de Pedidos del día: ocupa la pantalla y cada columna baja por su cuenta con el título siempre a la vista
   (con muchos pedidos, el scroll de toda la página hacía perder los títulos y dejaba huecos enormes). «Entregados hoy»
   abierta es un panel sobre el borde derecho: nunca obliga a bajar hasta el fondo. Si el tablero no tiene ~980 px (cinco
   etapas de 170 px y la plegada), va de a una columna con las pestañas en la botonera, como en el celular. Se mide el
   ancho del tablero (container query), no el de la ventana: depende de si el menú lateral está abierto. */
.pt-contenedor { container: tablero / inline-size; }
.pt-marco { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.pt-marco > .pt-kpis, .pt-marco > .gp-botonera { flex: none; }
#PtCaja { flex: 1; min-height: 0; position: relative; overflow: hidden; }
#PtTablero { height: 100%; grid-auto-rows: minmax(0, 1fr); align-items: stretch; overflow: hidden; padding-bottom: 0; }
#PtTablero .pt-col, .pt-panel { display: flex; flex-direction: column; min-height: 0; }
#PtTablero .pt-col h2, .pt-panel h2 { flex: none; }
#PtTablero .pt-lista, .pt-panel .pt-lista { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
#PtTablero .pt-col-plegada .pt-lista { display: none; }
/* «Entregados hoy»: entra y sale deslizándose por la derecha, sobre el tablero. */
.pt-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 92%); z-index: 5; box-shadow: -8px 0 22px rgba(15, 23, 42, .2);
	transform: translateX(calc(100% + 24px)); visibility: hidden; transition: transform .28s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .28s; }
.pt-panel.abierto { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
.pt-panel h2 { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .pt-panel, .pt-panel.abierto { transition: none; } }
@container tablero (max-width: 960px) {
	.pt-marco { height: auto; display: block; }
	.gp-botonera #PtTabs { display: inline-flex; }
	#PtCaja { overflow: visible; }
	.pt-panel { display: none; }
	#PtTablero { grid-template-columns: 1fr; overflow: visible; height: auto; grid-auto-rows: auto; }
	#PtTablero .pt-col:not(.activa) { display: none; }
	#PtTablero .pt-lista { overflow: visible; }
	#PtTablero .pt-col-plegada { width: auto; cursor: default; }
	#PtTablero .pt-col-plegada h2 { writing-mode: horizontal-tb; margin-bottom: 10px; }
	#PtTablero .pt-col-plegada .pt-lista { display: flex; }
}
.pt-col { background: var(--cp-soft); border-radius: 12px; padding: 10px; min-width: 0; }
.pt-col h2 { font-size: 14px; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 4px; color: var(--cp-txt); }
.pt-col h2 .cp-cnt { margin-left: auto; background: var(--cp-card); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.pt-c0 h2 i { color: #6c757d; } .pt-c1 h2 i { color: #0d6efd; } .pt-c2 h2 i { color: #6f42c1; }
.pt-c3 h2 i { color: #fd7e14; } .pt-c4 h2 i { color: #0dcaf0; } .pt-c5 h2 i { color: #198754; }
.pt-col-plegada { width: 46px; cursor: pointer; }
.pt-col-plegada h2 { writing-mode: vertical-rl; margin: 0; white-space: nowrap; }
.pt-col-plegada h2 .cp-cnt { margin: 8px 0 0; padding: 8px 0; }
.pt-col-plegada .pt-lista { display: none; }
.pt-lista { display: flex; flex-direction: column; gap: 10px; }
.pt-vacia { color: var(--cp-mut); font-size: 13px; text-align: center; margin: 8px 0; }
.pt-card { background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 10px; padding: 10px; cursor: pointer; color: var(--cp-txt); transition: box-shadow .15s ease-out; }
.pt-card:hover, .pt-card:focus-visible { box-shadow: 0 6px 18px rgba(15, 23, 42, .16); outline: none; }
.pt-card.pt-atencion { border-left: 4px solid #c82333; }
.pt-card[draggable="true"] { cursor: grab; }
.pt-arrastrando { opacity: .5; }
.pt-col.pt-destino { outline: 2px dashed #0d6efd; outline-offset: -2px; }
.pt-tit { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-num { color: var(--cp-mut); }
.pt-monto { white-space: nowrap; } .pt-monto b { font-size: 16px; } .pt-monto small, .pt-lugar, .pt-sit { color: var(--cp-mut); font-size: 12.5px; }
.pt-lugar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-tabs { display: none; }   /* pestañas por columna en la botonera: solo cuando el tablero va de a una columna */
.pt-estado { font-size: 13px; } .pt-e0 { background: #6c757d; } .pt-e1 { background: #fd7e14; } .pt-e2 { background: #6f42c1; }
.pt-e3 { background: #0dcaf0; color: #000; } .pt-e4 { background: #198754; } .pt-e5 { background: #343a40; }
.pt-historial li { padding: 2px 0; }
.pt-card .dropup .dropdown-toggle.pt-mas::after { display: none; }
.pt-items { --bs-table-bg: transparent; --bs-table-color: var(--cp-txt); color: var(--cp-txt); }
@media (max-width: 991.98px) {
	.gp-botonera .pt-tabs { display: inline-flex; }
	.pt-board { grid-template-columns: 1fr; }
	.pt-board .pt-col:not(.activa) { display: none; }
	.pt-col-plegada { width: auto; } .pt-col-plegada h2 { writing-mode: horizontal-tb; margin-bottom: 10px; } .pt-col-plegada .pt-lista { display: flex; }
}

/* Cocina › cola por producto (spec 009), del prototipo aprobado docs/developer/prototipos/cocina/ (opción A). */
/* Dentro del shell; «Pantalla completa» pone solo .kc-wrap en pantalla completa. */
.kc-wrap { height: 100%; display: flex; flex-direction: column; color: var(--cp-txt); }
.kc-wrap:fullscreen { background: var(--cp-soft); padding: 14px; }
.kc-kpi { font-size: 14px; color: var(--cp-mut); } .kc-kpi b { font-size: 18px; color: var(--cp-txt); }
.kc-hora { font-size: 20px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.kc-main { flex: 1; display: grid; grid-template-columns: 1fr 300px; gap: 14px; min-height: 0; }
.kc-cola, .kc-listos { min-height: 0; display: flex; flex-direction: column; }
.kc-grupos { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }
.kc-grupo { display: flex; align-items: stretch; gap: 14px; background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 12px; padding: 12px; }
.kc-faltan { width: 64px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.kc-faltan b { font-size: 44px; line-height: 1; } .kc-faltan small { font-size: 11px; text-transform: uppercase; color: var(--cp-mut); font-weight: 600; }
.kc-info { flex: 1; min-width: 0; }
.kc-info h3 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.kc-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.kc-ops span { background: #e7f0ff; color: #0b4fb3; border-radius: 6px; padding: 1px 8px; font-size: 13px; font-weight: 600; }
.kc-nota { background: #fff3c4; color: #5c4400; border-radius: 6px; padding: 3px 10px; font-weight: 600; margin-bottom: 4px; }
.kc-paras { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.kc-paras > small { color: var(--cp-mut); font-weight: 600; font-size: 11px; }
.kc-para { white-space: nowrap; }
.kc-t { border-radius: 4px; padding: 0 5px; font-weight: 700; } .kc-t1 { background: #d1f2df; color: #0f5132; }
.kc-t2 { background: #ffe8a1; color: #664d03; } .kc-t3 { background: #f8d0d4; color: #842029; }
.kc-hecha { width: 110px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 18px; font-weight: 700; border-radius: 10px; }
.kc-hecha i { font-size: 26px; }
.kc-listos { background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 12px; padding: 12px; overflow-y: auto; }
.kc-listos h2 { font-size: 13px; text-transform: uppercase; color: var(--cp-mut); font-weight: 700; display: flex; justify-content: space-between; }
.kc-listo { border-top: 1px solid var(--cp-line); padding: 10px 0; } .kc-listo b { font-size: 18px; }
.kc-cli { color: var(--cp-mut); font-size: 13px; }
.kc-vacio { text-align: center; color: var(--cp-mut); margin: 30px 0; }
.kc-tabs { display: none; }
body.dark-mode .kc-ops span { background: #1c3a66; color: #cfe2ff; }
body.dark-mode .kc-nota { background: #4d3d00; color: #ffe8a1; }
@media (max-width: 767.98px) {
	.kc-kpi, .kc-hora { display: none; }
	.kc-main { grid-template-columns: 1fr; }
	.kc-main[data-vista="hacer"] .kc-listos, .kc-main[data-vista="listos"] .kc-cola { display: none; }
	.kc-grupo { gap: 10px; padding: 10px; } .kc-faltan { width: 40px; } .kc-faltan b { font-size: 30px; }
	.kc-info h3 { font-size: 17px; }
	.kc-hecha { width: 52px; } .kc-hecha span { display: none; }
	.kc-tabs { display: flex; border-top: 1px solid var(--cp-line); background: var(--cp-card); }
	.kc-tabs button { flex: 1; border: 0; background: none; padding: 8px; color: var(--cp-mut); font-weight: 600; }
	.kc-tabs button.on { color: #0d6efd; }
}

/* Comprobante del pedido (spec 011): al imprimir queda solo el comprobante. */
.cb-captura { max-height: 220px; }
/* Comprobante (spec 014): la hoja (documentos.css) sobre el fondo del panel; «Imprimir» alineado con la hoja. */
.cb-acciones { max-width: 520px; margin-left: auto; margin-right: auto; }
.cb-pago + .cb-pago { border-top: 1px dashed var(--cp-line); padding-top: 8px; }
@media print {
	aside.CliLF, header, footer, .no-print, #ig-paleta { display: none !important; }
	#Main_Wrapper, #Word_wrap, #Inf_Wrap { margin: 0 !important; padding: 0 !important; overflow: visible !important; }
}

/* Reportes › Satisfacción (spec 011). */
.sat-estrellas { color: #f5a623; white-space: nowrap; }

/* Chat en vivo «Torre de control» (spec 013), del prototipo aprobado docs/developer/prototipos/chat/. Carriles con las
   columnas del tablero (.pt-*) y la conversación en un panel lateral. */
.ch-c0 h2 i { color: #dc3545; } .ch-c1 h2 i { color: #0d6efd; } .ch-c2 h2 i { color: #6c757d; } .ch-c3 h2 i { color: #6f42c1; }
.ch-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gpay-acento); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.ch-avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.ch-card.ch-abierta { box-shadow: 0 0 0 2px #0d6efd; }
.ch-card .pt-tit { min-width: 0; }
.ch-hace { white-space: nowrap; flex: none; }
.ch-ultimo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-tag { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; border-radius: 6px; padding: 1px 6px; margin-right: 4px; background: var(--cp-soft); color: var(--cp-mut); }
.ch-tag-aviso { background: #fff3cd; color: #997404; }
.ch-tag-mia { background: #cfe2ff; color: #084298; }

/* Configuración › Plantillas (spec 014): editor y vista previa lado a lado; en el celular, uno debajo del otro. */
.pl-cuerpo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 14px; align-items: start; }
.pl-editor { min-width: 0; }
.pl-previa { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--cp-line); border-radius: 8px; overflow: hidden; background: var(--cp-soft); }
.pl-previa-cab { padding: 8px 12px; border-bottom: 1px solid var(--cp-line); background: var(--cp-card); color: var(--cp-txt); font-size: 14px; }
.pl-previa-marco { flex: 1; width: 100%; min-height: 0; border: 0; background: #eef0f3; }   /* la caja mide lo que el editor (plantillas.js) */
.pl-comanda.jodit-wysiwyg { max-width: 76mm; margin: 0 auto; font-family: "Courier New", monospace; font-size: 12px; }
.jodit-wysiwyg.doc-comprobante { max-width: 520px; margin: 0 auto; box-shadow: none; }
@media (max-width: 991.98px) { .pl-cuerpo { grid-template-columns: minmax(0, 1fr); } #PlPreviaCaja { height: 70vh !important; } }

/* Cocina: el nombre de la cocina (la sucursal del usuario), cortado si es largo para no comerse la botonera. */
.kc-cats-menu { min-width: 240px; max-height: 60vh; overflow-y: auto; }
.kc-cats-menu .form-check { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 34px; margin: 0; cursor: pointer; }
.kc-cats-menu .form-check-label { flex: 1; cursor: pointer; }
.kc-suc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--cp-txt); }
@media (max-width: 575.98px) { .kc-suc { max-width: 110px; } }

/* Pedidos › Listado: el rango del histórico, en un desplegable para no abrir otra fila. */
.pd-fechas { min-width: 210px; }

/* En el celular la botonera no se va al bajar (AGENTS 5.8). En las tablas no hace falta: baja solo el cuerpo de la tabla. */
@media (max-width: 991.98px) {
	#Inf_Wrap .gp-botonera { position: sticky; top: -16px; z-index: 6; margin-top: -16px; padding-top: 16px; padding-bottom: 8px; background: var(--cp-bg, #fff); }
	body.dark-mode #Inf_Wrap .gp-botonera { background: #1f2937; }
}
@media (max-width: 575.98px) {
	.gp-botonera .btn-group > .btn, .gp-botonera .pt-tabs > .btn { padding-left: .45rem; padding-right: .45rem; }
	.gp-botonera .pt-tabs .gp-n { display: none; }   /* el contador está en el menú: aquí no cabe */
	.gp-botonera .pt-tabs .dropdown-toggle { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}


/* Registrar un pago en el detalle del pedido (spec 016) */
.pd-form-pago { margin-top: 8px; }
.pd-form-pago h6 { font-size: 13px; }
.pd-form-pago .form-select, .pd-form-pago .form-control { flex: 1 1 110px; width: auto; min-width: 0; }

/* Cuentas de cobro (spec 020). */
.gp-dato { max-width: 15rem; }
body.dark-mode .MoraPanel { --mora-muted: #9CA3AF; --mora-line: #374151; --mora-soft: #273244; }
body.dark-mode .mora-opcion { background-color: var(--cp-card); color: var(--cp-txt); }

/* Pagos del pedido (spec 021): resumen de tres, también en el celular, y filas de registrar. */
.pt-kpis.gp-tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pt-kpis.gp-tres .pt-kpi { min-width: 0; padding: 8px 10px; }
.VenSeg.gp-fino { height: 6px; }
.gp-pagado { --c: var(--bs-success); }
.gp-mini { width: 38px; height: 38px; flex: none; object-fit: cover; }
.gp-subir { width: 38px; height: 38px; flex: none; padding: 0; }
@media (max-width: 575.98px) { .gp-tres .pt-kpi b { font-size: 13px; white-space: nowrap; } }

/* Revisar un pago: captura a la vista. */
.gp-comp { max-height: min(56vh, 460px); width: 100%; object-fit: contain; }
body.dark-mode mark { background: #f0c14b; color: #000; }
@media (max-width: 767.98px) { .gp-comp { max-height: 220px; } }

/* Mapa de zonas (costo de envío, el de Entrega del gPay anterior). */
.gp-mapa { height: 440px; isolation: isolate; }
.gp-mapa.colocando { cursor: crosshair; }
.gp-mapa-marco { position: relative; }
.gp-mapa-sucursal { height: 280px; isolation: isolate; cursor: crosshair; }
.zn-ayuda { position: absolute; left: 50%; bottom: 22px; z-index: 2; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; width: max-content; max-width: calc(100% - 24px); padding: 6px 12px; font-size: 12px; color: var(--bs-body-color); background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 8px; box-shadow: 0 1px 6px rgba(0, 0, 0, .25); pointer-events: none; }
.zn-ayuda button { pointer-events: auto; }
.zn-tactil { display: none; }
@media (pointer: coarse) { .zn-tactil { display: inline-block; } }
.zn-globo .leaflet-popup-content-wrapper { color: var(--bs-body-color); background: var(--bs-body-bg); border-radius: 8px; }
.zn-globo .leaflet-popup-content { margin: 12px; font-size: 13px; line-height: 1.3; }
.zn-globo .leaflet-popup-tip-container { display: none; }
#ZnResultados { max-height: 15rem; overflow-y: auto; }
.gp-punto { width: 12px; height: 12px; display: inline-block; flex: none; border-radius: 50%; background: var(--c); }
.zona-vert { background: #fff; border: 2px solid #15253c; border-radius: 50%; box-shadow: 0 0 4px rgba(0, 0, 0, .35); cursor: grab; }
.zona-vert-medio { opacity: .55; border-style: dashed; }
.zona-activa { cursor: move; }
@media (max-width: 1199.98px) { .gp-mapa { height: 300px; } }

/* Configuración › WhatsApp (spec 023). */
.wa-pagina { max-width: 960px; margin: 0 auto; }
.wa-pagina .mora-stepper { margin-bottom: 20px; }
.wa-estado { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 16px; background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 12px; }
.wa-estado-ico { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; background: var(--cp-soft); color: var(--cp-mut); }
.wa-estado.is-activo .wa-estado-ico { background: #198754; color: #fff; }
.wa-estado-txt { flex: 1 1 auto; min-width: 0; }
.wa-estado-acciones { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.wa-seccion { padding: 16px 20px; margin-bottom: 16px; background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 12px; }
.wa-pin { max-width: 280px; }
.wa-opcion { width: 100%; }
#WaOpciones { max-height: 40dvh; overflow-y: auto; }
#accordionWhatsApp .card:last-child .card-header[aria-expanded="false"] { border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius); }
.wa-pasos { list-style: none; padding: 0; margin: 0; }
.wa-paso { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.wa-paso + .wa-paso { border-top: 1px solid var(--cp-line); }
.wa-paso-ico { flex: none; width: 22px; font-size: 20px; text-align: center; }
.wa-paso-txt { flex: 1 1 auto; min-width: 0; }
.wa-paso-estado { flex: none; min-width: 72px; text-align: right; font-size: 13px; color: var(--cp-mut); }
@media (max-width: 767.98px) {
	.wa-estado { flex-wrap: wrap; }
	.wa-estado-txt { flex-basis: calc(100% - 68px); }
	.wa-estado-acciones { width: 100%; justify-content: stretch; }
	.wa-estado-acciones > * { flex: 1 1 auto; }
}

/* El marco de la página (#Inf_Wrap) no hace scroll (AGENTS 5.10): lo fijo queda fijo y solo baja gp-marco-cuerpo. */
.gp-marco { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.gp-marco > * { flex: none; }
.gp-marco > .gp-marco-cuerpo { flex: 0 1 auto; min-height: 0; overflow-y: auto; }

/* Costo de envío: el mapa llena lo que queda del marco. */
.envio-pagina { flex: 1 1 auto; }
.envio-pagina > #ColEnvio { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow-y: auto; }
.envio-pagina > #ColEnvio > .card-body { display: flex; flex: 1 1 auto; flex-direction: column; flex-wrap: nowrap; min-height: 0; }
.envio-pagina > #ColEnvio > .card-body > * { flex: none; }
.envio-pagina #EnvZonas:not([hidden]) { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 240px; }
.envio-pagina .envio-cuerpo { flex: 1 1 auto; min-height: 0; }
@media (min-width: 1200px) {
	.envio-pagina .envio-cuerpo > * { height: 100%; }
	.envio-pagina .gp-mapa-marco, .envio-pagina .gp-mapa { height: 100%; }
	.envio-pagina .envio-panel { overflow-y: auto; }
}

/* Estadísticas (spec 025): un tono por gráfico, validado en claro y en oscuro. */
body { --est-serie: #1f6fd1; }
body.dark-mode { --est-serie: #4d8fe6; }
.est { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.est-pagina { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; }
.est-pagnum { pointer-events: none; min-width: 3.2em; }
.est-kpis { display: grid; flex: none; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; }
.est-kpis[data-n="2"] { --n: 2; }
.est-kpi { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 8px; }
.est-kpi-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.est-kpi small { color: var(--cp-mut); font-size: 12px; }
.est-kpi b { color: var(--cp-txt); font-size: 20px; line-height: 1.2; white-space: nowrap; }
.est-var { color: var(--cp-mut); font-size: 12px; }
.est-var.est-bien { color: #15803d; }
.est-var.est-mal { color: #b42318; }
body.dark-mode .est-var.est-bien { color: #4ade80; }
body.dark-mode .est-var.est-mal { color: #fca5a5; }
.est-spark { flex: 0 1 72px; min-width: 0; height: 24px; }
.est-spark polyline { fill: none; stroke: var(--est-serie); stroke-width: 2; vector-effect: non-scaling-stroke; }
.est-cuerpo { display: grid; flex: 1 1 auto; gap: 10px; min-height: 0; }
.est-cuerpo.est-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.est-cuerpo.est-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.est-cuerpo.est-1 { grid-template-columns: minmax(0, 1fr); }
.est-caja { display: flex; flex-direction: column; container-type: inline-size; min-height: 0; padding: 10px 12px; overflow: hidden; background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 8px; }
.est-contenido { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.est-graf { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.est-graf > svg { position: absolute; inset: 0; }
.est-cab { display: flex; flex: none; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.est-caja h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--cp-txt); }
.est-cab a { font-size: 12px; }
.est-guia { stroke: var(--cp-line); stroke-width: 1; }
.est-eje { fill: var(--cp-mut); font-size: 12px; }
.est-linea { fill: none; stroke: var(--est-serie); stroke-width: 2; stroke-linejoin: round; }
.est-area { fill: var(--est-serie); opacity: .12; }
.est-cruz { stroke: var(--cp-mut); stroke-dasharray: 3 3; }
.est-punto { fill: var(--est-serie); stroke: var(--cp-card); stroke-width: 2; }
.est-tip { position: fixed; left: var(--x, 0); top: var(--y, 0); z-index: 2000; padding: 6px 9px; font-size: 12px; color: var(--cp-txt); background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); pointer-events: none; }
.est-barras { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
.est-fila { display: grid; grid-template-columns: minmax(0, 34%) 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.est-nom { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--cp-txt); }
.est-carril { height: 8px; background: var(--cp-soft); border-radius: 4px; }
.est-carril i { display: block; height: 100%; min-width: 2px; background: var(--est-serie); border-radius: 4px; }
.est-val { color: var(--cp-mut); white-space: nowrap; }
.est-val b { color: var(--cp-txt); }
/* En una tarjeta angosta la barra baja a su propia línea: si no, el valor se la come. */
@container (max-width: 400px) {
	.est-fila { grid-template-columns: minmax(0, 1fr) auto; row-gap: 3px; }
	.est-carril { grid-column: 1 / -1; grid-row: 2; }
}
.est-calor { display: grid; flex: 1 1 auto; grid-template-columns: 30px repeat(24, minmax(0, 1fr)); grid-template-rows: auto repeat(7, minmax(0, 1fr)); gap: 2px; min-height: 0; font-size: 11px; color: var(--cp-mut); }
.est-c { min-height: 0; border-radius: 2px; background: var(--cp-soft); }
.est-c:not([data-n="0"]) { background: color-mix(in srgb, var(--est-serie) calc(var(--tono) * 100%), var(--cp-soft)); }
.est-h { text-align: center; }
/* Sin alto suficiente (celular o ventana baja) el cuerpo baja por dentro: el marco nunca hace scroll (AGENTS 5.10). */
@media (max-width: 991.98px), (max-height: 559.98px) {
	.est-pagina { overflow-y: auto; }
	.est-kpis, .est-kpis[data-n="2"] { --n: 2; }
	.est-cuerpo, .est-cuerpo.est-21, .est-cuerpo.est-2 { flex: none; grid-template-columns: minmax(0, 1fr); }
	.est-graf { flex: none; height: 220px; }
	.est-calor { flex: none; height: 200px; }
}
@media print { .gp-botonera, #EstTip { display: none !important; } .est-caja, .est-kpi { break-inside: avoid; } }
#TblReporte_wrapper { overflow-x: auto; }

/* Avisos (spec 029): el panel de la campana. Los importantes sin leer se marcan con el color de peligro. */
.gp-not-panel { width: min(380px, calc(100vw - 32px)); }
.gp-not-lista { max-height: min(70vh, 520px); overflow-y: auto; }
.gp-not-imp { border-left: 4px solid var(--bs-danger); }
#btn_Notif .badge { font-size: .65rem; }

/* Clientes (spec 027): listado, ficha y «Enviar pedido», del prototipo de Open Design. Solo variables que ya existen. */

/* Tabla con cuerpo propio: el marco no baja, baja la tabla y su encabezado queda fijo (AGENTS 5.10). */
.cl-tabla { overflow: auto; scrollbar-width: thin; }
.cl-tabla table { margin: 0 !important; }
.cl-tabla thead th { position: sticky; top: 0; z-index: 2; }
.cl-tabla tbody tr, #ClHistorial tbody tr { cursor: pointer; }
.cl-tabla .dropdown-toggle::after { display: none; }

/* Ficha: encabezado en la botonera (nombre a la izquierda, acciones a la derecha). */
.cl-cab .gp-izq { gap: 12px; }
.cl-cab .gp-izq > div { min-width: 0; }
.cl-nombre { margin: 0; font-size: 1.15rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-sub { display: block; font-size: 13px; color: var(--cp-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-kpi .gp-txt { white-space: normal; font-size: 12px; }
.cp-sec:has(> .cl-caja) { display: flex; flex-direction: column; }
.cl-caja { flex: 1 1 auto; container-type: inline-size; padding: 12px 14px; color: var(--cp-txt); background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 10px; }
.cl-caja .est-fila { padding: 7px 0; }
.cl-caja .est-fila + .est-fila, .cl-opinion + .cl-opinion, .env-linea + .env-linea { border-top: 1px dashed var(--cp-line); }
.cl-total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 8px; border-top: 1px solid var(--cp-line); }
.cl-total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.cl-opinion { padding: 8px 0; font-size: 13px; }
.cl-cab .ch-avatar { flex: none; }
.cl-tabla tr:not(.dt-empty) td:first-child { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }

/* Enviar pedido: una línea por producto (se parte en dos en el celular) y la vista previa de WhatsApp. */
.env-linea { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; }
.env-linea .env-prod { flex: 1 1 170px; min-width: 0; }
.env-linea .env-var { flex: 1 1 120px; min-width: 0; }
.env-linea .env-cant { flex: 0 0 68px; }
.env-linea .env-imp { flex: 1 0 70px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.env-linea .kc-cats-menu { min-width: 220px; }
.env-previa { min-height: 260px; border: 1px solid var(--cp-line); border-radius: 10px; }
.env-previa .ch-m { max-width: 94%; }
.env-previa + .ch-aviso { margin-top: 8px; border: 1px solid var(--cp-line); border-radius: 10px; }
@media (max-width: 575.98px) {
	.cl-tabla table { font-size: 14px; } .cl-tabla th, .cl-tabla td { padding-left: .4rem; padding-right: .4rem; } .cl-tabla tr:not(.dt-empty) td:first-child { max-width: 38vw; }
	.cl-tabla thead th.dt-orderable-asc { padding-right: 22px; } .cl-tabla thead th span.dt-column-order { right: 6px; }
	.cl-sub, .cl-nombre { white-space: normal; } .cl-caja .est-fila { grid-template-columns: minmax(0, 1fr); } .cl-caja .est-val { white-space: normal; } .cl-cab .ch-avatar { display: none; } .env-linea .env-prod { flex-basis: 100%; } }

/* Perfil de WhatsApp Business (spec 032). */
.wa-foto { width: 120px; height: 120px; object-fit: cover; }

/* Mi perfil (spec 030). */
.mp-tarjeta { max-width: 760px; }

/* Soporte por gNex (copiado de gInm, CP/GnexSoporte.cshtml). */
#gNexSoporte .gnx-fila { cursor: pointer; }
	#gNexSoporte .gnx-num { text-align: right; white-space: nowrap; }
	#gNexSopHilo .gnx-msj { max-width: 85%; white-space: pre-wrap; word-wrap: break-word; }
	#gNexSopHilo .gnx-msj.igemas { background: var(--bs-secondary-bg); }
	#gNexSopHilo .gnx-msj.mio { background: var(--bs-primary-bg-subtle); margin-left: auto; }
	#gNexSopHilo .gnx-conv { max-height: 50vh; overflow-y: auto; }
