/* TYM 29.0 · filtros compactos en todas las pestañas (referencia 21st «Glassy dashboard»).
   Cada filtro pasa de «etiqueta arriba + caja de 42 px» a una pastilla de 34 px con la etiqueta adentro
   (CENTRO Todos ▾), en filas que se acomodan solas. Solo estilo: mismos controles, mismas opciones,
   mismos textos; no se oculta ningún filtro ni el resumen «Mostrando N de N». */

/* ---------- cajas de filtros dentro de las pestañas ---------- */
html body[data-t] #pantalla :is(.v123-filterbox,.v122-mr-filters,.tymh6-filter,.nps207-filterbox){padding:10px 12px!important;border-radius:14px!important;margin-bottom:12px!important}
html body[data-t] #pantalla .v123-filter-title{display:flex!important;flex-wrap:wrap;align-items:baseline;gap:4px 12px!important;margin:0 0 8px!important;padding:0!important}
html body[data-t] #pantalla .v123-filter-title b{font-size:13px!important}
html body[data-t] #pantalla .v123-filter-title span{font-size:11.5px!important}

/* la fila de pastillas: se acomodan solas en lugar de la cuadrícula de 8 columnas */
html body[data-t] #pantalla :is(.v123-filterbar,.v124-rango-filter,.v122-mr-filters,.tymh6-filter,.hv-filtros){display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:6px!important;grid-template-columns:none!important;margin-bottom:0!important}
html body[data-t] #pantalla .v122-mr-filters{padding:10px 12px!important}

/* cada filtro = pastilla con la etiqueta adentro */
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f){display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:0!important;flex:0 1 auto!important;min-width:0!important;max-width:100%!important;height:34px;padding:0 0 0 10px!important;margin:0!important;border:1px solid var(--flt-borde,var(--line))!important;border-radius:10px!important;background:var(--card)!important;box-shadow:none!important;transition:border-color .15s}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f):hover{border-color:var(--flt,#4F46E5)!important}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f):focus-within{border-color:var(--flt,#4F46E5)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--flt,#4F46E5) 22%,transparent)!important}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f)>:is(label,span){display:inline!important;margin:0!important;padding:0!important;font-size:11px!important;font-weight:700!important;letter-spacing:.05em!important;text-transform:uppercase!important;color:var(--soft,#64748B)!important;white-space:nowrap!important;line-height:1!important}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f)>:is(label,span)::before{display:none!important}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f) select{height:32px!important;min-height:32px!important;width:auto!important;min-width:0!important;field-sizing:content;max-width:240px!important;margin:0!important;padding:0 28px 0 7px!important;border:0!important;border-radius:9px!important;background-color:transparent!important;background-position:right 8px center!important;box-shadow:none!important;font-size:13px!important;font-weight:700!important;color:var(--ink)!important;text-overflow:ellipsis;cursor:pointer}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f) select:focus{outline:0!important;box-shadow:none!important}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f) select:disabled{opacity:.5;cursor:not-allowed}
/* filtro con valor elegido: borde y etiqueta del color de filtro (ya lo marcaba .active) */
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter).active{border-color:var(--flt,#4F46E5)!important;background:color-mix(in srgb,var(--flt,#4F46E5) 6%,var(--card))!important}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter).active>label{color:var(--flt,#4F46E5)!important}
html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter).active>label::after{display:none!important}

/* buscador: la pastilla más ancha, con el botón Buscar adentro */
html body[data-t] #pantalla :is(.v123-field.v123-search,.v122-mr-filter.v122-search){flex:1 1 340px!important;max-width:440px!important;padding:0 3px 0 10px!important}
html body[data-t] #pantalla :is(.v123-searchwrap,.v122-searchbox){display:flex!important;flex:1 1 auto!important;align-items:center!important;gap:4px!important;min-width:0!important;margin:0 0 0 6px!important}
html body[data-t] #pantalla :is(.v123-searchwrap,.v122-searchbox) input{flex:1 1 auto!important;width:auto!important;min-width:60px!important;height:30px!important;min-height:30px!important;padding:0 6px!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:13px!important}
html body[data-t] #pantalla :is(.v123-searchwrap,.v122-searchbox) input:focus{outline:0!important;box-shadow:none!important}
html body[data-t] #pantalla :is(.v123-searchwrap,.v122-searchbox) .btn{height:26px!important;min-height:26px!important;padding:0 11px!important;margin:0!important;border-radius:7px!important;font-size:12px!important;line-height:1!important;box-shadow:none!important}

/* Limpiar: botón bajo, del mismo alto que las pastillas */
html body[data-t] #pantalla :is(.v122-filter-actions){flex:0 0 auto!important;width:auto!important;display:inline-flex!important;margin:0!important;padding:0!important;grid-column:auto!important}
html body[data-t] #pantalla :is(.v123-filter-clear,.v122-filter-actions .btn,.tymh6-clear){flex:0 0 auto!important;width:auto!important;max-width:none!important;grid-column:auto!important;height:34px!important;min-height:34px!important;padding:0 12px!important;margin:0!important;border-radius:10px!important;font-size:12.5px!important;line-height:1!important;align-self:center!important}

/* resumen «Mostrando N de N»: igual, más pegado */
html body[data-t] #pantalla :is(.v123-filter-summary,.v122-filter-summary){margin-top:8px!important;padding-top:0!important;font-size:12px!important}

/* ---------- Histórico: la barra de la consulta (Día / Semana / Mes / Rango) en una sola fila ---------- */
html body[data-t] #pantalla .hv-control{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px 14px!important;padding:10px 14px!important;border-radius:14px!important}
html body[data-t] #pantalla .hv-control>:is(.hv-top,.hv-body){display:contents!important}
html body[data-t] #pantalla .hv-control .hv-t{font-size:15px!important;margin-top:1px!important}
html body[data-t] #pantalla .hv-control .hv-seg{order:3;padding:3px!important;gap:2px!important}
html body[data-t] #pantalla .hv-control .hv-seg button{min-height:28px!important;padding:4px 12px!important;font-size:12.5px!important}
html body[data-t] #pantalla .hv-control .hv-field{order:2;flex:0 0 auto!important;max-width:100%;display:flex!important;align-items:center;flex-wrap:wrap;gap:6px 8px}
html body[data-t] #pantalla .hv-control .hv-l{display:inline!important;margin:0!important;font-size:11px!important}
html body[data-t] #pantalla .hv-control .hv-row{gap:6px!important;flex-wrap:nowrap!important}
html body[data-t] #pantalla .hv-control :is(.hv-row input[type=date],.hv-sel){height:32px!important}
html body[data-t] #pantalla .hv-control :is(.hv-nav){width:32px!important;height:32px!important;font-size:16px!important}
html body[data-t] #pantalla .hv-control :is(.hv-go,.hv-live){height:32px!important}
html body[data-t] #pantalla .hv-control .hv-presets{flex-basis:100%;margin-top:2px!important}
html body[data-t] #pantalla .hv-control .hv-side{order:4;margin-left:auto}

/* ---------- barra global de arriba (Centro · Modelo · OPL · Placas + Secciones): pastillas de 32 px ---------- */
html body.tym-shell[data-t] .center-filter.tf-bar{padding:6px 10px!important}
html body.tym-shell[data-t] .tf-trig{min-height:32px!important;padding-top:1px!important;padding-bottom:1px!important}
html body.tym-shell[data-t] .tf-bar>.tf-indice{padding-top:5px!important}
html body.tym-shell[data-t] .tf-indice .tfi-l button{padding:3px 10px!important}

/* ---------- celular: dos pastillas por fila; el buscador ocupa la fila entera ---------- */
@media (max-width:700px){
  html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f){flex:1 1 calc(50% - 6px)!important}
  html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f) select{flex:1 1 auto!important;max-width:none!important}
  html body[data-t] #pantalla :is(.v123-field.v123-search,.v122-mr-filter.v122-search){flex-basis:100%!important;max-width:none!important;height:auto!important;flex-wrap:wrap!important;padding:6px 4px 4px 10px!important}
  html body[data-t] #pantalla :is(.v123-field.v123-search,.v122-mr-filter.v122-search)>label{flex-basis:100%;margin-bottom:3px!important}
  html body[data-t] #pantalla :is(.v123-searchwrap,.v122-searchbox){flex-basis:100%!important;margin:0!important}
  html body[data-t] #pantalla :is(.v123-filterbox,.v122-mr-filters,.tymh6-filter){max-width:100%;box-sizing:border-box}
  html body[data-t] #pantalla .hv-control .hv-side{margin-left:0}
}
@media print{html body[data-t] #pantalla :is(.v123-field,.v122-mr-filter,.tymh6-field,.hv-f){border-color:#999!important}}

/* El índice permanece disponible para los enlaces y la búsqueda. */
html body.tym-shell[data-t] #pantalla .tf-bar > .tf-indice { display: none !important; }
html body.tym-shell[data-t] #pantalla .wrap:has(> .tf-bar) > :is(.v121-head,.exec-page-head,.sic-page-head) {
  gap: 6px 12px;
  padding: 7px 12px !important;
  margin: 0 0 5px !important;
  min-height: 0 !important;
  flex-wrap: wrap;
  align-items: center;
}
html body.tym-shell[data-t] #pantalla .wrap:has(> .tf-bar) > :is(.v121-head,.exec-page-head) :is(h2,.eh-title) {
  margin-block: 0 2px;
  line-height: 1.15;
}
html body.tym-shell[data-t] #pantalla .wrap:has(> .tf-bar) > .v121-head > .right[data-corte] { margin-left: auto; }
html body.tym-shell[data-t] #pantalla .v121-head > .d-ini-bar {
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto;
}
html body.tym-shell[data-t] #pantalla .center-filter.tf-bar {
  align-items: center !important;
  gap: 5px 7px !important;
  padding: 5px 8px !important;
  margin-block: 0 5px !important;
}
html body.tym-shell[data-t] #pantalla .tf-bar > .tf-ambito {
  min-width: 0;
  margin: 0 3px 0 0 !important;
  padding-right: 8px;
  gap: 6px !important;
  border-right: 1px solid var(--line);
}
html body.tym-shell[data-t] #pantalla .tf-ambito > .ini { width: 29px; height: 29px; flex: 0 0 29px; }
html body.tym-shell[data-t] #pantalla .tf-ambito > div:nth-child(2) > div:first-child { font-size: 14px !important; }
html body.tym-shell[data-t] #pantalla .tf-ambito > .btn { padding: 3px 6px; min-height: 24px; }
html body.tym-shell[data-t] #pantalla .tf-bar:has(> .tf-ambito):not(:has(.tf-trig.on)) > .v144-scope-summary {
  display: none !important;
}
html body.tym-shell[data-t] #pantalla .wrap:has(> .tf-bar) > .tg-franja {
  padding: 5px 9px;
  margin-bottom: 4px;
  row-gap: 4px;
}
html body.tym-shell[data-t][data-vista="torre"] #pantalla .d-an-inicio { margin-top: 4px; }
@media (max-width: 700px) {
  html body.tym-shell[data-t] #pantalla .tf-bar > .tf-ambito {
    display: flex !important;
    padding-right: 0;
    border-right: 0;
    flex: 1 1 auto;
  }
  html body.tym-shell[data-t] #pantalla .tf-bar > .tf-movil { order: -1 !important; width: auto; min-height: 36px; gap: 9px; }
  html body.tym-shell[data-t] #pantalla .tf-bar.tf-abierta > .tf-dd { flex: 1 1 43%; min-width: 0; }
  html body.tym-shell[data-t] #pantalla .tf-bar.tf-abierta > .tf-dd > .tf-trig { width: 100%; min-width: 0; }
  html body.tym-shell[data-t] #pantalla .v121-head > .d-ini-bar { flex: 1 1 auto; }
}
