.mfn-document-flow-context {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 14px; border:1px solid rgba(45,63,145,.14); border-radius:14px;
  background:#eef2ff; color:var(--mfn-primary); font-size:13px;
}
.mfn-document-flow-context button {
  border:0; background:transparent; color:var(--mfn-primary); cursor:pointer;
  font-size:12px; font-weight:700; text-decoration:underline;
}
.mfn-document-flow-actions { display:flex; flex:0 1 auto; align-items:center; flex-wrap:wrap; gap:8px; }
.mfn-document-flow-actions > div { flex:0 0 auto; }
.mfn-document-flow-actions .dx-button { border-radius:10px; }
.mfn-document-editor { display:flex; flex-direction:column; gap:16px; padding:4px 2px; }
.mfn-document-editor__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.mfn-document-editor__grid > div { min-width:0; }
.mfn-document-editor .dx-fileuploader { border:1px dashed rgba(45,63,145,.36); border-radius:14px; padding:14px; background:#f8f9ff; }
.mfn-document-editor__error { min-height:20px; color:#bb3e3e; font-size:13px; }
#newDocSave, #newVersionSave { align-self:flex-end; }

/* DevExtreme coloca la superficie del popup en una capa propia. Debe ser opaca para que el árbol no se mezcle con el formulario. */
.mfn-document-flow-popup { z-index:2500 !important; }
.mfn-document-flow-popup .dx-overlay-content {
  background:#fff !important; opacity:1 !important;
  border:1px solid rgba(45,63,145,.14); border-radius:18px;
  box-shadow:0 24px 64px rgba(20,32,74,.28); overflow:hidden;
}
.mfn-document-flow-popup .dx-popup-title,
.mfn-document-flow-popup .dx-popup-content {
  background:#fff !important; opacity:1 !important;
}
.mfn-document-flow-popup .dx-popup-title { border-bottom:1px solid #e6e9f4; }

/* [23-nov-2026] Visor: el nombre largo del archivo se corta con "..." y no empuja ni tapa los botones */
.mfn-visor-popup .dx-popup-title .dx-toolbar-before { max-width:45%; overflow:hidden; }
.mfn-visor-popup .dx-popup-title .dx-toolbar-label .dx-toolbar-item-content > div { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mfn-visor-popup .dx-popup-title .dx-toolbar-after .dx-button-text { white-space:nowrap; }

.mfn-guarantee-upload .mfn-upload-preview {
  margin:0; border:1px solid #dfe5f1; border-radius:14px; padding:10px; background:#f7f9fd;
}
.mfn-guarantee-upload .mfn-upload-preview__title {
  margin:0 0 8px; color:var(--mfn-primary); font-size:12px; font-weight:700;
}
.mfn-guarantee-upload .mfn-upload-preview__viewer {
  display:block; width:100%; height:280px; border:0; border-radius:9px; background:#fff;
}

.mfn-guarantee-upload__actions {
  display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap;
}
.mfn-guarantee-upload__actions .dx-button { border-radius:10px; }


.documentFixedGuaranteeContext {
  display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px;
  padding:10px 14px; border:1px solid rgba(45,63,145,.18); border-radius:12px;
  background:#eef2ff; color:var(--mfn-primary); font-size:13px; line-height:1.5;
}
.documentFixedGuaranteeContext strong { font-weight:700; }
.documentFixedGuaranteeContext small { flex-basis:100%; color:var(--mfn-muted); font-size:12px; }

@media (max-width:820px) {
  .mfn-document-flow-context { align-items:flex-start; flex-direction:column; }
  .mfn-document-flow-actions { flex-basis:100%; }
  .mfn-document-flow-actions .dx-button { width:100%; }
  .mfn-document-flow-actions > div { flex:1 1 100%; }
}
@media (max-width:560px) {
  .mfn-document-editor__grid { grid-template-columns:1fr; }
  #newDocSave, #newVersionSave { align-self:stretch; }
}

/* Archivo ya cargado en el dialogo (llego arrastrado) y aviso de version. */
.mfn-document-editor__file{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding:9px 12px;
  border:1px solid #cfd9f0;border-radius:10px;background:#eef3ff;color:#243b91;font-size:13px;font-weight:600;
  overflow-wrap:anywhere}
.mfn-document-editor__file .dx-icon{font-size:16px}
.mfn-document-editor__note{margin-bottom:12px;padding:10px 12px;border-radius:10px;background:#fff7e6;
  border:1px solid #f0dcb0;color:#6b4f16;font-size:13px;line-height:1.45}
