/* ================================================================ Enterprise Comercial (/comercial, comercial.js)
 * Móvil primero (botones grandes, tarjetas, barra de secciones abajo); en la tableta y el ordenador, las secciones a la
 * izquierda y el contenido en dos columnas. Día y noche con sus propios colores (data-tema en #cm).
 * Todas las reglas .cm-* van acotadas a la app con «:where(.cm)» (no suma especificidad): EnterpriseBI (cuadros.js, mando.js…)
 * usa clases cm-* con el mismo nombre y, sin acotar, esta hoja (cargada después de app.css) le descolocaba «¿Y si…?».
 */
.modo-comercial #vista-app { display: none !important; }
.modo-comercial .cm-palabra { font-family: 'Unbounded', 'Source Sans 3', sans-serif; font-weight: 700; font-size: clamp(15px, 4.6vw, 24px); min-width: 0; letter-spacing: -.01em; color: var(--texto, #0B1B2B); white-space: nowrap; }
.modo-comercial .cm-palabra b, :where(.cm) .cm-marca-txt b i { background: linear-gradient(120deg, #0B8BC2, #22C3A6); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }
@media (prefers-color-scheme: dark) { .modo-comercial:not([data-theme="light"]) .cm-palabra { color: #F2F6FA; } }
.modo-comercial .aviso-flotante { z-index: 2147483000; bottom: calc(86px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
.modo-comercial .filtro-pop, .modo-comercial .te-cols-pop { z-index: 2147483001; max-width: calc(100vw - 16px); }

.cm {
  --cm-fondo: #EEF3F8; --cm-sup: #FFFFFF; --cm-sup2: #F5F8FB; --cm-texto: #0B1B2B; --cm-texto2: #56677A; --cm-borde: #DFE6EE;
  --cm-acento: #0B8BC2; --cm-acento2: #16B39A; --cm-ok: #1E9E6A; --cm-ko: #D64545; --cm-aviso: #E39A12; --cm-info: #5B6EE1;
  --cm-sombra: 0 1px 2px rgba(11, 27, 43, .06), 0 6px 22px rgba(11, 27, 43, .07); --cm-radio: 18px;
  --cm-hero: linear-gradient(135deg, #0B8BC2 0%, #1488C8 40%, #16B39A 100%);
  position: fixed; inset: 0; z-index: 900; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  background: var(--cm-fondo); color: var(--cm-texto); font-family: var(--fuente); overflow: hidden; isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.cm[data-tema="noche"] {
  --cm-fondo: #0A121C; --cm-sup: #121E2B; --cm-sup2: #172636; --cm-texto: #EDF3F9; --cm-texto2: #97A8BA; --cm-borde: #22344A;
  --cm-acento: #3BB3EA; --cm-acento2: #2FD4B4; --cm-ok: #39C98B; --cm-ko: #FF6B6B; --cm-aviso: #FFB547; --cm-info: #8E9BFF;
  --cm-sombra: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --cm-hero: linear-gradient(135deg, #0B5F88 0%, #0E6E8E 45%, #0F8B78 100%);
  /* las tablas de siempre (tabla.js) con los colores de la noche */
  --fondo: #0A121C; --superficie: #121E2B; --superficie-2: #172636; --borde: #22344A; --borde-fuerte: #2E4560; --texto: #EDF3F9; --texto-2: #B5C3D2; --tenue: #8798AB;
  color-scheme: dark;
}
:where(.cm) :where(button, input, textarea, select) { font: inherit; color: inherit; }
.cm svg { flex: none; }
.cm a { color: inherit; text-decoration: none; }
:where(.cm) .cm-hueco { flex: 1; }
:where(.cm) .cm-nota { color: var(--cm-texto2); font-size: 13px; margin: 4px 0; }
:where(.cm) .cm-centro { text-align: center; }
:where(.cm) .cm-rojo { color: var(--cm-ko) !important; }

/* ---------------------------------------------------------------- cabecera */
:where(.cm) .cm-cab { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--cm-sup); border-bottom: 1px solid var(--cm-borde); z-index: 2; }
:where(.cm) .cm-marca { display: flex; align-items: center; gap: 8px; min-width: 0; }
:where(.cm) .cm-logo { width: 34px; height: 34px; }
:where(.cm) .cm-marca-txt { display: grid; line-height: 1.05; min-width: 0; }
:where(.cm) .cm-marca-txt b { font-family: 'Unbounded', var(--fuente); font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
:where(.cm) .cm-marca-txt small { font-size: 10px; color: var(--cm-texto2); letter-spacing: .06em; text-transform: uppercase; }
:where(.cm) .cm-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--cm-texto2); }
:where(.cm) .cm-ico:hover { background: var(--cm-sup2); color: var(--cm-texto); }
:where(.cm) .cm-ico:disabled { opacity: .35; }
:where(.cm) .cm-ico svg { width: 20px; height: 20px; }
:where(.cm) .cm-ico.peligro { color: var(--cm-ko); }
:where(.cm) .cm-agente { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--cm-borde); background: var(--cm-sup2); cursor: pointer; max-width: 46vw; }
:where(.cm) .cm-agente:disabled { cursor: default; }
:where(.cm) .cm-agente-txt { display: grid; text-align: left; font-weight: 700; font-size: 13px; line-height: 1.1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cm) .cm-agente-txt small { font-weight: 500; font-size: 10px; color: var(--cm-aviso); }
:where(.cm) .cm-av { --h: 200; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; font-weight: 800; font-size: 12px; letter-spacing: .02em;
  color: hsl(var(--h) 70% 28%); background: hsl(var(--h) 75% 88%); }
.cm[data-tema="noche"] .cm-av { color: hsl(var(--h) 80% 86%); background: hsl(var(--h) 45% 26%); }
:where(.cm) .cm-av.grande { width: 44px; height: 44px; font-size: 15px; }
:where(.cm) .cm-av.enorme { width: 64px; height: 64px; font-size: 22px; border-radius: 20px; }
@media (max-width: 380px) { :where(.cm) .cm-marca-txt b { font-size: 12px; } :where(.cm) .cm-logo { width: 28px; height: 28px; } :where(.cm) [data-cm-refrescar].cm-ico { display: none; } }

/* ---------------------------------------------------------------- secciones (abajo en el móvil, a la izquierda en la tableta) */
:where(.cm) .cm-nav { grid-row: 3; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--cm-sup); border-top: 1px solid var(--cm-borde); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); z-index: 2; }
:where(.cm) .cm-nav button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; cursor: pointer; color: var(--cm-texto2); font-size: 11px; font-weight: 600; border-radius: 14px; }
:where(.cm) .cm-nav-ico { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .2s; }
:where(.cm) .cm-nav-ico svg { width: 22px; height: 22px; }
:where(.cm) .cm-nav button[aria-current="true"] { color: var(--cm-acento); }
:where(.cm) .cm-nav button[aria-current="true"] .cm-nav-ico { background: color-mix(in srgb, var(--cm-acento) 16%, transparent); }
:where(.cm) .cm-main { grid-row: 2; overflow-y: auto; overflow-x: hidden; padding: 14px 14px 28px; overscroll-behavior: contain; scroll-behavior: smooth; }
:where(.cm) .cm-main > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
@media (min-width: 900px) {
  .cm { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  :where(.cm) .cm-cab { grid-column: 1 / -1; }
  :where(.cm) .cm-nav { grid-row: 2; grid-column: 1; grid-template-columns: 1fr; grid-auto-rows: max-content; align-content: start; gap: 6px; border-top: 0; border-right: 1px solid var(--cm-borde); padding-top: 14px; }
  :where(.cm) .cm-nav button { font-size: 12px; }
  :where(.cm) .cm-main { grid-column: 2; padding: 22px 28px 40px; }
}

/* ---------------------------------------------------------------- piezas comunes */
:where(.cm) .cm-tarjeta { background: var(--cm-sup); border: 1px solid var(--cm-borde); border-radius: var(--cm-radio); box-shadow: var(--cm-sombra); padding: 14px; margin: 0 auto 14px; }
:where(.cm) .cm-tarjeta h3, :where(.cm) .cm-lista-cab h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
:where(.cm) .cm-tarjeta h3 svg { width: 18px; height: 18px; color: var(--cm-acento); }
:where(.cm) .cm-tar-cab, :where(.cm) .cm-lista-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
:where(.cm) .cm-sub { margin: 18px 4px 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--cm-texto2); }
:where(.cm) .cm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--cm-borde); background: var(--cm-sup);
  cursor: pointer; font-weight: 700; font-size: 14px; white-space: nowrap; }
:where(.cm) .cm-btn svg { width: 18px; height: 18px; }
:where(.cm) .cm-btn.primario { background: var(--cm-acento); border-color: var(--cm-acento); color: #fff; }
:where(.cm) .cm-btn:active, :where(.cm) .cm-acc:active, :where(.cm) .cm-fila:active, :where(.cm) .cm-cli:active, :where(.cm) .cm-parada:active { transform: scale(.98); }
:where(.cm) .cm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
:where(.cm) .cm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--cm-sup2); color: var(--cm-texto2); border: 1px solid var(--cm-borde); white-space: nowrap; }
:where(.cm) .cm-chip svg { width: 13px; height: 13px; }
:where(.cm) .cm-chip.ok { color: var(--cm-ok); border-color: color-mix(in srgb, var(--cm-ok) 35%, transparent); background: color-mix(in srgb, var(--cm-ok) 10%, transparent); }
:where(.cm) .cm-chip.ko { color: var(--cm-ko); border-color: color-mix(in srgb, var(--cm-ko) 35%, transparent); background: color-mix(in srgb, var(--cm-ko) 10%, transparent); }
:where(.cm) .cm-chip.info { color: var(--cm-info); border-color: color-mix(in srgb, var(--cm-info) 35%, transparent); background: color-mix(in srgb, var(--cm-info) 10%, transparent); }
:where(.cm) .cm-chip.frio { color: #3D8BD9; border-color: color-mix(in srgb, #3D8BD9 35%, transparent); background: color-mix(in srgb, #3D8BD9 10%, transparent); }
:where(.cm) .cm-chip.fuego { color: #E2581B; border-color: color-mix(in srgb, #E2581B 35%, transparent); background: color-mix(in srgb, #E2581B 10%, transparent); }
:where(.cm) .cm-chip.tenue { opacity: .85; }
:where(.cm) .cm-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--cm-sup2); border: 1px solid var(--cm-borde); }
:where(.cm) .cm-seg button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--cm-texto2); }
:where(.cm) .cm-seg button[aria-pressed="true"] { background: var(--cm-sup); color: var(--cm-texto); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
:where(.cm) .cm-seg-mini button { padding: 4px 10px; font-size: 12px; }
:where(.cm) .cm-buscar { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 46px; border-radius: 14px; background: var(--cm-sup); border: 1px solid var(--cm-borde); }
:where(.cm) .cm-buscar svg { width: 18px; height: 18px; color: var(--cm-texto2); }
:where(.cm) .cm-buscar input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; min-width: 0; }
:where(.cm) .cm-vacio { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 16px; color: var(--cm-texto2); }
:where(.cm) .cm-vacio.grande { padding-top: 12vh; }
:where(.cm) .cm-vacio-ico svg { width: 36px; height: 36px; opacity: .6; }
:where(.cm) .cm-vacio-logo { width: 84px; height: 84px; }
:where(.cm) .cm-cargando { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 10px; color: var(--cm-texto2); }
:where(.cm) .cm-cargando.pequeno { padding: 14px; justify-content: flex-start; }
:where(.cm) .cm-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--cm-acento) 25%, transparent); border-top-color: var(--cm-acento); animation: cm-giro .8s linear infinite; }
@keyframes cm-giro { to { transform: rotate(360deg); } }
:where(.cm) .cm-esq { display: grid; gap: 12px; }
:where(.cm) .cm-esq-b { height: 92px; border-radius: var(--cm-radio); background: linear-gradient(90deg, var(--cm-sup) 25%, var(--cm-sup2) 50%, var(--cm-sup) 75%); background-size: 200% 100%; animation: cm-brillo 1.2s infinite; }
:where(.cm) .cm-esq-b:first-child { height: 150px; }
@keyframes cm-brillo { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- portada (hero) y anillos */
:where(.cm) .cm-hero { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 24px; background: var(--cm-hero); color: #fff; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(11, 139, 194, .25); position: relative; overflow: hidden; }
:where(.cm) .cm-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); pointer-events: none; }
:where(.cm) .cm-hero-txt { flex: 1; min-width: 0; }
:where(.cm) .cm-hero h1 { margin: 2px 0 4px; font-size: 22px; line-height: 1.15; font-weight: 800; }
:where(.cm) .cm-hero h1.cm-cifra { font-size: clamp(28px, 8vw, 44px); text-transform: none; letter-spacing: -.02em; }
:where(.cm) .cm-saludo { margin: 0; opacity: .9; font-weight: 600; font-size: 14px; }
:where(.cm) .cm-hero-sub { margin: 2px 0; opacity: .92; font-size: 13px; }
:where(.cm) .cm-hero-mini { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
:where(.cm) .cm-hero-mini > span { display: grid; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .16); min-width: 0; }
:where(.cm) .cm-hero-mini small { font-size: 11px; opacity: .9; }
:where(.cm) .cm-hero-mini b { font-size: 16px; }
:where(.cm) .cm-hero-mini em { font-style: normal; font-size: 11px; font-weight: 700; }
:where(.cm) .cm-hero .cm-rojo { color: #FFD2D2 !important; }
:where(.cm) .cm-hero .sube { color: #C9FFE9; } :where(.cm) .cm-hero .baja { color: #FFE0C2; }
:where(.cm) .cm-hero-anillo { flex: none; }
:where(.cm) .cm-hero .cm-anillo-fondo { stroke: rgba(255, 255, 255, .22); }
:where(.cm) .cm-hero .cm-anillo-num, :where(.cm) .cm-hero .cm-anillo-sub { fill: #fff; }
:where(.cm) .cm-anillo { display: block; }
:where(.cm) .cm-anillo-fondo { fill: none; stroke: var(--cm-sup2); stroke-width: 9; }
:where(.cm) .cm-anillo-valor { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .8s cubic-bezier(.2, .8, .2, 1); }
:where(.cm) .cm-anillo-marca { stroke: var(--cm-texto); stroke-width: 2.5; stroke-linecap: round; opacity: .7; }
:where(.cm) .cm-hero .cm-anillo-marca { stroke: #fff; }
:where(.cm) .cm-anillo-num { text-anchor: middle; font-weight: 800; font-size: 17px; fill: var(--cm-texto); }
:where(.cm) .cm-anillo-sub { text-anchor: middle; font-size: 9.5px; fill: var(--cm-texto2); font-weight: 600; }
:where(.cm) .cm-delta { font-style: normal; font-weight: 800; }
:where(.cm) .sube { color: var(--cm-ok); } :where(.cm) .baja { color: var(--cm-ko); }
:where(.cm) .cm-hero .cm-delta { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------------------------------------------------------------- días de la semana */
:where(.cm) .cm-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 10px 0 14px; }
:where(.cm) .cm-dias button { display: grid; justify-items: center; gap: 1px; padding: 8px 2px; border-radius: 14px; border: 1px solid var(--cm-borde); background: var(--cm-sup); cursor: pointer; position: relative; }
:where(.cm) .cm-dias b { font-size: 16px; } :where(.cm) .cm-dias small { font-size: 10px; color: var(--cm-texto2); }
:where(.cm) .cm-dias i { font-style: normal; font-size: 11px; font-weight: 800; color: var(--cm-acento); }
:where(.cm) .cm-dias button.hoy::after { content: ''; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--cm-acento2); }
:where(.cm) .cm-dias button[aria-selected="true"] { background: var(--cm-acento); border-color: var(--cm-acento); color: #fff; }
:where(.cm) .cm-dias button[aria-selected="true"] small, :where(.cm) .cm-dias button[aria-selected="true"] i { color: #fff; }
:where(.cm) .cm-dias.compacto { margin-top: 0; }
:where(.cm) .cm-semana-cab h1 { margin: 0 0 4px; font-size: 22px; }

/* ---------------------------------------------------------------- ruta: paradas */
:where(.cm) .cm-ruta-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
:where(.cm) .cm-ruta-bar h2 { margin: 0; font-size: 19px; }
:where(.cm) .cm-ruta-bar h2 small { font-weight: 500; color: var(--cm-texto2); font-size: 13px; }
:where(.cm) .cm-mapa { position: relative; border-radius: var(--cm-radio); overflow: hidden; border: 1px solid var(--cm-borde); margin-bottom: 14px; background: var(--cm-sup2); }
:where(.cm) .cm-mapa iframe { display: block; width: 100%; height: min(46vh, 420px); border: 0; }
:where(.cm) .cm-mapa-abrir { position: absolute; right: 10px; bottom: 10px; box-shadow: var(--cm-sombra); }
:where(.cm) .cm-paradas { display: grid; gap: 10px; }
@media (min-width: 900px) { :where(.cm) .cm-paradas { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); } }
:where(.cm) .cm-parada { display: flex; gap: 12px; padding: 14px; background: var(--cm-sup); border: 1px solid var(--cm-borde); border-radius: var(--cm-radio); box-shadow: var(--cm-sombra); position: relative; transition: transform .2s, opacity .2s; cursor: pointer; }
:where(.cm) .cm-parada::before { content: ''; position: absolute; left: 31px; top: 54px; bottom: -12px; width: 2px; background: repeating-linear-gradient(var(--cm-borde) 0 4px, transparent 4px 8px); }
:where(.cm) .cm-parada:last-child::before, :where(.cm) .cm-parada.fuera::before { display: none; }
:where(.cm) .cm-parada-n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--cm-acento); color: #fff; font-weight: 800; font-size: 15px; z-index: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cm-acento) 18%, transparent); }
:where(.cm) .cm-parada-n svg { width: 18px; height: 18px; }
:where(.cm) .cm-parada.hecha { opacity: .78; }
:where(.cm) .cm-parada.hecha .cm-parada-n { background: var(--cm-ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cm-ok) 18%, transparent); }
:where(.cm) .cm-parada.fuera .cm-parada-n { background: var(--cm-texto2); }
:where(.cm) .cm-parada-cuerpo { flex: 1; min-width: 0; }
:where(.cm) .cm-parada-tit { display: flex; align-items: baseline; gap: 8px; }
:where(.cm) .cm-parada-tit b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cm) .cm-parada-tit small { color: var(--cm-texto2); font-size: 12px; flex: none; }
:where(.cm) .cm-parada-dir { margin: 2px 0 0; font-size: 13px; color: var(--cm-texto2); }
:where(.cm) .cm-parada-hecha { margin: 6px 0 0; font-size: 13px; color: var(--cm-ok); font-weight: 700; display: flex; gap: 6px; align-items: center; }
:where(.cm) .cm-parada-hecha svg { width: 15px; height: 15px; }
:where(.cm) .cm-acciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; margin-top: 10px; }
:where(.cm) .cm-acc { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--cm-borde); background: var(--cm-sup2); cursor: pointer; font-size: 12px; font-weight: 700; color: var(--cm-texto); }
:where(.cm) .cm-acc svg { width: 20px; height: 20px; color: var(--cm-acento); }
:where(.cm) .cm-acc.fuerte { background: var(--cm-acento); border-color: var(--cm-acento); color: #fff; }
:where(.cm) .cm-acc.fuerte svg { color: #fff; }
:where(.cm) .cm-acciones.grandes { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); margin: 12px 0 14px; }
:where(.cm) .cm-acciones.grandes .cm-acc { padding: 12px 4px; }
:where(.cm) .cm-parada-edit { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }
:where(.cm) .cm-paradas.editando .cm-parada { cursor: default; border-style: dashed; }
:where(.cm) .cm-aviso-tar h3 svg { color: var(--cm-aviso); }

/* ---------------------------------------------------------------- filas, rankings, documentos */
:where(.cm) .cm-fila, :where(.cm) .cm-cli, :where(.cm) .cm-ranking, :where(.cm) .cm-doc, :where(.cm) .cm-vis { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--cm-borde); background: none; text-align: left; cursor: pointer; }
:where(.cm) .cm-lista-cuerpo > :last-child, :where(.cm) .cm-tarjeta > .cm-fila:last-child { border-bottom: 0; }
:where(.cm) div.cm-ranking, :where(.cm) div.cm-doc, :where(.cm) div.cm-vis { cursor: default; }
:where(.cm) .cm-fila-txt, :where(.cm) .cm-cli-txt, :where(.cm) .cm-ranking-txt, :where(.cm) .cm-doc-txt, :where(.cm) .cm-vis-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
:where(.cm) .cm-fila-txt b, :where(.cm) .cm-cli-txt b, :where(.cm) .cm-ranking-txt b, :where(.cm) .cm-doc-txt b, :where(.cm) .cm-vis-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cm) .cm-fila-txt small, :where(.cm) .cm-cli-txt small, :where(.cm) .cm-ranking-txt small, :where(.cm) .cm-doc-txt small, :where(.cm) .cm-vis-txt small { color: var(--cm-texto2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
:where(.cm) .cm-fila-ir svg { width: 18px; height: 18px; color: var(--cm-texto2); }
:where(.cm) .cm-cli-num, :where(.cm) .cm-ranking-num { display: grid; justify-items: end; text-align: right; flex: none; }
:where(.cm) .cm-cli-num b, :where(.cm) .cm-ranking-num b { font-size: 15px; }
:where(.cm) .cm-cli-num small, :where(.cm) .cm-ranking-num small { font-size: 11px; color: var(--cm-texto2); }
:where(.cm) .cm-cli-num .cm-delta { font-size: 12px; }
:where(.cm) .cm-pos { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--cm-acento) 14%, transparent); color: var(--cm-acento); font-weight: 800; }
:where(.cm) .cm-pos.art { background: color-mix(in srgb, var(--cm-acento2) 16%, transparent); color: var(--cm-acento2); }
:where(.cm) .cm-ranking-barra { display: block; height: 6px; border-radius: 99px; background: var(--cm-sup2); overflow: hidden; margin-top: 4px; }
:where(.cm) .cm-ranking-barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cm-acento), var(--cm-acento2)); }
:where(.cm) .cm-doc-ico, :where(.cm) .cm-vis-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: color-mix(in srgb, var(--cm-acento) 12%, transparent); color: var(--cm-acento); }
:where(.cm) .cm-doc-ico svg, :where(.cm) .cm-vis-ico svg { width: 19px; height: 19px; }
:where(.cm) .cm-doc-ico.ko { background: color-mix(in srgb, var(--cm-ko) 12%, transparent); color: var(--cm-ko); }
:where(.cm) .cm-doc-ico.art { background: color-mix(in srgb, var(--cm-acento2) 14%, transparent); color: var(--cm-acento2); }
:where(.cm) .cm-doc-ico.fuego { background: color-mix(in srgb, #E2581B 14%, transparent); color: #E2581B; }
:where(.cm) .cm-doc.toca { background: color-mix(in srgb, #E2581B 5%, transparent); border-radius: 12px; }
:where(.cm) .cm-doc-num { flex: none; font-size: 15px; }
:where(.cm) .cm-vis-nota { font-size: 13px; color: var(--cm-texto); white-space: normal; margin-top: 2px; }
:where(.cm) .cm-vis-ico.res-pedido, :where(.cm) .cm-chip.res-pedido { color: var(--cm-ok); }
:where(.cm) .cm-vis-ico.res-pedido { background: color-mix(in srgb, var(--cm-ok) 14%, transparent); }
:where(.cm) .cm-vis-ico.res-ausente, :where(.cm) .cm-vis-ico.res-incidencia { background: color-mix(in srgb, var(--cm-aviso) 16%, transparent); color: var(--cm-aviso); }
:where(.cm) .cm-vis-ico.res-cobro { background: color-mix(in srgb, var(--cm-info) 14%, transparent); color: var(--cm-info); }
:where(.cm) .cm-res-resumen { margin: 0 0 12px; }
:where(.cm) .cm-lista-ag { display: grid; max-height: 55vh; overflow-y: auto; margin-top: 10px; }

/* listas en tabla (tabla.js): con su propio scroll */
:where(.cm) .cm-tabla .te-scroll { max-height: 62vh; }
:where(.cm) .cm-tabla .te-barra { flex-wrap: wrap; }
:where(.cm) .cm-tabla .buscador input { font-size: 16px; }

/* ---------------------------------------------------------------- mis cifras */
:where(.cm) .cm-periodos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
:where(.cm) .cm-objetivo-txt { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin: -4px auto 14px; font-size: 14px; }
:where(.cm) .cm-objetivo-txt svg { width: 18px; height: 18px; margin-top: 1px; }
:where(.cm) .cm-objetivo-txt.ok { background: color-mix(in srgb, var(--cm-ok) 12%, var(--cm-sup)); color: var(--cm-texto); }
:where(.cm) .cm-objetivo-txt.ok svg { color: var(--cm-ok); }
:where(.cm) .cm-objetivo-txt.aviso { background: color-mix(in srgb, var(--cm-aviso) 14%, var(--cm-sup)); }
:where(.cm) .cm-objetivo-txt.aviso svg { color: var(--cm-aviso); }
:where(.cm) .cm-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 auto 14px; }
@media (min-width: 700px) { :where(.cm) .cm-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
:where(.cm) .cm-kpi { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--cm-sup); border: 1px solid var(--cm-borde); border-radius: var(--cm-radio); box-shadow: var(--cm-sombra); min-width: 0; }
:where(.cm) .cm-kpi > span:last-child { display: grid; min-width: 0; }
:where(.cm) .cm-kpi small { font-size: 12px; color: var(--cm-texto2); font-weight: 600; }
:where(.cm) .cm-kpi b { font-size: 20px; letter-spacing: -.01em; overflow-wrap: anywhere; }
:where(.cm) .cm-kpi em { font-style: normal; font-size: 12px; color: var(--cm-texto2); }
:where(.cm) .cm-kpi em.sube { color: var(--cm-ok); font-weight: 800; } :where(.cm) .cm-kpi em.baja { color: var(--cm-ko); font-weight: 800; }
:where(.cm) .cm-kpi .cm-anillo { width: 64px; height: 64px; flex: none; }
:where(.cm) .cm-kpi-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--cm-acento) 13%, transparent); color: var(--cm-acento); }
:where(.cm) .cm-kpi-ico svg { width: 22px; height: 22px; }
:where(.cm) .cm-kpi.ko .cm-kpi-ico { background: color-mix(in srgb, var(--cm-ko) 13%, transparent); color: var(--cm-ko); }
:where(.cm) .cm-kpi.ko b { color: var(--cm-ko); }
:where(.cm) .cm-kpi.aviso .cm-kpi-ico { background: color-mix(in srgb, var(--cm-aviso) 16%, transparent); color: var(--cm-aviso); }
@media (max-width: 380px) { :where(.cm) .cm-kpis { grid-template-columns: 1fr; } }
:where(.cm) .cm-barras { display: block; width: 100%; height: 130px; }
:where(.cm) .cm-barra { fill: var(--cm-acento); } :where(.cm) .cm-barra.actual { fill: var(--cm-acento2); }
:where(.cm) .cm-barra-ant { fill: var(--cm-borde); }
:where(.cm) .cm-barras-meses { display: grid; grid-template-columns: repeat(12, 1fr); text-align: center; font-size: 11px; color: var(--cm-texto2); margin-top: 2px; }
:where(.cm) .cm-leyenda { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cm-texto2); margin-left: auto; }
:where(.cm) .cm-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--cm-acento); }
:where(.cm) .cm-leyenda i.ant { background: var(--cm-borde); margin-left: 6px; }

/* ---------------------------------------------------------------- clientes */
:where(.cm) .cm-cli-barra { display: grid; gap: 10px; margin-bottom: 12px; position: sticky; top: -14px; z-index: 3; padding: 4px 0 8px; background: var(--cm-fondo); }
:where(.cm) .cm-chips-filtro { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; scroll-snap-type: x proximity; align-items: center; }
:where(.cm) .cm-chips-filtro::-webkit-scrollbar { display: none; }
:where(.cm) .cm-chips-filtro small { color: var(--cm-texto2); font-weight: 700; font-size: 12px; margin-right: 2px; }
:where(.cm) .cm-chips-filtro button { scroll-snap-align: start; flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--cm-borde); background: var(--cm-sup); cursor: pointer; font-weight: 700; font-size: 13px; }
:where(.cm) .cm-chips-filtro button[aria-pressed="true"] { background: var(--cm-texto); color: var(--cm-sup); border-color: var(--cm-texto); }
:where(.cm) .cm-chips-filtro.orden button { padding: 6px 12px; font-size: 12px; }
:where(.cm) .cm-chips-filtro.orden button[aria-pressed="true"] { background: var(--cm-acento); border-color: var(--cm-acento); color: #fff; }
:where(.cm) .cm-cli .cm-chips { margin-top: 4px; }
:where(.cm) .cm-cli .cm-chip { font-size: 11px; padding: 2px 7px; }

/* ---------------------------------------------------------------- hojas (paneles que suben) */
:where(.cm) .cm-hoja-fondo { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 12, 20, 0); transition: background .22s; }
:where(.cm) .cm-hoja-fondo.abierta { background: rgba(5, 12, 20, .45); }
:where(.cm) .cm-hoja { position: relative; width: min(720px, 100%); max-height: 92vh; display: flex; flex-direction: column; background: var(--cm-fondo); color: var(--cm-texto); border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); }
:where(.cm) .cm-hoja-fondo.abierta .cm-hoja { transform: none; }
:where(.cm) .cm-hoja-grande .cm-hoja { height: 94vh; max-height: 94vh; width: min(980px, 100%); }
:where(.cm) .cm-hoja-asa { width: 44px; height: 5px; border-radius: 99px; background: var(--cm-borde); margin: 8px auto 0; flex: none; }
:where(.cm) .cm-hoja-x { position: absolute; top: 8px; right: 8px; z-index: 2; }
:where(.cm) .cm-hoja-cuerpo { overflow-y: auto; padding: 10px 16px 20px; overscroll-behavior: contain; }
:where(.cm) .cm-hoja-cuerpo > h3 { margin: 6px 40px 6px 0; font-size: 19px; display: flex; gap: 8px; align-items: center; }
:where(.cm) .cm-hoja-cuerpo > h3 svg { width: 22px; height: 22px; color: var(--cm-acento); }
:where(.cm) .cm-hoja-pie { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; position: sticky; bottom: -20px; padding: 10px 0; background: var(--cm-fondo); }
:where(.cm) .cm-hoja-pie .cm-btn { flex: 1; max-width: 260px; }
:where(.cm) .cm-lista-anadir { display: grid; margin-top: 10px; }
@media (min-width: 900px) { :where(.cm) .cm-hoja-fondo { align-items: center; } :where(.cm) .cm-hoja { border-radius: 24px; max-height: 88vh; } :where(.cm) .cm-hoja-grande .cm-hoja { height: 90vh; } }
:where(.cm) .cm-ficha-cab { display: flex; gap: 14px; align-items: center; margin: 6px 40px 0 0; }
:where(.cm) .cm-ficha-cab h2 { margin: 0; font-size: 21px; line-height: 1.15; }
:where(.cm) .cm-kpis-ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { :where(.cm) .cm-kpis-ficha { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* visita */
:where(.cm) .cm-resultados { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
:where(.cm) .cm-resultados button { display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border-radius: 14px; border: 2px solid var(--cm-borde); background: var(--cm-sup); cursor: pointer; font-weight: 700; font-size: 13px; }
:where(.cm) .cm-resultados button svg { width: 22px; height: 22px; color: var(--cm-texto2); }
:where(.cm) .cm-resultados button[aria-checked="true"] { border-color: var(--cm-acento); background: color-mix(in srgb, var(--cm-acento) 10%, var(--cm-sup)); }
:where(.cm) .cm-resultados button[aria-checked="true"] svg { color: var(--cm-acento); }
:where(.cm) .cm-campo { display: grid; gap: 6px; font-weight: 700; font-size: 13px; }
:where(.cm) .cm-campo textarea { width: 100%; box-sizing: border-box; border-radius: 14px; border: 1px solid var(--cm-borde); background: var(--cm-sup); padding: 12px; font-size: 16px; resize: vertical; }
:where(.cm) .cm-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; }
:where(.cm) .cm-check input { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- configuración en Enterprise Live */
.dialogo-cm-config { width: min(1280px, calc(96vw / var(--zoom, 1))); }
/* Demostraciones, cobros, devoluciones… y «Aviso al hacer documentos» (aviso-documentos.js): la ventana mide lo que su contenido
   (sin el alto fijo de .dialogo-ficha), así el pie queda justo debajo y no a media ventana con un hueco blanco debajo; con mucho
   contenido para en el alto visible y la lista (tablaEstandar) es la única que se desplaza (mecanismo común de tabla.js). */
.dialogo-ficha.dialogo-cm-config:not(.maximizada), .dialogo-ficha.dialogo-avd-config:not(.maximizada) { height: fit-content; max-height: min(900px, calc(calc(100vh / var(--zoom, 1)) - 48px)); }
/* si la ventana es más alta que su contenido (maximizada o agrandada por la esquina), el cuerpo ocupa el hueco y el pie va abajo */
.dialogo-cm-config > .dialogo-cuerpo > .cmc-cuerpo, .dialogo-avd-config > .dialogo-cuerpo > .avd-config { flex: 1 1 auto; align-content: start; }
.dialogo-cm-config .cmc-cuerpo { padding: 14px 20px; display: grid; gap: 12px; }
.cmc-intro { margin: 0; color: var(--texto-2); max-width: 980px; }
.cmc-ajustes { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.cmc-ajustes .campo { display: grid; gap: 4px; font-size: 13px; }
.cmc-ajustes input { width: 120px; }
.cmc-tabla select { max-width: 260px; }
.cmc-tabla .cmc-obj { width: 120px; text-align: right; }
.cmc-chk { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.cmc-sug { margin-left: 6px; border: 1px dashed var(--borde-fuerte, #ccc); background: none; border-radius: 8px; padding: 2px 6px; font-size: 12px; cursor: pointer; color: var(--texto-2); }
.cmc-nota { margin: 0; color: var(--texto-2); font-size: 13px; }
.cmc-pie { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--borde); }
.cmc-msg { color: var(--texto-2); font-size: 13px; }
.cmc-pie .hueco, .cmc-ajustes .hueco { flex: 1; }
.dialogo-cm-config .fc-marco { height: auto; }
@media (min-width: 900px) { :where(.cm) .cm-parada::before { display: none; } }
/* móvil: el nombre del comercial solo con sus iniciales, para que quepa la marca */
@media (max-width: 520px) { :where(.cm) .cm-agente-txt { display: none; } :where(.cm) .cm-agente { padding: 3px; border: 0; background: none; } :where(.cm) .cm-marca-txt b { font-size: 13.5px; } :where(.cm) .cm-cab { gap: 2px; padding-left: 10px; padding-right: 6px; } :where(.cm) .cm-ico { width: 36px; } }
/* en el móvil, el selector de comercial (solo administradores) se queda en sus iniciales: el nombre de la app no se corta */
@media (max-width: 480px) { :where(.cm) .cm-agente { max-width: 40px; overflow: hidden; padding-right: 0; } :where(.cm) .cm-marca { min-width: 0; flex: none; } }

/* ================================================================ ventas, cobros y sin conexión (comercial-ventas.js) */
:where(.cm) .cm-cab { padding-top: max(8px, env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
:where(.cm) .cm-pend { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 999px; border: 0; background: var(--cm-aviso); color: #fff; font-weight: 800; cursor: pointer; }
:where(.cm) .cm-pend svg { width: 16px; height: 16px; }
:where(.cm) .cm-pend.ko { background: var(--cm-ko); }
:where(.cm) .cm-offline { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: color-mix(in srgb, var(--cm-ko) 14%, transparent); color: var(--cm-ko); white-space: nowrap; }
:where(.cm) .cm-offline svg { width: 14px; height: 14px; }
:where(.cm) .cm-fab { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5; width: 58px; height: 58px; border-radius: 20px; border: 0;
  background: linear-gradient(135deg, var(--cm-acento), var(--cm-acento2)); color: #fff; box-shadow: 0 10px 24px rgba(11, 139, 194, .4); cursor: pointer; display: grid; place-items: center; }
:where(.cm) .cm-fab svg { width: 28px; height: 28px; }
@media (min-width: 900px) { :where(.cm) .cm-fab { bottom: 28px; right: 28px; } }
:where(.cm) .cm-btn.grande { min-height: 52px; font-size: 16px; padding: 0 22px; }
:where(.cm) .cm-btn.peligro { color: var(--cm-ko); }
:where(.cm) .cm-btn:disabled { opacity: .45; }
:where(.cm) .cm-chip.aviso { color: var(--cm-aviso); border-color: color-mix(in srgb, var(--cm-aviso) 40%, transparent); }
:where(.cm) .cm-mas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
:where(.cm) .cm-mas-it { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 16px; border-radius: 18px; border: 1px solid var(--cm-borde); background: var(--cm-sup); cursor: pointer; }
:where(.cm) .cm-mas-it svg { width: 26px; height: 26px; color: var(--cm-acento); margin-bottom: 4px; }
:where(.cm) .cm-mas-it b { font-size: 16px; } :where(.cm) .cm-mas-it small { color: var(--cm-texto2); font-size: 12px; }

/* editor de ofertas y pedidos */
:where(.cm) .cm-editor .cm-hoja { height: 100%; max-height: 100%; border-radius: 0; width: 100%; }
@media (min-width: 900px) { :where(.cm) .cm-editor .cm-hoja { height: 94vh; max-height: 94vh; border-radius: 24px; width: min(860px, 100%); } }
:where(.cm) .cm-editor .cm-hoja-asa { display: none; }
:where(.cm) .cm-editor .cm-hoja-cuerpo { display: flex; flex-direction: column; height: 100%; padding: 0; overflow: hidden; }
:where(.cm) .cm-ed-cab { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid var(--cm-borde); background: var(--cm-sup); }
:where(.cm) .cm-ed-cli { display: flex; gap: 12px; align-items: center; padding: 12px 16px 4px; }
:where(.cm) .cm-ed-cat { margin: 6px 16px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--cm-aviso) 14%, var(--cm-sup)); font-size: 13px; display: flex; gap: 6px; }
:where(.cm) .cm-ed-cat svg { width: 16px; height: 16px; color: var(--cm-aviso); flex: none; }
:where(.cm) .cm-ed-lineas { flex: 1; overflow-y: auto; padding: 8px 12px; display: grid; gap: 8px; align-content: start; overscroll-behavior: contain; }
:where(.cm) .cm-editor .cm-ed-anadir, :where(.cm) .cm-editor .cm-ed-mas { margin: 0 12px 8px; }
:where(.cm) .cm-ed-mas { border: 1px solid var(--cm-borde); border-radius: 14px; padding: 8px 12px; background: var(--cm-sup); display: grid; gap: 8px; }
:where(.cm) .cm-ed-mas summary { font-weight: 700; cursor: pointer; padding: 4px 0; }
:where(.cm) .cm-campo input, :where(.cm) .cm-campo select { width: 100%; box-sizing: border-box; min-height: 44px; border-radius: 12px; border: 1px solid var(--cm-borde); background: var(--cm-sup); padding: 0 12px; font-size: 16px; }
:where(.cm) .cm-ed-pie { display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--cm-borde); background: var(--cm-sup); position: sticky; bottom: 0; }
:where(.cm) .cm-ed-total { flex: 1; display: grid; min-width: 0; }
:where(.cm) .cm-ed-total small { color: var(--cm-texto2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cm) .cm-ed-total b { font-size: 24px; letter-spacing: -.01em; }
:where(.cm) .cm-lin { position: relative; border-radius: 16px; overflow: hidden; background: var(--cm-ko); }
:where(.cm) .cm-lin-borrar { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-right: 18px; color: #fff; font-weight: 800; }
:where(.cm) .cm-lin-borrar svg { width: 18px; height: 18px; }
:where(.cm) .cm-lin-cuerpo { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; padding: 10px 34px 10px 10px; background: var(--cm-sup); border: 1px solid var(--cm-borde); border-radius: 16px; transition: transform .18s; }
:where(.cm) .cm-lin.ko .cm-lin-cuerpo { border-color: var(--cm-ko); }
:where(.cm) .cm-lin-foto { position: relative; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--cm-acento2) 16%, transparent); color: var(--cm-acento2); font-weight: 800; font-size: 13px; }
:where(.cm) .cm-lin-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
:where(.cm) .cm-lin-txt { display: grid; gap: 2px; min-width: 0; }
:where(.cm) .cm-lin-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.cm) .cm-lin-txt small { color: var(--cm-texto2); font-size: 11px; }
:where(.cm) .cm-lin-precio { justify-self: start; border: 0; background: color-mix(in srgb, var(--cm-acento) 10%, transparent); color: var(--cm-acento); border-radius: 8px; padding: 3px 8px; font-weight: 700; font-size: 13px; cursor: pointer; }
:where(.cm) .cm-lin-precio i { font-style: normal; font-weight: 600; color: var(--cm-texto2); }
:where(.cm) .cm-lin-aviso { font-size: 11px; font-weight: 600; } :where(.cm) .cm-lin-aviso.ko { color: var(--cm-ko); } :where(.cm) .cm-lin-aviso.aviso { color: var(--cm-aviso); }
:where(.cm) .cm-lin-der { display: grid; justify-items: end; gap: 4px; }
:where(.cm) .cm-lin-der b { font-size: 15px; }
:where(.cm) .cm-lin-der small { color: var(--cm-texto2); font-size: 11px; }
:where(.cm) .cm-lin-x { position: absolute; top: 2px; right: 0; width: 32px; height: 32px; }
:where(.cm) .cm-lin-x svg { width: 16px; height: 16px; }
:where(.cm) .cm-stepper { display: inline-flex; align-items: center; border: 1px solid var(--cm-borde); border-radius: 12px; overflow: hidden; background: var(--cm-sup2); }
:where(.cm) .cm-stepper button { width: 38px; height: 38px; border: 0; background: none; font-size: 22px; font-weight: 700; cursor: pointer; color: var(--cm-acento); }
:where(.cm) .cm-stepper input { width: 54px; height: 38px; border: 0; background: var(--cm-sup); text-align: center; font-size: 16px; font-weight: 700; }
:where(.cm) .cm-ed-precios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
:where(.cm) .cm-arts { display: grid; margin-top: 10px; }
:where(.cm) .cm-art { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--cm-borde); background: none; text-align: left; cursor: pointer; }
:where(.cm) .cm-art.anadido { background: color-mix(in srgb, var(--cm-ok) 10%, transparent); }
/* habituales y cobros */
:where(.cm) .cm-habs, :where(.cm) .cm-efs { display: grid; gap: 8px; margin: 10px 0; }
:where(.cm) .cm-hab, :where(.cm) .cm-ef { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--cm-borde); background: var(--cm-sup); text-align: left; width: 100%; cursor: pointer; }
:where(.cm) .cm-hab.sel, :where(.cm) .cm-ef[aria-pressed="true"] { border-color: var(--cm-acento); background: color-mix(in srgb, var(--cm-acento) 7%, var(--cm-sup)); }
:where(.cm) .cm-hab.toca .cm-fila-txt b { color: #E2581B; }
:where(.cm) .cm-hab-chk { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--cm-borde); background: var(--cm-sup); display: grid; place-items: center; color: #fff; padding: 0; }
:where(.cm) .cm-hab.sel .cm-hab-chk, :where(.cm) .cm-ef[aria-pressed="true"] .cm-hab-chk { background: var(--cm-acento); border-color: var(--cm-acento); }
:where(.cm) .cm-hab-chk svg { width: 16px; height: 16px; }
:where(.cm) .cm-hoja-grande:not(.cm-editor) .cm-ed-pie { margin: 10px -16px -20px; }
:where(.cm) .cm-importe { font-size: 28px !important; font-weight: 800; min-height: 58px !important; }
:where(.cm) .cm-formas { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
:where(.cm) .cm-foto-btn { margin-top: 10px; width: 100%; }
:where(.cm) .cm-foto-prev { display: block; max-width: 100%; max-height: 240px; border-radius: 12px; margin-top: 8px; }
/* cola */
:where(.cm) .cm-cola { display: grid; gap: 8px; margin: 10px 0; }
:where(.cm) .cm-cola-it { display: flex; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--cm-borde); background: var(--cm-sup); }
:where(.cm) .cm-cola-it.error, :where(.cm) .cm-cola-it.revisar { border-color: var(--cm-ko); }
:where(.cm) .cm-cola-err { color: var(--cm-ko); font-size: 13px; font-weight: 600; white-space: normal; }
:where(.cm) .cm-cola-bot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
:where(.cm) .cm-cola-bot .cm-btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
:where(.cm) .cm-firma { width: 100%; height: 170px; border: 2px dashed var(--cm-borde); border-radius: 14px; background: #fff; display: block; }
:where(.cm) .cm-dev-firma-bar { display: flex; gap: 8px; margin-top: 8px; }
:where(.cm) .cm-dev-firmante { flex: 1; min-height: 42px; border-radius: 12px; border: 1px solid var(--cm-borde); background: var(--cm-sup); padding: 0 12px; font-size: 16px; }
:where(.cm) .cm-dev-lin { display: grid; gap: 8px; margin: 10px 0; }
:where(.cm) .cm-dev-fotos { display: flex; flex-wrap: wrap; gap: 6px; }
:where(.cm) .cm-dev-fotos .cm-foto-prev { max-height: 90px; }
:where(.cm) .cm-hoja-grande .cm-hoja-cuerpo > .cm-btn { margin: 4px 0; }
:where(.cm) .cm-just { width: 100%; height: 62vh; border: 1px solid var(--cm-borde); border-radius: 14px; background: #fff; }
/* paneles de EnterpriseBI sin contratar: apagados y con candado (cuadros.js) */
.cm-tab-off { position: relative; }
.cm-tab-off::after { content: '🔒'; font-size: 11px; margin-left: 4px; }
/* contactar con el departamento comercial (contacto-comercial.js) */
.dialogo-contacto-comercial { width: min(560px, 96vw); }
.dialogo-contacto-comercial .cc-cuerpo { padding: 14px 20px; display: grid; gap: 10px; }
.dialogo-contacto-comercial .campo { display: grid; gap: 4px; font-size: 13px; }
.dialogo-contacto-comercial input, .dialogo-contacto-comercial textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; }
.cc-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .cc-dos { grid-template-columns: 1fr; } }
.cc-de { margin: 0; font-size: 13px; color: var(--texto-2); }
.cc-texto { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 16px; }
.cc-pie { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--borde); flex-wrap: wrap; }
.cmc-contrato { display: flex; gap: 8px; align-items: center; margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--superficie-2, #f3f5f7); }
.cmc-conectados { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cmc-con { display: inline-flex; gap: 8px; align-items: center; padding: 4px 4px 4px 10px; border: 1px solid var(--borde); border-radius: 999px; font-size: 13px; }
:where(.cm) .cm-conectados { width: min(420px, 100%); text-align: left; }
.btn.sin-contrato { opacity: .6; filter: grayscale(.7); }
.cc-que { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 600; }
.cc-que label { display: inline-flex; gap: 6px; align-items: center; }
.cc-etq { font-size: 13px; }
.tpv-cargando h2 { margin: 6px 0 0; }

/* pendiente de enviar y sin conexión: debajo de la cabecera, sin quitar sitio a la marca */
:where(.cm) .cm-cab { position: relative; }
:where(.cm) .cm-pend, :where(.cm) .cm-offline { position: absolute; top: calc(100% + 8px); z-index: 4; box-shadow: var(--cm-sombra); }
:where(.cm) .cm-pend { right: 12px; }
:where(.cm) .cm-offline { left: 12px; font-size: 11px !important; padding: 5px 10px !important; gap: 4px !important; background: var(--cm-ko); color: #fff; }
:where(.cm) .cm-editor .cm-ed-pie { position: relative; }
#cm [hidden], :where(.cm) .cm-hoja-fondo [hidden] { display: none !important; }
/* avisos de fin de demostración (contacto-comercial.js) */
.avisos-demo { position: fixed; left: 50%; transform: translateX(-50%); top: 64px; z-index: 80; display: grid; gap: 8px; width: min(760px, 94vw); }
.aviso-demo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #FFF4DF; color: #4A3200; border: 1px solid #F1C67A; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.aviso-demo.fin { background: #FDE8E8; border-color: #EFA3A3; color: #5A1010; }
.aviso-demo > span:nth-child(2) { flex: 1; }
.cm-demo-chip { display: inline-flex; padding: 2px 8px; border-radius: 999px; background: #E39A12; color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; }
.cc-que label { white-space: nowrap; font-size: 15px; }
