/**
 * Eligentia v8 . crud-engine.css
 *
 * Estilos del motor CRUD parametrizado.
 * Layout responsive con grid de 12 columnas, listado superior + formulario inferior,
 * modal de lookup, toast.
 *
 * Sigue las convenciones visuales del resto de v8 (tokens.css, base.css).
 */

/* =========================================================
 * RAIZ Y CONTENEDORES
 * ======================================================= */

#crud-root {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.crud-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500, #888);
  font-style: italic;
}

/* =========================================================
 * CABECERA DEL CRUD
 * ======================================================= */

.crud-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--gray-200, #e6e6e6);
  padding-bottom: 14px;
}

.crud-header h2 {
  font-family: var(--ff-display, "DM Serif Display", serif);
  font-size: 28px;
  color: var(--gray-900, #1a1a1a);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.crud-header .crud-modo {
  font-size: 12px;
  color: var(--gray-500, #888);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crud-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.crud-toolbar .crud-search {
  width: 280px;
  padding: 8px 12px;
  border: 1px solid var(--gray-300, #cfcfcf);
  border-radius: 8px;
  font: 14px var(--ff-body, sans-serif);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.crud-toolbar .crud-search:focus {
  outline: none;
  border-color: var(--purple-600, #534AB7);
  box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.15);
}

.crud-btn-nuevo {
  background: var(--purple-600, #534AB7);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font: 700 13px var(--ff-body);
  cursor: pointer;
  transition: background 0.15s;
}
.crud-btn-nuevo:hover { background: var(--purple-800, #3d3387); }

/* =========================================================
 * LISTADO (TABLA SUPERIOR)
 * ======================================================= */

.crud-lista-wrap {
  background: #fff;
  border: 1px solid var(--gray-200, #e6e6e6);
  border-radius: 10px;
  overflow: hidden;
}

table.crud-lista {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.crud-lista thead th {
  background: var(--gray-100, #f5f5f5);
  text-align: left;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-700, #555);
  border-bottom: 1px solid var(--gray-200, #e6e6e6);
  line-height: 1.2;
}

table.crud-lista tbody td {
  padding: 4px 12px;
  border-bottom: 1px solid var(--gray-100, #f0f0f0);
  color: var(--gray-900, #1a1a1a);
  line-height: 1.3;
  vertical-align: middle;
}

table.crud-lista tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}
table.crud-lista tbody tr:hover {
  background: var(--purple-50, #f3f1fb);
}
table.crud-lista tbody tr.is-selected {
  background: var(--purple-100, #e2dcf3);
}

table.crud-lista .crud-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--gray-100, #e6e6e6);
  color: var(--gray-700, #555);
}
table.crud-lista .crud-pill[data-valor="ACTIVO"]    { background: #d4f5ec; color: #0c8869; }
table.crud-lista .crud-pill[data-valor="LEAD"]      { background: #ddd4f7; color: #534AB7; }
table.crud-lista .crud-pill[data-valor="PROSPECT"]  { background: #fff4d6; color: #b06a1f; }
table.crud-lista .crud-pill[data-valor="SUSPECT"]   { background: #f0f0f0; color: #888; }
table.crud-lista .crud-pill[data-valor="ARCHIVADO"] { background: #f0e9d4; color: #8b6c1d; }
table.crud-lista .crud-pill[data-valor="EX_CLIENTE"]{ background: #fce4ec; color: #b03252; }

.crud-lista-vacia {
  padding: 40px 20px;
  text-align: center;
  color: var(--gray-500, #888);
  font-style: italic;
}

/* =========================================================
 * FORMULARIO
 * ======================================================= */

.crud-form {
  background: #fff;
  border: 1px solid var(--gray-200, #e6e6e6);
  border-radius: 10px;
  padding: 22px 26px;
}

.crud-form-titulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200, #e6e6e6);
}
.crud-form-titulo h3 {
  font-family: var(--ff-display, "DM Serif Display", serif);
  font-size: 20px;
  margin: 0;
  color: var(--gray-900, #1a1a1a);
}
.crud-form-titulo .crud-form-modo {
  font-size: 11px;
  color: var(--purple-600, #534AB7);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--purple-50, #f3f1fb);
  padding: 4px 10px;
  border-radius: 10px;
}

/* Secciones */
.crud-seccion {
  margin-bottom: 18px;
}
.crud-seccion-titulo {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple-700, #423a99);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--gray-200, #e6e6e6);
}

/* Grid de 12 columnas */
.crud-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px 14px;
}

/* Cada campo se posiciona via grid-column-start/end y data-x/data-y */
.crud-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.crud-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-900, #1a1a1a);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.crud-field-label .crud-required {
  color: #b03252;
}

.crud-field-help {
  font-size: 11.5px;
  color: var(--gray-500, #888);
  font-style: italic;
  margin-top: 2px;
}

.crud-field-error {
  font-size: 11.5px;
  color: #b03252;
  margin-top: 2px;
  font-weight: 600;
}

/* Inputs base */
.crud-field input[type="text"],
.crud-field input[type="email"],
.crud-field input[type="url"],
.crud-field input[type="number"],
.crud-field input[type="date"],
.crud-field input[type="datetime-local"],
.crud-field select,
.crud-field textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--gray-300, #cfcfcf);
  border-radius: 7px;
  font: 14px var(--ff-body, sans-serif);
  color: var(--gray-900, #1a1a1a);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.crud-field input:focus,
.crud-field select:focus,
.crud-field textarea:focus {
  outline: none;
  border-color: var(--purple-600, #534AB7);
  box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.15);
}

.crud-field input[readonly],
.crud-field textarea[readonly] {
  background: var(--gray-50, #fafafa);
  color: var(--gray-700, #555);
  cursor: not-allowed;
}

.crud-field textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--ff-body);
}

.crud-field input.has-error,
.crud-field select.has-error,
.crud-field textarea.has-error {
  border-color: #b03252;
  background: #fff5f7;
}

/* Lookup */
.crud-lookup-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}
.crud-lookup-wrap input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.crud-lookup-lupa {
  border: 1px solid var(--gray-300, #cfcfcf);
  border-left: none;
  background: var(--gray-100, #f5f5f5);
  padding: 0 12px;
  cursor: pointer;
  border-top-right-radius: 7px;
  border-bottom-right-radius: 7px;
  font-size: 14px;
}
.crud-lookup-lupa:hover { background: var(--purple-50, #f3f1fb); }

.crud-typeahead {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-300, #cfcfcf);
  border-top: none;
  border-radius: 0 0 7px 7px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.crud-typeahead-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13.5px;
  border-bottom: 1px solid var(--gray-100, #f0f0f0);
}
.crud-typeahead-item:hover,
.crud-typeahead-item.is-active {
  background: var(--purple-50, #f3f1fb);
}
.crud-typeahead-item.is-create {
  font-style: italic;
  color: var(--purple-700, #423a99);
}

/* Color picker */
.crud-color-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.crud-color-wrap input[type="color"] {
  width: 40px;
  height: 36px;
  border: 1px solid var(--gray-300, #cfcfcf);
  border-radius: 7px;
  padding: 2px;
  cursor: pointer;
}
.crud-color-wrap input[type="text"] {
  flex: 1;
}

/* Icono picker */
.crud-icono-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.crud-icono-current {
  font-size: 22px;
  width: 40px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-300, #cfcfcf);
  border-radius: 7px;
  background: var(--gray-50, #fafafa);
}
.crud-icono-suggested {
  display: inline-flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}
.crud-icono-suggested button {
  font-size: 16px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--gray-100, #f5f5f5);
  cursor: pointer;
}
.crud-icono-suggested button:hover { background: var(--purple-50, #f3f1fb); }
.crud-icono-suggested button.is-active {
  background: var(--purple-100, #e2dcf3);
  border-color: var(--purple-600, #534AB7);
}

/* Separador uiPuro */
.crud-separador {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--gray-200, #e6e6e6);
  margin: 6px 0;
}

/* Botones del formulario */
.crud-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200, #e6e6e6);
}
.crud-form-actions .crud-msg {
  margin-right: auto;
  font-size: 13px;
}
.crud-form-actions .crud-msg.is-error { color: #b03252; font-weight: 600; }
.crud-form-actions .crud-msg.is-ok    { color: #0c8869; font-weight: 600; }

.crud-btn {
  padding: 9px 18px;
  border-radius: 999px;
  font: 700 13px var(--ff-body);
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}
.crud-btn:active { transform: scale(0.98); }
.crud-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.crud-btn-primary {
  background: var(--purple-600, #534AB7);
  color: #fff;
}
.crud-btn-primary:hover:not(:disabled) { background: var(--purple-800, #3d3387); }

.crud-btn-danger {
  background: transparent;
  color: #b03252;
  border: 1px solid #b03252;
}
.crud-btn-danger:hover:not(:disabled) { background: #fce4ec; }

.crud-btn-secondary {
  background: transparent;
  color: var(--gray-700, #555);
  border: 1px solid var(--gray-300, #cfcfcf);
}
.crud-btn-secondary:hover:not(:disabled) {
  background: var(--gray-100, #f5f5f5);
}

/* =========================================================
 * MODAL DE LOOKUP
 * ======================================================= */

.crud-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-body);
}
.crud-modal[hidden] { display: none; }

.crud-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.55);
  backdrop-filter: blur(2px);
}

.crud-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  width: min(640px, calc(100vw - 36px));
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.crud-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100, #f0f0f0);
}
.crud-modal-head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--gray-900, #1a1a1a);
}
.crud-modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--gray-500, #888);
  padding: 4px 8px;
}
.crud-modal-close:hover { color: var(--gray-900, #1a1a1a); }

.crud-modal-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-300, #cfcfcf);
  border-radius: 7px;
  font: 14px var(--ff-body);
  margin-bottom: 12px;
}
.crud-modal-input:focus {
  outline: none;
  border-color: var(--purple-600, #534AB7);
  box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.15);
}

.crud-modal-list {
  overflow-y: auto;
  flex: 1;
  min-height: 100px;
  border: 1px solid var(--gray-100, #f0f0f0);
  border-radius: 7px;
}
.crud-modal-list-item {
  padding: 10px 13px;
  cursor: pointer;
  font-size: 13.5px;
  border-bottom: 1px solid var(--gray-100, #f0f0f0);
}
.crud-modal-list-item:hover,
.crud-modal-list-item.is-active {
  background: var(--purple-50, #f3f1fb);
}

/* =========================================================
 * TOAST
 * ======================================================= */

.crud-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  padding: 11px 22px;
  background: var(--gray-900, #1a1a1a);
  color: #fff;
  border-radius: 999px;
  font: 600 13px var(--ff-body);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.crud-toast[data-visible="1"] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.crud-toast[data-kind="error"] { background: #b03252; }
.crud-toast[data-kind="success"] { background: #0c8869; }
.crud-toast[data-kind="warn"] { background: #b06a1f; }

/* =========================================================
 * RESPONSIVE: en pantalla pequena el grid colapsa a 1 columna
 * ======================================================= */

@media (max-width: 700px) {
  .crud-grid {
    grid-template-columns: 1fr;
  }
  .crud-grid .crud-field {
    grid-column: 1 / -1 !important;
  }
  .crud-toolbar .crud-search {
    width: 100%;
  }
  table.crud-lista thead th,
  table.crud-lista tbody td {
    padding: 8px 10px;
    font-size: 12.5px;
  }
}
/* =========================================================
 * BOTON BUSCAR (entre input y Nuevo)
 * ======================================================= */

.crud-btn-buscar {
  background: var(--gray-100, #f5f5f5);
  color: var(--gray-900, #1a1a1a);
  border: 1px solid var(--gray-300, #cfcfcf);
  padding: 8px 16px;
  border-radius: 999px;
  font: 600 13px var(--ff-body);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.crud-btn-buscar:hover {
  background: var(--purple-50, #f3f1fb);
  border-color: var(--purple-300, #b6a8e8);
}

/* =========================================================
 * RESALTADO DE COINCIDENCIAS EN LA LISTA (<mark>)
 * ======================================================= */

table.crud-lista mark {
  background: #fff59d;
  color: var(--gray-900, #1a1a1a);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}
/* =========================================================
 * ESTADO BAJA_PENDIENTE
 * ======================================================= */

table.crud-lista tr.is-en-baja {
  opacity: 0.75;
  background: #fffcf2;
}
table.crud-lista tr.is-en-baja:hover {
  background: #fff8d6;
}

.crud-pill-baja {
  background: #fff4d6 !important;
  color: #8b6c1d !important;
  margin-right: 6px;
}

.crud-btn-realta {
  background: #0c8869;
  color: #fff;
  border: none;
}
.crud-btn-realta:hover:not(:disabled) {
  background: #096a52;
}

.crud-baja-banner {
  background: #fff8d6;
  border: 1px solid #b06a1f;
  color: #6b4910;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  margin-right: auto;
}

/* =========================================================
 * HERRAMIENTAS-PICKER (browse del catalogo Evans)
 * Inspirado en el browse del documento ASP de NACE2:
 * lista compacta, agrupada por bloque, con filtro y checkbox por fila.
 * ======================================================= */

.crud-htools-wrap {
  border: 1px solid var(--gray-200, #e2e2e2);
  border-radius: 8px;
  background: var(--gray-50, #fafafa);
  padding: 8px 10px;
}

.crud-htools-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.crud-htools-toolbar .crud-htools-filter {
  flex: 1;
  font-size: 13px;
  padding: 5px 9px;
  border: 1px solid var(--gray-200, #d8d8d8);
  border-radius: 6px;
  background: #fff;
}
.crud-htools-toolbar .crud-htools-counter {
  font-size: 11.5px;
  color: var(--gray-700, #555);
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.crud-htools-list {
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--gray-100, #ececec);
  border-radius: 6px;
}
.crud-htools-list[data-loading="1"] {
  padding: 16px;
  text-align: center;
  font-style: italic;
  color: var(--gray-500, #888);
}

.crud-htools-group {
  border-bottom: 1px solid var(--gray-100, #f0f0f0);
}
.crud-htools-group:last-child { border-bottom: 0; }

.crud-htools-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--gray-50, #fafafa);
  border-left: 4px solid #888;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-800, #2c2c2a);
}
.crud-htools-group-tag {
  display: inline-block;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  color: #fff;
  letter-spacing: 0.05em;
}
.crud-htools-group-name { flex: 1; }
.crud-htools-group-count {
  color: var(--gray-500, #888);
  font-weight: 600;
  font-size: 11px;
}

.crud-htools-row {
  display: grid;
  grid-template-columns: 22px 60px 1fr 2fr;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  font-size: 12.5px;
  border-top: 1px solid var(--gray-50, #f6f6f6);
  cursor: pointer;
  transition: background 0.1s;
}
.crud-htools-row:hover { background: var(--purple-50, #f3f1fb); }
.crud-htools-row input[type=checkbox] {
  margin: 0;
  cursor: pointer;
  width: 15px;
  height: 15px;
}
.crud-htools-clave {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--purple-700, #4c3fa3);
}
.crud-htools-titulo {
  font-weight: 600;
  color: var(--gray-900, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crud-htools-summary {
  color: var(--gray-600, #666);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Ola 1.7.e (#28): grupo de plantillas composables, antes que las Evans */
.crud-htools-group--plt {
  background: linear-gradient(to right, rgba(29, 158, 117, 0.04), transparent 60%);
  border-bottom: 2px solid rgba(29, 158, 117, 0.18);
}
.crud-htools-row--plt {
  background: rgba(29, 158, 117, 0.025);
}
.crud-htools-row--plt:hover {
  background: rgba(29, 158, 117, 0.10);
}
.crud-htools-row--plt .crud-htools-clave {
  font-size: 16px;
  color: #1D9E75;
  font-family: inherit;
  font-weight: 400;
}
.crud-htools-row--plt.is-checked {
  background: rgba(29, 158, 117, 0.16);
}

.crud-htools-empty,
.crud-htools-error {
  padding: 12px;
  text-align: center;
  color: var(--gray-500, #888);
  font-style: italic;
}

/* Boton "Solo marcadas" + estilos extra del picker */
.crud-htools-only-selected {
  background: #fff;
  border: 1px solid var(--gray-200, #d8d8d8);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700, #555);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.crud-htools-only-selected:hover { background: var(--gray-50, #f5f5f5); }
.crud-htools-only-selected.is-active {
  background: var(--purple-600, #534AB7);
  border-color: var(--purple-700, #4338A0);
  color: #fff;
}

/* Filas marcadas tienen un fondo sutil distinto */
.crud-htools-row.is-checked {
  background: var(--purple-50, #f3f1fb);
}
.crud-htools-row.is-checked .crud-htools-clave {
  color: var(--purple-700, #4338A0);
}

/* Resaltado amarillo en el filtro/busqueda (igual que la lista del CRUD) */
.crud-htools-row mark {
  background: #fff59d;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* Aumentar el alto del browse cuando hay muchas herramientas (500+) */
.crud-htools-list {
  max-height: 480px;
}

/* =========================================================
 * SCROLL EN LA LISTA DEL CRUD
 * Para que con 100s de plantillas/proyectos/clientes la
 * lista no empuje la página entera.
 * ======================================================= */

.crud-lista-wrap {
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
}
/* Header sticky para que el thead se quede arriba al scrollear */
table.crud-lista thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Toast de error mas grande y vistoso */
#crud-toast[data-kind="error"] {
  background: #b03252;
  color: #fff;
  border: 1px solid #8e1e3f;
  font-weight: 600;
  max-width: 70vw;
  padding: 14px 22px;
  font-size: 14px;
}

/* =========================================================
 * BANNER DE PLANTILLA DE FABRICA · SOLO LECTURA
 * Avisa con claridad al consultor que esta plantilla no
 * se puede modificar, ofrece el camino para duplicarla.
 * ======================================================= */
.crud-fabrica-banner {
  background: #fff8d6;
  border: 1.5px solid #C9A84C;
  border-left: 5px solid #C9A84C;
  color: #5a4413;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.crud-fabrica-banner strong { color: #3d2c08; }

/* El badge de modo cuando es de fabrica */
.crud-form-modo.is-fabrica {
  background: #fff4d6 !important;
  color: #8b6c1d !important;
  border: 1px solid #C9A84C;
}

/* El candado al lado del titulo del formulario */
.crud-form-lock {
  font-size: 18px;
  color: #C9A84C;
  margin-left: 6px;
  vertical-align: middle;
}

/* Boton Duplicar */
.crud-btn-duplicar {
  background: #fff;
  color: #534AB7;
  border: 1.5px solid #534AB7;
  font-weight: 700;
}
.crud-btn-duplicar:hover:not(:disabled) {
  background: #534AB7;
  color: #fff;
}

/* Boton Guardar deshabilitado · mas visible */
.crud-btn-primary:disabled {
  background: #c7c4dc !important;
  cursor: not-allowed;
  opacity: 0.7;
}

/* =========================================================
 * ESTADOS SOFT-DELETE EN LA LISTA (productos: DISCONTINUADO,
 * clientes: BAJA_PENDIENTE).
 * Las filas se ven mas apagadas pero siguen visibles.
 * ======================================================= */

/* Pill de DISCONTINUADO (productos) - naranja apagado */
table.crud-lista .crud-pill[data-valor="DISCONTINUADO"] {
  background: #ffe5d0;
  color: #b66a1a;
}
table.crud-lista .crud-pill[data-valor="BORRADOR"] {
  background: #efeef0;
  color: #666;
}
table.crud-lista .crud-pill[data-valor="ELIGENTIA_FABRICA"] {
  background: #fff4d6;
  color: #8b6c1d;
  font-weight: 700;
}
table.crud-lista .crud-pill[data-valor="CONSULTOR"] {
  background: #e2dcf3;
  color: #534AB7;
}
table.crud-lista .crud-pill[data-valor="MARKETPLACE"] {
  background: #d4f5ec;
  color: #0c8869;
}

/* Filas en DISCONTINUADO se ven apagadas pero visibles */
table.crud-lista tbody tr.is-discontinuado {
  opacity: 0.65;
}
table.crud-lista tbody tr.is-discontinuado:hover {
  opacity: 1;
}
