/* here you can put your own css to customize and override the theme */

/* Fix DataTables filters on small screens: stack controls and widen inputs */
@media (max-width: 768px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none !important;
    width: 100% !important;
    text-align: left !important;
    margin-bottom: 10px;
    clear: both !important;
    position: relative;
    z-index: 2;
  }

  .dataTables_wrapper .dataTables_filter label,
  .dataTables_wrapper .dataTables_length label {
    width: 100%;
  }

  .dataTables_wrapper .dataTables_filter .form-control,
  .dataTables_wrapper .dataTables_length .form-control {
    width: 100% !important;
    display: block;
    pointer-events: auto;
    position: relative;
    z-index: 3;
  }
}

/* En móvil, el contenedor #facturasbuscar no debe bloquear el input */
@media (max-width: 768px) {
  #facturasbuscar {
    pointer-events: none;
  }
  #facturasbuscar input,
  #facturasbuscar .form-control {
    pointer-events: auto;
    width: 100%;
  }
}

.chat-user-status {
  display: inline-flex;
  align-items: center;
  min-height: 12px;
}

.chat-user-online {
  font-size: 0;
}

.chat-user-online:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #2ecc71;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset;
}

/* KPI cliente (semaforo) */
.client-kpi-wrap {
  float: right;
  margin-top: 2px;
  position: relative;
  z-index: 6;
}

.client-kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #d9e2ec;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}

.client-kpi-chip-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7f8c99;
  border-right: 1px solid #e2e8f0;
  padding-right: 8px;
}

.client-kpi-chip-status {
  font-size: 13px;
  font-weight: 700;
  color: #1f2d3d;
}

.client-kpi-chip-meta {
  font-size: 10px;
  color: #7b8794;
}

.client-kpi-wrap.client-kpi-priority-1 .client-kpi-chip {
  border-color: #bfeecf;
  box-shadow: 0 6px 14px rgba(39, 174, 96, 0.22);
}

.client-kpi-wrap.client-kpi-priority-1 .client-kpi-chip-status {
  color: #1e8f54;
}

.client-kpi-wrap.client-kpi-priority-2 .client-kpi-chip {
  border-color: #f4e1a3;
  box-shadow: 0 6px 14px rgba(241, 196, 15, 0.25);
}

.client-kpi-wrap.client-kpi-priority-2 .client-kpi-chip-status {
  color: #b9770e;
}

.client-kpi-wrap.client-kpi-priority-3 .client-kpi-chip {
  border-color: #f3b4b4;
  box-shadow: 0 6px 14px rgba(231, 76, 60, 0.25);
}

.client-kpi-wrap.client-kpi-priority-3 .client-kpi-chip-status {
  color: #c0392b;
}

@media (max-width: 992px) {
  .client-kpi-wrap {
    float: none;
    margin-top: 8px;
  }
}

#ticket-history-container {
  position: relative;
  max-height: 100vh;
}

#ticket-history {
  height: 100%;
  overflow-y: auto;
}
