/* V55 · filtros coherentes y legibles en escritorio y móvil */

/* Todos los campos de filtro muestran una etiqueta estable, como en Equipos. */
form.gtic-filter-unified > label,
form.gtic-filter-inline > label,
form.gtic-filter-one-line > label,
form.notification-filter-line > label,
form.gtic-dn-filter > label,
.gtic-filter-field-v55 {
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:5px!important;
  min-width:0!important;
  margin:0!important;
}
form.gtic-filter-unified > label > span:first-child,
form.gtic-filter-inline > label > span:first-child,
form.gtic-filter-one-line > label > span:first-child,
form.notification-filter-line > label > span:first-child,
form.gtic-dn-filter > label > span:first-child,
.gtic-filter-field-v55 > span:first-child,
.filterbar .field > label > span {
  display:block!important;
  margin:0!important;
  color:#64748b!important;
  font-size:.76rem!important;
  font-weight:750!important;
  line-height:1.2!important;
}
.gtic-filter-search-v55 { min-width:220px!important; }
.gtic-per-page-field-v55 { min-width:92px!important; max-width:125px!important; }

/* Selector Mostrar y demás desplegables nativos de filtros. Esta regla se carga
   al final para evitar que iOS/Android recuperen la apariencia cuadrada nativa. */
form.gtic-filter-unified select:not([multiple]),
form.gtic-filter-inline select:not([multiple]),
form.gtic-filter-one-line select:not([multiple]),
form.filterbar select:not([multiple]),
form.notification-filter-line select:not([multiple]),
form.gtic-dn-filter select:not([multiple]),
.gtic-filter-select-v55,
select[name="per_page"] {
  -webkit-appearance:none!important;
  -moz-appearance:none!important;
  appearance:none!important;
  width:100%!important;
  min-height:40px!important;
  height:40px!important;
  padding:8px 38px 8px 12px!important;
  border:1px solid #d5e1e9!important;
  border-radius:14px!important;
  background-color:#fff!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364778a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right 12px center!important;
  background-size:14px 14px!important;
  background-clip:padding-box!important;
  color:var(--gtic-text,#233044)!important;
  box-shadow:0 1px 2px rgba(18,58,87,.04)!important;
  font:inherit!important;
  line-height:1.2!important;
  overflow:hidden!important;
}
select[name="per_page"],
.gtic-filter-select-v55 {
  min-width:88px!important;
  max-width:120px!important;
  font-weight:800!important;
}
form.gtic-filter-unified select:not([multiple]):focus,
form.gtic-filter-inline select:not([multiple]):focus,
form.gtic-filter-one-line select:not([multiple]):focus,
form.filterbar select:not([multiple]):focus,
form.notification-filter-line select:not([multiple]):focus,
form.gtic-dn-filter select:not([multiple]):focus,
.gtic-filter-select-v55:focus,
select[name="per_page"]:focus {
  border-color:var(--gtic-teal,#20c6c9)!important;
  box-shadow:0 0 0 4px rgba(32,198,201,.12)!important;
  outline:0!important;
}

/* El buscador de avisos conserva su icono, pero ahora tiene etiqueta. */
.notification-filter-line .chat-search-field {
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  min-height:40px!important;
  padding:0 10px!important;
  border:1px solid #d9e2ec!important;
  border-radius:14px!important;
  background:#fff!important;
  box-sizing:border-box!important;
}
.notification-filter-line .chat-search-field i { color:#7d8b99;font-style:normal; }
.notification-filter-line .chat-search-field input {
  width:100%!important;
  min-width:0!important;
  min-height:38px!important;
  padding:7px 0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

html[data-theme="dark"] form.gtic-filter-unified select:not([multiple]),
html[data-theme="dark"] form.gtic-filter-inline select:not([multiple]),
html[data-theme="dark"] form.gtic-filter-one-line select:not([multiple]),
html[data-theme="dark"] form.filterbar select:not([multiple]),
html[data-theme="dark"] form.notification-filter-line select:not([multiple]),
html[data-theme="dark"] form.gtic-dn-filter select:not([multiple]),
html[data-theme="dark"] .gtic-filter-select-v55,
html[data-theme="dark"] select[name="per_page"] {
  color:#edf4fb!important;
  border-color:#3a5065!important;
  background-color:#0e1b28!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a9bdcb' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")!important;
}
html[data-theme="dark"] .notification-filter-line .chat-search-field {
  background:#0e1b28!important;
  border-color:#3a5065!important;
}

@media(min-width:921px) {
  form.notification-filter-line.pro {
    grid-template-columns:minmax(230px,1.45fr) minmax(145px,.8fr) minmax(125px,.65fr) minmax(92px,.45fr) auto auto!important;
    align-items:end!important;
  }
  form.gtic-filter-unified > .gtic-filter-search-v55,
  form.gtic-filter-inline > .gtic-filter-search-v55,
  form.gtic-filter-one-line > .gtic-filter-search-v55,
  form.notification-filter-line > .gtic-filter-search-v55 {
    grid-column:span 2!important;
  }
}

@media(max-width:920px) {
  /* En móvil todos los filtros avanzados quedan en una sola columna y conservan
     sus etiquetas. El buscador principal mantiene la etiqueta oculta en la fila compacta. */
  .gtic-mobile-filter-advanced .gtic-filter-field-v55,
  .gtic-mobile-filter-advanced > label,
  form.gtic-filter-unified > label,
  form.gtic-filter-inline > label,
  form.gtic-filter-one-line > label,
  form.notification-filter-line > label {
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .gtic-mobile-filter-advanced label > span:first-child,
  .gtic-mobile-filter-advanced .gtic-filter-field-v55 > span:first-child {
    display:block!important;
  }
  .gtic-mobile-filter-bar > label > span:first-child { display:none!important; }
  .gtic-mobile-filter-bar > label { gap:0!important; }
  .gtic-per-page-field-v55 { max-width:none!important; }
  select[name="per_page"],.gtic-filter-select-v55 { max-width:none!important; }
  .notification-filter-line .chat-search-field { min-height:42px!important; }
}
