/* Shared CRM Suite styles reused across every module */

.crm-filters-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}

.crm-filters-row > * {
  flex: 0 0 auto;
}

.crm-input,
input.crm-input,
.crm-date,
input.crm-date,
.crm-select,
select.crm-select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cfd7df;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  line-height: 1.2;
}

.crm-input,
input.crm-input {
  flex: 1 1 420px;
  min-width: 260px;
}

.crm-date,
input.crm-date {
  flex: 0 0 auto;
  min-width: 160px;
}

.crm-select,
select.crm-select {
  min-width: 220px;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="%23666"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
}

.crm-filters-row .crm-input,
.crm-filters-row .crm-select,
.crm-filters-row .crm-date,
.crm-filters-row button,
.crm-filters-row .btn-principal,
.crm-filters-row .btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.btn-principal,
.btn-principal:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #004aad;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  height: 44px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease;
}

.btn-principal:hover,
.btn-principal:focus {
  background: #003a87;
  color: #fff;
}

.btn-sec,
.btn-sec:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #eef2ff;
  color: #1e40af;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 0 12px;
  height: 44px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cv-table,
.crm-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-family: Arial, sans-serif;
}

.cv-table th,
.crm-table th {
  background: #004aad;
  color: #fff;
  text-align: left;
  padding: 10px;
}

.cv-table td,
.crm-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}

.cv-table tr:hover,
.crm-table tr:hover {
  background: #f2f2f2;
}

.crm-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}

.crm-pager .links a,
.crm-pager .links span {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #cfd7df;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  margin-right: 4px;
}

.crm-pager .links span.current {
  background: #004aad;
  color: #fff;
  border-color: #004aad;
}

.crm-pager .links a.disabled {
  pointer-events: none;
  opacity: .5;
}

.cv-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cv-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 900px) {
  .crm-filters-row {
    flex-wrap: wrap;
  }

  .crm-filters-row .crm-input,
  .crm-filters-row .crm-select,
  .crm-filters-row .crm-date,
  .crm-input,
  .crm-select,
  .crm-date {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }

  .crm-filters-row button,
  .crm-filters-row .btn-principal,
  .crm-filters-row .btn-sec {
    width: 100%;
  }
}

/* Utility helpers */
.crm-hidden { display: none !important; }
.crm-flex { display: flex !important; }
.crm-flex-between { justify-content: space-between !important; }
