/* =========================
   BASE GENERAL
========================= */
.envmas-wrap {
  width: 99%;
  max-width: 1180px;
  margin: 0 auto;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.18;
  color: #1f2937;
}

.mrcBordeComp.envmas-wrap {
  background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  border: 1px solid #e7eef7;
  border-radius: 10px;
  padding: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mrcTituloComp {
  margin-bottom: 5px;
}

.grupo,
.tblTitulo2 {
  font-size: 11px;
  font-weight: 800;
  color: #2563eb;
}

/* =========================
   GRID
========================= */
.envmas-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr);
  gap: 6px;
  align-items: start;
}

.envmas-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.envmas-card--full {
  grid-column: 1 / -1;
}

/* =========================
   HEADER
========================= */
.envmas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 5px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.envmas-header-left {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.envmas-header-left:hover {
  opacity: 0.9;
}

.envmas-back-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #dbe4ee;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  padding: 0;
}

.envmas-back-btn:hover {
  background: #f8fafc;
  border-color: #cdd9e8;
}

.envmas-back-text {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.envmas-header-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: 0.1px;
}

/* =========================
   CARDS
========================= */
.envmas-card {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  padding: 7px 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.16s ease;
  min-width: 0;
}

.envmas-card:hover {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.envmas-title {
  margin: 0 0 5px 0;
  padding-bottom: 3px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #2563eb;
  border-bottom: 1px solid #edf2f7;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.envmas-subtitle {
  font-size: 10px;
  font-weight: 700;
  color: #475467;
  margin: 0 0 4px 0;
}

/* =========================
   TABLAS
========================= */
.envmas-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px 2px;
  margin: 0;
}

.envmas-table td {
  vertical-align: middle;
  padding: 0 1px;
}

.envmas-label,
.etiqueta {
  width: 118px;
  font-size: 11px;
  font-weight: 700;
  color: #475467;
  white-space: nowrap;
  line-height: 1.15;
}

.envmas-inline-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* =========================
   PARTICIPANTES
========================= */
.envmas-participantes-table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 6px !important;
}

.envmas-participantes-table tr {
  vertical-align: top;
}

.envmas-participantes-table td {
  padding: 0 !important;
  vertical-align: top !important;
}

.envmas-participantes-table .envmas-label {
  width: 118px;
  padding: 5px 8px 0 0 !important;
  vertical-align: top !important;
}

.envmas-label-top {
  padding-top: 8px !important;
}

#autoCompleteRemitente,
#autoCompleteInterno,
#autoCompleteExterno {
  margin: 0 !important;
  width: 100%;
  max-width: 100%;
  padding-bottom: 0;
}

.envmas-searchbox,
.envmas-searchbox-remitente {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.envmas-ac-container {
  margin: 0 !important;
  padding: 0 !important;
}

.envmas-dest-panel {
  width: 100%;
  margin-top: 0 !important;
  padding: 8px !important;
  border: 1px solid #d9e3ef;
  border-radius: 9px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%);
}

.envmas-dest-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 0 6px 0 !important;
}

.envmas-dest-search {
  flex: 1 1 220px;
  min-width: 200px;
  width: 100%;
  margin: 0 !important;
}

.envmas-dest-search #interno,
.envmas-dest-search #externo {
  margin: 0 !important;
}

.envmas-dest-search input {
  width: 100% !important;
  max-width: 100% !important;
}

.envmas-dest-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0 !important;
  padding-top: 0 !important;
}

.envmas-dest-actions .inputButtonCss,
.envmas-dest-actions .inputButtonCSS {
  margin: 0 !important;
}

.envmas-masivo-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0 !important;
}

.envmas-dest-list-wrap {
  width: 100%;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.envmas-destinatarios-body {
  width: 100%;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 96px !important;
  overflow-y: auto;
  background: #fff;
}

.envmas-card table br,
.envmas-dest-panel br,
.envmas-dest-toolbar br,
.envmas-dest-actions br,
.envmas-masivo-tools br {
  display: none !important;
}

.envmas-firma-box {
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  max-width: 760px;
}

#firma_canvas {
  width: 100%;
  max-width: 500px;   /* antes 700px */
  height: 160px;      /* antes 220px */
  display: block;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #fcfdff;
  cursor: crosshair;
  touch-action: none;
}

.envmas-firma-actions {
  margin-top: 8px;   /* menos espacio */
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.envmas-firma-upload-wrap {
  max-width: 350px;  /* más compacto */
}

/* =========================
   EDITOR QUILL - CUERPO DEL DOCUMENTO
   =========================
   Este bloque corrige la visualización de párrafos, saltos de línea,
   selección, escritura y comportamiento visual del editor.
   La funcionalidad de ENTER depende también de que ningún JS global
   ejecute preventDefault() sobre el editor.
========================= */

/* Contenedor general del editor */
.envmas-note-box {
  width: 100%;
  min-width: 0;
}

/* Toolbar Quill */
#toolbar_cuerpo.ql-toolbar.ql-snow,
.envmas-editor-toolbar.ql-toolbar.ql-snow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  width: 100%;
  padding: 7px 8px;
  background: #f8fafc;
  border: 1px solid #cfd8e3;
  border-radius: 7px 7px 0 0;
  box-sizing: border-box;
}

#toolbar_cuerpo .ql-formats,
.envmas-editor-toolbar .ql-formats {
  display: inline-flex;
  align-items: center;
  margin-right: 7px !important;
  margin-bottom: 2px;
}

/* Contenedor Quill creado alrededor de #editor_cuerpo */
#editor_cuerpo.ql-container.ql-snow {
  width: 100%;
  min-height: 260px;
  height: auto;
  border: 1px solid #cfd8e3 !important;
  border-top: 0 !important;
  border-radius: 0 0 7px 7px;
  background: #fff;
  box-sizing: border-box;
  overflow: visible;
}

/* Área realmente editable */
#editor_cuerpo .ql-editor {
  display: block !important;
  width: 100%;
  min-height: 260px;
  max-height: 520px;
  padding: 14px 16px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;

  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: #111827;
  text-align: left;

  white-space: pre-wrap !important;
  overflow-wrap: break-word;
  word-break: normal;

  cursor: text !important;
  user-select: text !important;
  -webkit-user-select: text !important;

  outline: none !important;
}

/*
 * MUY IMPORTANTE:
 * Quill representa ENTER como nuevos bloques <p>.
 * Si un CSS antiguo del sistema elimina sus márgenes/altura,
 * visualmente parece que ENTER no funciona.
 */
#editor_cuerpo .ql-editor p {
  display: block !important;
  position: relative;
  min-height: 1.55em !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  line-height: 1.55 !important;
  white-space: pre-wrap !important;
}

/* Párrafo vacío creado al presionar ENTER */
#editor_cuerpo .ql-editor p:has(> br:only-child) {
  min-height: 1.55em !important;
}

/* Compatibilidad para navegadores donde :has no aplique */
#editor_cuerpo .ql-editor p br {
  display: inline !important;
}

/* Listas */
#editor_cuerpo .ql-editor ol,
#editor_cuerpo .ql-editor ul {
  margin: 7px 0 10px 0 !important;
  padding-left: 26px !important;
}

#editor_cuerpo .ql-editor li {
  margin: 3px 0 !important;
  line-height: 1.5 !important;
}

/* Citas */
#editor_cuerpo .ql-editor blockquote {
  margin: 10px 0 !important;
  padding: 7px 12px !important;
  border-left: 4px solid #94a3b8 !important;
  background: #f8fafc;
}

/* Código */
#editor_cuerpo .ql-editor pre,
#editor_cuerpo .ql-editor .ql-code-block-container {
  margin: 8px 0 !important;
  padding: 9px 11px !important;
  border-radius: 6px;
  background: #111827;
  color: #f8fafc;
  white-space: pre-wrap !important;
}

/* Enlaces */
#editor_cuerpo .ql-editor a {
  color: #2563eb;
  text-decoration: underline;
}

/* Imágenes */
#editor_cuerpo .ql-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px auto;
}

/* Video */
#editor_cuerpo .ql-editor iframe {
  max-width: 100%;
}

/* Placeholder de Quill */
#editor_cuerpo .ql-editor.ql-blank::before {
  left: 16px !important;
  right: 16px !important;
  color: #94a3b8 !important;
  font-style: italic;
  pointer-events: none;
}

/* Selección */
#editor_cuerpo .ql-editor ::selection {
  background: rgba(37, 99, 235, 0.20);
}

/* Editor enfocado */
#editor_cuerpo.ql-container.ql-snow:focus-within {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.10);
}

/* Evita reglas antiguas que puedan bloquear la edición */
#editor_cuerpo .ql-editor[contenteditable="true"] {
  pointer-events: auto !important;
  touch-action: manipulation;
}

/* Botones / selectores del toolbar */
#toolbar_cuerpo button,
#toolbar_cuerpo select {
  cursor: pointer;
}

/* Que la barra no quede cortada en anchos pequeños */
#toolbar_cuerpo .ql-picker {
  white-space: nowrap;
}

/* Editor de Nota Interna, si usa Quill */
#mensaje_editor.ql-container.ql-snow {
  min-height: 150px;
  background: #fff;
}

#mensaje_editor .ql-editor {
  min-height: 150px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap !important;
}

#mensaje_editor .ql-editor p {
  display: block !important;
  min-height: 1.5em !important;
  margin: 0 0 8px 0 !important;
}

/* =========================
   INPUTS
========================= */
.inputTextCss,
.textareaCss,
.textAreaCss,
.selectCss {
  width: 100%;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1.15;
  color: #1f2937;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 5px;
  box-sizing: border-box;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

#myInput,
#myInput2,
#myInput5,
#numdoc,
#asu,
#nota_dse,
#obs,
#dane,
#nfol {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 11px !important;
  position: relative;
  z-index: 1;
}

textarea.inputTextCss,
textarea.textareaCss,
textarea.textAreaCss,
textarea {
  min-height: 46px;
  resize: vertical;
}

.inputTextCss:hover,
.textareaCss:hover,
.textAreaCss:hover,
.selectCss:hover,
input[type="file"]:hover {
  border-color: #b8c7da;
}

.inputTextCss:focus,
.textareaCss:focus,
.textAreaCss:focus,
.selectCss:focus,
input[type="file"]:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  background: #fff;
}

input[type="file"] {
  width: 100%;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 6px;
  font-size: 11px;
  color: #1f2937;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 5px;
  box-sizing: border-box;
  transition: all 0.16s ease;
}

input[type="radio"],
input[type="checkbox"] {
  margin-right: 3px;
  vertical-align: middle;
  transform: scale(0.92);
  accent-color: #2563eb;
}

select.selectCss {
  height: 26px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.envmas-search-input {
  padding-left: 24px !important;
}

.envmas-search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
}

/* =========================
   BOTONES
========================= */
.inputButtonCss,
.inputButtonCSS {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #2563eb;
  border-radius: 5px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.14);
}

.inputButtonCss:hover,
.inputButtonCSS:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
}

.inputButtonCss:disabled,
.inputButtonCSS:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.envmas-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  margin: 0;
}

.envmas-chip:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

/* =========================
   ACCIONES
========================= */
.envmas-actions {
  text-align: center;
  margin-top: 0;
  padding: 1px 0 0;
}

.envmas-actions input {
  margin: 0 2px;
}

/* =========================
   BOX
========================= */
.envmas-box {
  border: 1px solid #dbe4ee;
  border-radius: 7px;
  padding: 6px;
  background: linear-gradient(180deg, #fcfdff 0%, #f8fbff 100%);
}

.envmas-small-note {
  font-size: 10px;
  color: #667085;
  margin-top: 1px;
  line-height: 1.15;
}

/* =========================
   TABLAS INTERNAS
========================= */
.envmas-list-header,
.envmas-list-body,
.envmas-rad-table {
  border: 1px solid #dbe4ee;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.envmas-list-header {
  margin-bottom: 0;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.envmas-list-body {
  border-radius: 0 0 7px 7px;
}

.envmas-list-header table,
.envmas-list-body table,
.envmas-rad-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.envmas-list-header th,
.envmas-list-body th,
.envmas-list-body td,
.envmas-rad-table th,
.envmas-rad-table td {
  border: 1px solid #e8edf5;
  padding: 4px 6px;
  font-size: 10px;
  line-height: 1.08;
  text-align: left;
}

.envmas-list-header th,
.envmas-rad-table th {
  background: #f8fafc;
  color: #475467;
  font-weight: 800;
}

.envmas-list-body tr:nth-child(even),
.envmas-rad-table tr:nth-child(even) {
  background: #fbfdff;
}

.envmas-list-body tr:hover,
.envmas-rad-table tr:hover {
  background: #f5f9ff;
}

/* =========================
   BLOQUES ESPECIFICOS
========================= */
#destinatarios,
#radicados {
  border: 1px solid #dbe4ee;
  border-radius: 7px;
  overflow: auto;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  padding: 0;
}

#destinatarios {
  min-height: 76px;
  max-height: 96px;
}

#radicados {
  min-height: 54px;
  max-height: 74px;
}

#perso {
  border: 1px solid #ffe08a;
  border-radius: 7px;
  background: #fff8e1;
  padding: 6px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

#perso p {
  margin: 0 0 2px 0;
  font-size: 10px;
  line-height: 1.2;
  color: #7a5d00;
}

#perso p:last-child {
  margin-bottom: 0;
}

/* =========================
   ICONOS
========================= */
#img_desc,
#img_carga {
  width: 13px;
  height: 13px;
  vertical-align: middle;
  cursor: pointer;
  opacity: 0.85;
  transition: all 0.16s ease;
  margin-left: 0;
}

#img_desc:hover,
#img_carga:hover {
  opacity: 1;
  transform: none;
}

.envmas-icon-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #d5deea;
  border-radius: 5px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.16s ease;
}

.envmas-icon-btn:hover {
  background: #f7fbff;
  border-color: #bfd2ea;
}

.envmas-icon-btn img {
  margin: 0 !important;
}

/* =========================
   ADJUNTOS
========================= */
#btn_mas_arch {
  min-width: 24px;
  padding: 0 5px;
}

.envmas-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.envmas-file-tool {
  flex: 0 0 auto;
}

.envmas-file-upload-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 420px;
  min-width: 260px;
}

.envmas-file-upload-wrap input[type="file"] {
  flex: 1 1 auto;
  min-width: 220px;
}

.envmas-file-table-wrap {
  margin-top: 6px;
}

#tb_mas_arch {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #dbe4ee;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

#tb_mas_arch th,
#tb_mas_arch td {
  padding: 4px 6px;
  font-size: 10px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

#tb_mas_arch th {
  background: #f8fafc;
  font-weight: 700;
  color: #475467;
}

.envmas-adjuntos-box {
  width: 100%;
}

.envmas-adjuntos-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}

.envmas-btn-plantilla {
  white-space: nowrap;
}

.envmas-upload-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  width: 100%;
}

.envmas-file-input {
  flex: 1;
  min-width: 0;
  padding: 4px;
  box-sizing: border-box;
}

.envmas-btn-mas {
  width: 32px;
  min-width: 32px;
  height: 30px;
  line-height: 26px;
  text-align: center;
  padding: 0;
  font-weight: bold;
  font-size: 16px;
}

.envmas-tabla-adjuntos {
  width: 100%;
  border: 1px solid #cfd8e3;
  background: #f8fafc;
  padding: 0;
}

.envmas-table-files {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.envmas-table-files th {
  background: #eef3f8;
  color: #44556b;
  font-weight: bold;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #cfd8e3;
}

.envmas-table-files td {
  padding: 6px 8px;
  border-bottom: 1px solid #e5eaf0;
  vertical-align: middle;
}

.envmas-col-accion {
  width: 30px;
  text-align: center;
}

/* =========================
   UTILIDADES
========================= */
#btn_ad,
#numdoc2,
#numdoc22 {
  white-space: nowrap;
}

#btn_bdoc {
  margin-left: 2px;
}

iframe#ventana {
  display: none;
}

/* =========================
   MODAL ESPERA
========================= */
.envmas-modal-espera {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  backdrop-filter: blur(2px);
}

.envmas-modal-espera-box {
  width: 250px;
  max-width: calc(100% - 24px);
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.envmas-modal-espera-loader {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px auto;
  border-radius: 50%;
  border: 3px solid #dbeafe;
  border-top: 3px solid #2563eb;
  animation: envmasSpin 0.85s linear infinite;
}

.envmas-modal-espera-title {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 2px;
}

.envmas-modal-espera-text {
  font-size: 10px;
  color: #64748b;
  line-height: 1.2;
}

@keyframes envmasSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 980px) {
  .envmas-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .envmas-card--full {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .envmas-wrap {
    width: 100%;
    font-size: 10px;
  }

  .envmas-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 7px;
  }

  .envmas-card {
    padding: 6px;
  }

  .envmas-table,
  .envmas-table tbody,
  .envmas-table tr,
  .envmas-table td,
  .envmas-participantes-table,
  .envmas-participantes-table tbody,
  .envmas-participantes-table tr,
  .envmas-participantes-table td {
    display: block;
    width: 100%;
  }

  .envmas-table,
  .envmas-participantes-table {
    border-spacing: 0 !important;
  }

  .envmas-table tr,
  .envmas-participantes-table tr {
    margin-bottom: 5px;
    padding-bottom: 2px;
    border-bottom: 1px dashed #e6edf5;
  }

  .envmas-table tr:last-child,
  .envmas-participantes-table tr:last-child {
    border-bottom: 0;
  }

  .envmas-label,
  .etiqueta,
  .envmas-participantes-table .envmas-label {
    width: 100% !important;
    margin-bottom: 3px;
    white-space: normal;
    padding: 0 0 3px 0 !important;
  }

  .envmas-dest-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .envmas-dest-search,
  .envmas-dest-actions {
    width: 100%;
    min-width: 100%;
  }

  .envmas-dest-actions {
    justify-content: flex-start;
  }

  .envmas-searchbox,
  .inputTextCss,
  .textareaCss,
  .textAreaCss,
  .selectCss,
  input[type="file"],
  #autoCompleteInterno,
  #autoCompleteExterno,
  #autoCompleteRemitente,
  #myInput,
  #myInput5 {
    max-width: 100%;
  }

  #destinatarios,
  .envmas-destinatarios-body {
    max-height: 100px !important;
    min-height: 80px !important;
  }

  #radicados {
    max-height: 76px;
  }

  .envmas-file-row {
    flex-direction: column;
    align-items: stretch;
  }

  .envmas-file-upload-wrap {
    width: 100%;
    min-width: 100%;
  }

  .envmas-file-upload-wrap input[type="file"] {
    min-width: 100%;
  }

  .envmas-actions input {
    width: 100%;
    margin: 2px 0;
  }

  #div_mensaje,
  .envmas-note-box,
  .envmas-editor-wrap {
    max-width: 100%;
  }

  .envmas-editor-wrap .ql-formats {
    margin-right: 0 !important;
  }

  .envmas-editor-wrap .ql-editor {
    min-height: 180px;
    padding: 12px 14px;
  }

  .envmas-note-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* =========================
   RESPONSIVE ESPECÍFICO QUILL
========================= */
@media (max-width: 768px) {
  #toolbar_cuerpo.ql-toolbar.ql-snow {
    padding: 6px;
    gap: 1px;
  }

  #toolbar_cuerpo .ql-formats {
    margin-right: 3px !important;
  }

  #editor_cuerpo.ql-container.ql-snow {
    min-height: 220px;
  }

  #editor_cuerpo .ql-editor {
    min-height: 220px;
    max-height: 440px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
  }

  #editor_cuerpo .ql-editor p {
    min-height: 1.5em !important;
    margin-bottom: 9px !important;
  }
}
