/* fuera del modo portátil no existen */
#ag-exp{display:none}
/* OLIMPO · MODO PORTÁTIL (01/11): ancho <= 1440 o alto <= 760. Cabecera de iconos, columna izquierda compacta con lo que hace cada agente,
   Historia y Órdenes en un cajón plegado a la derecha y el centro al máximo. Va el último de la cascada. */

/* ---- cabecera en una sola fila, solo iconos con tooltip (texto solo desde 1600) ---- */
@media(min-width:901px) and (max-width:1599px){
  html .barra{flex-wrap:nowrap;gap:8px;padding:6px 12px;min-width:0}
  html .barra .marca{flex:none}
  html .barra .marca b small{display:none}
  html .barra .acciones{flex-wrap:nowrap;gap:5px;min-width:0;margin-left:auto}
  html .barra .acciones>*{flex:none}
  html .barra .ibtn>span:not(.cx-p):not(.n):not(.semaforo):not(.tk-n):not(.cu-av),html .barra .interr>span,html .barra #chip-demo{display:none}
  html .barra .cu-btn{padding:0 6px}
  html .barra .ibtn{min-height:40px;min-width:40px;padding:0 10px;justify-content:center}
  html .barra .ibtn svg{width:20px;height:20px}
  html .barra .interr{min-width:44px}
}

/* ---- modo portátil ---- */
@media(min-width:901px) and (max-width:1440px),(min-width:901px) and (max-height:760px){
  html .consola{grid-template-columns:232px minmax(0,1fr);grid-template-areas:"ag esc" "ag caja";gap:8px;padding:8px}

  /* columna izquierda: menú en tira de iconos + lista de agentes con lo que hace cada uno */
  html .agentes{max-height:calc(100dvh - 76px);overflow:auto;padding:8px;display:flex;flex-direction:column;gap:6px}
  html .agentes>h2{margin:0;font-size:.7rem;padding-right:0}
  html .agentes.bq-bloque>h2{padding-right:0}
  html .agentes .bq-ctl{display:none}
  html .agentes .ag-acc{display:grid!important;grid-template-columns:repeat(5,1fr);gap:4px}
  html .agentes .ag-acc button{min-height:38px!important;padding:0;display:grid;place-items:center;border-radius:10px;font-size:0;line-height:0}
  html .agentes .ag-acc button svg{width:19px;height:19px;margin:0}
  html .agentes .ag-acc #ag-exp{display:flex;grid-column:1/-1;min-height:28px!important;font-size:.68rem;line-height:1;gap:6px;display:flex;align-items:center;justify-content:center;border:1px dashed var(--borde);background:none;color:var(--suave);border-radius:8px}
  html.menu-x .agentes .ag-acc{grid-template-columns:1fr 1fr}
  html.menu-x .agentes .ag-acc button{font-size:.7rem;line-height:1.15;display:flex;flex-direction:column;gap:2px;justify-content:center;text-align:center;padding:5px 3px;min-height:48px!important}
  html .agentes #lista-ag{display:block;min-height:0}
  html .agentes .grupo,html .agentes .lista,html .agentes #lista{display:block}
  html .agentes .lista{display:grid;gap:3px}
  html .agentes .grupo{font-size:.58rem;letter-spacing:.12em;margin:6px 2px 2px;text-transform:uppercase}
  html .agentes .lista button{padding:3px 8px 3px 4px;gap:8px;border-radius:12px;min-height:40px;position:relative}
  html .agentes .lista .av{width:32px!important;height:32px!important;min-width:32px;flex:none}html .agentes .lista .av img{width:100%;height:100%}
  html .agentes .lista .ag-t{min-width:0;flex:1}
  html .agentes .lista .ag-t b{font-size:.76rem;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html .agentes .lista .ag-t small{font-size:.66rem;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--suave)}
  html .agentes .lista button[data-est="trabaja"] .ag-t small{color:var(--verde,#0fa968);font-weight:700}
  html .agentes .lista button::after{content:"";width:8px;height:8px;border-radius:50%;flex:none;background:var(--suave);opacity:.45}
  html .agentes .lista button[data-est="trabaja"]::after{background:var(--verde,#0fa968);opacity:1}
  html .agentes .lista button[data-est="espera"]::after{background:var(--ambar,#f4c542);opacity:1}
  html .agentes .lista button[data-est="error"]::after{background:var(--rojo,#e5484d);opacity:1}
  html .agentes .fav-a{display:none}


  /* CENTRO al máximo */
  html .escena{padding:0;min-height:0}
  html .vistas{padding:6px 8px;gap:8px}
  html .vistas .seg button{min-height:36px;padding:4px 12px}
  html .hoy{padding:6px 10px 8px!important;min-height:0!important}
  html .hoy-cab{display:flex;align-items:baseline;gap:10px;margin:0 0 6px}
  html .hoy-cab small{font-size:.66rem;white-space:nowrap}
  html .hoy-cab h2{font-size:1rem;margin:0;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html .hoy-conf{padding:6px 12px;margin:0 0 6px}
  html .hoy-conf span{display:none}
  html .hoy-grid,html .hy-grid{gap:8px}
  html .hoy-bl{padding:8px 10px}
  html .hoy-bl .bq-ctl{top:2px;right:2px}
  html .hoy-bl .bq-b,html .bq-b{width:30px;height:30px;border-radius:9px}
  html .hoy-bl .bq-b svg,html .bq-b svg{width:14px;height:14px}
  html .hoy-bl>h3,html .hoy-bl>h4{padding-right:70px}
  html .hoy-h3{cursor:pointer;margin:8px 0 4px;align-items:center}
  html .hoy-h3::after{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-left:8px;transition:transform .2s;display:inline-block}
  html .hoy.q-open .hoy-h3::after{transform:rotate(-135deg)}
  html .hoy-qs{display:none}
  html .hoy.q-open .hoy-qs{display:grid}
  html .hoy-plazos{margin-top:6px}
  html .tk-top h2,html .tareas>h2,html .tk-cab h2{font-size:.95rem;margin:0}
  html .caja{padding:6px 10px}
  html .lienzo.compacta .titular,html .lienzo .titular{display:none}
}
@media(min-width:901px) and (max-width:1440px),(min-width:901px) and (max-height:760px){
  html .hy-lista{grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:6px}
  html .hy-ag{padding:6px 10px;gap:8px}
  html .hy-av .av,html .hy-av img{width:34px!important;height:34px!important}
  html .hy-t b{font-size:.84rem}
  html .hy-t p,html .hy-t small{margin:1px 0;font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
  html .hy-t .hy-int{display:none}
}


/* ===== 01/11 #622 · módulo ÓRDENES (centro) y bloque «Actividad del equipo» al pie de Hoy ===== */
.ordmod,.hoy-act{display:none}
.escena:has(.vistas [data-v=ords][aria-pressed=true]) .ordmod{display:flex}
.escena:has(.vistas [data-v=ords][aria-pressed=true]) #tareas{display:none!important}
#hoy:not([hidden])~.hoy-act{display:block}
.ordmod{flex:1;min-height:0;flex-direction:column;gap:12px;padding:16px 18px 14px;overflow:auto;background:var(--escena)}
.om-top{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.om-top small{font-size:.66rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--naranja)}
.om-top h2{margin:2px 0 0;font-size:clamp(1.15rem,2.4vw,1.6rem);text-transform:none;letter-spacing:-.01em;color:var(--texto);display:flex;align-items:center;gap:10px}
.om-top h2 b{font-size:.8rem;background:var(--tarj2);border:1px solid var(--borde);border-radius:99px;padding:2px 10px;color:var(--suave)}
.om-top h2 b:empty{display:none}
.om-q{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 260px;max-width:420px;height:44px;padding:0 12px;border-radius:12px;border:1px solid var(--borde);background:var(--tarj)}
.om-q svg{width:18px;height:18px;flex:none;fill:none;stroke:var(--suave);stroke-width:2;stroke-linecap:round}
.om-q input{flex:1;min-width:0;border:0;background:none;color:var(--texto);font:inherit;outline:0}
.om-q:focus-within{border-color:var(--naranja)}
.om-fil{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.om-chips{display:flex;gap:6px;flex-wrap:wrap;flex:1 1 auto;min-width:0}
.om-chips button{min-height:36px;padding:0 14px;border-radius:99px;border:1px solid var(--borde);background:var(--tarj);color:var(--suave);font:700 .78rem/1 inherit;font-family:inherit;cursor:pointer}
.om-chips button[aria-pressed="true"]{background:var(--mor);border-color:var(--mor);color:#fff}
.om-chips button:hover:not([aria-pressed="true"]){border-color:var(--naranja);color:var(--texto)}
#om-ag{min-height:36px;max-width:100%;border-radius:10px;border:1px solid var(--borde);background:var(--tarj);color:var(--texto);padding:0 10px;font:inherit;font-size:.82rem}
.ordmod .ordenes{grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr));align-content:start;align-items:start;gap:10px}
.ordmod .ordenes li[hidden]{display:none!important}
.ordmod .orden-item .oi-t b{font-size:.86rem}
.om-vacio{margin:6px 0;padding:18px;text-align:center;color:var(--suave);border:1px dashed var(--borde);border-radius:14px}
.hoy-act{flex:none;border-top:1px solid var(--borde);background:var(--tarj);padding:0 14px}
.hoy-act>summary{cursor:pointer;min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--suave);font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;list-style:none}
.hoy-act>summary::-webkit-details-marker{display:none}
.hoy-act>summary::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-left:auto;margin-right:4px;flex:none}
.hoy-act[open]>summary::after{transform:rotate(-135deg)}
.hoy-act>summary .chip{text-transform:none;letter-spacing:0;white-space:nowrap}
.hoy-act-c{max-height:min(38dvh,320px);overflow:auto;padding:0 0 12px}
.hoy-act-c .sg:empty{display:none}
.hoy-act-c #pasos{margin-top:10px}
.ordmod #ordenes{overflow:visible!important;flex:none}
@media(min-width:901px){
  .ordmod{flex-direction:row;flex-wrap:wrap;align-items:center;align-content:flex-start;gap:10px 12px}
  .om-top,.om-fil{display:contents}
  .om-top small{display:none}
  .om-top h2{margin:0}
  .om-chips{order:2}.om-q{order:3;flex:1 1 220px;max-width:340px}#om-ag{order:4}
  .ordmod #ordenes{order:5;flex:1 1 100%}.om-vacio{order:6;flex:1 1 100%}
}
@media(min-width:901px){html body .ordmod .orden-item .oi-t{flex:1 1 0;min-width:120px}html body .ordmod .orden-item .ctl{flex:none;margin-left:auto}}
@media(max-width:900px){html body .ordmod .orden-item .oi-t{flex:1 1 calc(100% - 110px);min-width:0}html body .ordmod .orden-item .ctl{flex:1 1 100%;justify-content:flex-end}.ordmod{padding:12px 10px 90px}}
/* #622: el seguimiento «Enviada → Recibida → Trabajando → Hecha» ya no vive en la columna Historia: en pantallas bajas se enseña en la caja mientras la orden va en curso */
@media(min-width:901px){html body .caja .estados:has(li.on){display:flex}html body .caja .estados:has(li.on) li{padding:3px 4px;font-size:.66rem}}
