/* Ajustes mínimos del CRM para componentes Bootstrap. */
.crm-customer-filters .form-label { display: block; width: 100%; }
.crm-customer-filters .form-control,
.crm-customer-filters .form-select { width: 100%; }

/* Compatibilidad para pantallas que aún usan la estructura clásica del CRM. */
.form input,
.form select,
.form textarea,
.filter input,
.filter select,
.filter textarea { max-width: 100%; }
.filter {
  align-items: center;
}
.filter > input,
.filter > select,
.filter > textarea,
.filter > .button,
.filter > .btn {
  min-height: 40px;
  box-sizing: border-box;
}
.form > div.wide {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.form > div.wide .button,
.form > div.wide .btn {
  margin: 0;
}
.table td:last-child {
  vertical-align: middle;
}
.table td:last-child form {
  margin-bottom: 6px;
}
.table td:last-child form:last-child {
  margin-bottom: 0;
}
.table-responsive,
.table-scroll { -webkit-overflow-scrolling: touch; }
.table-scroll .table { min-width: 760px; }
.actions { width: 100%; max-width: none; }
.actions .button,
.actions .btn { width: 100%; }
.crm-customers-table th:nth-last-child(2),
.crm-customers-table td:nth-last-child(2) {
  min-width: 0;
}
.crm-customers-table th:last-child,
.crm-customers-table td:last-child {
  display: table-cell;
  position: static;
  right: auto;
  box-shadow: none;
  background: transparent;
  width: 1%;
  min-width: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.crm-customers-table .crm-row-actions {
  flex-wrap: nowrap;
  gap: 6px;
}
.crm-icon-btn {
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-sm.crm-icon-btn {
  height: 31px;
  min-height: 31px;
  min-width: 31px;
}
.button.crm-icon-btn {
  height: 40px;
  min-height: 40px;
  min-width: 40px;
  padding: 0 10px;
}
.crm-row-actions .btn-sm {
  height: 31px;
  display: inline-flex;
  align-items: center;
}
.crm-quotes-table th:nth-last-child(2),
.crm-quotes-table td:nth-last-child(2) {
  min-width: 0;
}
.crm-quotes-table th:last-child,
.crm-quotes-table td:last-child {
  position: static;
  right: auto;
  box-shadow: none;
  background: transparent;
  width: 1%;
  min-width: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.crm-quotes-table .crm-row-actions,
.crm-hosting-table .crm-row-actions {
  flex-wrap: nowrap;
  gap: 6px;
}
.crm-hosting-table th:nth-last-child(2),
.crm-hosting-table td:nth-last-child(2) {
  min-width: 0;
}
.crm-hosting-table th:last-child,
.crm-hosting-table td:last-child {
  position: static;
  right: auto;
  box-shadow: none;
  background: transparent;
  width: 1%;
  min-width: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.crm-clamp-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.crm-clamp-text.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.crm-clamp-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: #4b5563;
  text-decoration: underline;
  cursor: pointer;
}
.crm-clamp-toggle.is-needed {
  display: inline-block;
}
.crm-customer-filters > .col-6.col-lg-1,
.crm-customer-filters > .col-6.col-lg-2 {
  display: flex;
  align-items: flex-end;
}
.crm-customer-filters > .col-6.col-lg-1 > .btn,
.crm-customer-filters > .col-6.col-lg-2 > .btn {
  height: 38px;
  min-height: 38px;
  margin-bottom: .5rem;
}
@media (max-width: 800px) {
  .form label,
  .filter > input,
  .filter > select,
  .filter > textarea { min-width: 0; }
  .form .wide { width: 100%; }
  .crm-customer-filters > .col-6.col-lg-1 > .btn,
  .crm-customer-filters > .col-6.col-lg-2 > .btn { margin-bottom: 0; }
}

/* Mejoras de agilidad: paneles colapsables, acciones en línea y selección múltiple */
.crm-collapsible.is-collapsed { display: none; }
.crm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.crm-panel-header h2 { margin: 0; }
.crm-bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
}
.crm-bulk-bar.is-visible { display: flex; }
.crm-inline-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-size: 12.5px;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  background: #fff;
}
.crm-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.crm-row-actions form {
  margin: 0 !important;
  display: inline-flex !important;
}
.crm-catalog-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.crm-catalog-actions form { margin: 0; }

