.smv-universal-surface{position:relative;background:#edf2f6;color:#243b52;min-height:360px;height:100%;max-height:100%;overflow:auto;box-sizing:border-box; font-family:Arial,sans-serif}.smv-universal-toolbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#194979;color:white;padding:8px 12px;font-size:13px}.smv-universal-toolbar button{background:white;color:#194979;border:1px solid #c4d0dc;border-radius:3px;padding:5px 10px;cursor:pointer}.smv-universal-pages{padding:12px;display:flex;flex-direction:column;align-items:center;gap:12px}.smv-universal-page{position:relative;background:white;box-shadow:0 2px 9px #0002;max-width:100%;overflow:hidden}.smv-universal-page canvas{display:block;max-width:100%;height:auto}.smv-universal-text{position:absolute;inset:0;overflow:hidden;line-height:1;opacity:1}.smv-universal-text span,.smv-universal-text br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0 0}.smv-universal-text ::selection{background:rgba(34,110,186,.35)}.smv-universal-error{background:#fff6f3;color:#872e21;padding:14px;margin:12px;border-left:4px solid #b34433}.smv-universal-error a{color:#194979}.smv-universal-page-placeholder{display:flex;align-items:center;justify-content:center;min-height:240px;font-size:13px;color:#566476}@media(max-width:640px){.smv-universal-pages{padding:5px;gap:7px}.smv-universal-toolbar{padding:7px;gap:6px;flex-wrap:wrap}}
/* Institutional shared loading and renderer layout (Design System 1.0.9). */
.smv-universal-surface{width:100%;min-height:420px;min-width:0;}
.smv-universal-surface [data-smv-universal-status]{font-size:12px;font-weight:600;white-space:normal;flex:1;}
.smv-universal-page{isolation:isolate;}
.smv-universal-text{user-select:text;-webkit-user-select:text;pointer-events:auto;}
@media(max-width:600px){.smv-universal-surface{min-height:320px;} .smv-universal-toolbar button{min-width:36px;min-height:36px;}}

/* Design System: controles PDF unificados (1.0.3) */
:root{--smv-pdf-control-height:38px;--smv-pdf-control-font:13px;--smv-pdf-control-radius:4px;--smv-pdf-control-gap:8px}
.smv-universal-toolbar{min-height:50px;gap:10px;font:600 var(--smv-pdf-control-font)/1.3 Roboto,Arial,sans-serif}
.smv-universal-toolbar [data-smv-page-count]{flex:0 0 auto;white-space:nowrap}
.smv-universal-zoom-actions{display:inline-flex;gap:var(--smv-pdf-control-gap);align-items:center;flex:0 0 auto}
.smv-universal-toolbar button[data-smv-zoom-in],.smv-universal-toolbar button[data-smv-zoom-out]{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:0;width:var(--smv-pdf-control-height);height:var(--smv-pdf-control-height);min-width:var(--smv-pdf-control-height);border:1px solid #c5d2df;border-radius:var(--smv-pdf-control-radius);background:#fff;color:transparent;font-size:0;cursor:pointer}
.smv-universal-toolbar button[data-smv-zoom-in]::before,.smv-universal-toolbar button[data-smv-zoom-out]::before{content:'+';position:absolute;left:8px;top:6px;width:16px;height:16px;line-height:14px;border:2px solid #194979;border-radius:50%;color:#194979;font:700 13px/14px Arial,sans-serif;text-align:center;box-sizing:border-box}
.smv-universal-toolbar button[data-smv-zoom-out]::before{content:'−'}
.smv-universal-toolbar button[data-smv-zoom-in]::after,.smv-universal-toolbar button[data-smv-zoom-out]::after{content:'';width:10px;height:2px;background:#194979;position:absolute;left:22px;top:24px;transform:rotate(45deg);border-radius:2px}
.smv-universal-toolbar button:hover,.smv-universal-toolbar button:focus-visible{background:#e8f0f9;outline-offset:2px}
.smv-universal-progress{height:5px;min-width:48px;flex:1 1 70px;max-width:190px;background:rgba(255,255,255,.25);border-radius:10px;overflow:hidden}
.smv-universal-progress-fill{display:block;width:0;height:100%;background:#9bc887;transition:width .2s ease}
.smv-universal-toolbar [data-smv-universal-status]{font-size:12px;font-weight:500;flex:0 1 auto;white-space:nowrap}
/* Botones compartidos: solo cabeceras de los visores, no botones del contenido. */
.smvc-institutional-viewer .smva-viewer-actions :is(button,a):not([data-smva-close]),
.smv-pdf-modal[data-smv-pdf-links-modal] .smv-pdf-modal-actions :is(button,a){display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;min-height:var(--smv-pdf-control-height)!important;min-width:112px!important;padding:7px 12px!important;border:1px solid rgba(255,255,255,.72)!important;border-radius:var(--smv-pdf-control-radius)!important;background:transparent!important;color:#fff!important;font:600 var(--smv-pdf-control-font)/1.25 Roboto,Arial,sans-serif!important;text-decoration:none!important;white-space:nowrap!important;cursor:pointer!important}
.smvc-institutional-viewer .smva-viewer-actions :is(button,a):not([data-smva-close]):hover,
.smv-pdf-modal[data-smv-pdf-links-modal] .smv-pdf-modal-actions :is(button,a):hover{background:rgba(255,255,255,.16)!important}
.smvc-institutional-viewer .smva-viewer-actions :is(button,a):focus-visible,
.smv-pdf-modal[data-smv-pdf-links-modal] .smv-pdf-modal-actions :is(button,a):focus-visible{outline:2px solid #fff;outline-offset:2px}
@media(max-width:640px){.smv-universal-toolbar{flex-wrap:wrap;padding:7px 9px}.smvc-institutional-viewer .smva-viewer-actions :is(button,a):not([data-smva-close]),.smv-pdf-modal[data-smv-pdf-links-modal] .smv-pdf-modal-actions :is(button,a){min-width:0!important;min-height:36px!important;padding:6px 8px!important;font-size:12px!important}}

/* Alertas / Comunicados: Volver y Descargar PDF con el mismo alto y tipografía. */
.smva-viewer-return :is(button,a){box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:38px!important;min-width:150px!important;padding:7px 12px!important;border-radius:4px!important;font:600 13px/1.25 Roboto,Arial,sans-serif!important;white-space:nowrap!important;text-decoration:none!important}
.smva-viewer-return :is(button,a)[hidden]{display:none!important}
@media(max-width:640px){.smva-viewer-return :is(button,a){min-height:36px!important;min-width:0!important;font-size:12px!important}}

/* 1.0.4: institutional placeholder while native frame is kept only as fallback. */
.smv-universal-first-loading{min-height:220px;width:100%;background:#f3f7fa;color:#194979;font:600 13px/1.5 Roboto,Arial,sans-serif;}

/* 1.0.5: SMV Design System — loader shared across every PDF renderer. */
.smv-universal-toolbar{background:#e8edf2!important;color:#194979!important;border-bottom:1px solid #cad4df;min-height:46px;padding:6px 13px;font-weight:700}
.smv-universal-toolbar button{background:#fff;color:#194979}
.smv-universal-loader{position:relative;z-index:2;background:#f6f8fa;border-bottom:1px solid #d8e1e8;padding:13px 16px;color:#194979;font:600 12px/1.4 Roboto,Arial,sans-serif}
.smv-universal-loader-top{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:8px;flex-wrap:wrap}
.smv-universal-loader-track{display:block;overflow:hidden;background:#d7e2ea;border-radius:20px;height:7px;width:100%;margin-bottom:6px}
.smv-universal-loader-track>span{display:block;width:0;height:100%;background:#659b5d;transition:width .2s ease}
.smv-universal-loader [data-smv-loading-percent]{display:block;text-align:right;font-variant-numeric:tabular-nums;color:#38576e}
.smv-universal-surface .smv-universal-zoom-actions button{color:transparent}
.smv-universal-surface .smv-universal-zoom-actions button:focus-visible{outline:2px solid #194979;outline-offset:2px}
.smv-universal-surface [data-smv-page-count]{text-transform:uppercase;font-size:12px;letter-spacing:.02em}
.smv-pdf-modal-title,.smve-viewer-title,.smv-modal-title,.smva-viewer-title{ text-transform:uppercase }
/* Core-aligned actions; preserve native click handlers and special controls */
.smv-pdf-modal .smv-pdf-modal-actions :is(button,a),.smvc-institutional-viewer .smva-viewer-actions :is(button,a):not([data-smva-close]){min-height:38px;box-sizing:border-box;font-size:13px;font-weight:600}
@media(max-width:600px){.smv-universal-loader{padding:10px}.smv-universal-toolbar{padding:6px 8px}.smv-universal-loader-top{gap:5px}}

/* 1.0.6: shared viewer tokens, grey secondary bar, consistent loader and actions. */
:root{--smv-viewer-blue:#194979;--smv-viewer-grey:#e8edf2;--smv-viewer-paper:#edf2f6;--smv-viewer-green:#659b5d;--smv-viewer-button-height:38px;--smv-viewer-font:13px}
.smv-universal-toolbar{background:var(--smv-viewer-grey)!important;color:var(--smv-viewer-blue)!important}
.smv-universal-surface .smv-universal-loader-track>span{background:var(--smv-viewer-green)}
.smv-universal-surface .smv-universal-loader,.smv-fb-loading{font-family:Roboto,Arial,sans-serif}


/* 1.0.7 - common mobile viewer action layout; retain native button event handlers. */
@media (max-width:700px){
  .smv-inv-pdf-head,.smv-fb-modal-head,.smv-pdf-modal-head,.smva-viewer-header,.smvc-institutional-viewer .smva-viewer-head{box-sizing:border-box!important;width:100%;min-width:0;}
  .smv-inv-pdf-head,.smv-fb-modal-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;padding:11px 12px!important;}
  .smv-inv-pdf-head>div:first-child,.smv-fb-modal-head>div:first-child{width:100%!important;min-width:0!important;}
  .smv-inv-pdf-head h2,.smv-fb-modal-head h2{white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.3!important;margin:0!important;}
  .smv-inv-pdf-actions,.smv-fb-head-actions{display:flex!important;width:100%!important;min-width:0!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;flex-wrap:nowrap!important;}
  .smv-inv-pdf-actions :is(a,button):not([data-smv-pdf-close]),.smv-fb-head-actions :is(a,button):not([data-smv-fb-close]){display:inline-flex!important;position:static!important;flex:0 1 auto!important;min-width:0!important;min-height:36px!important;height:36px!important;padding:0 11px!important;box-sizing:border-box!important;white-space:nowrap!important;font:600 12px/1.25 Roboto,Arial,sans-serif!important;border-radius:4px!important;}
  .smv-inv-pdf-actions [data-smv-pdf-close],.smv-fb-head-actions [data-smv-fb-close]{display:inline-flex!important;flex:0 0 38px!important;width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;order:99!important;margin-left:auto!important;padding:0!important;align-items:center!important;justify-content:center!important;position:static!important;}
  /* Repositorio and PDF Links store the close button beside the actions. */
  .smv-pdf-modal-head{display:grid!important;grid-template-columns:minmax(0,1fr) 40px!important;grid-template-areas:'title title' 'actions close'!important;gap:8px!important;align-items:center!important;padding:10px 12px!important;}
  .smv-pdf-modal-head .smv-pdf-modal-copy{grid-area:title!important;min-width:0!important;width:100%!important;}
  .smv-pdf-modal-head .smv-pdf-modal-actions{grid-area:actions!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;width:auto!important;min-width:0!important;order:unset!important;flex-wrap:wrap!important;}
  .smv-pdf-modal-head .smv-pdf-modal-actions :is(a,button){min-width:0!important;min-height:36px!important;height:36px!important;box-sizing:border-box!important;padding:0 10px!important;font:600 12px/1.25 Roboto,Arial,sans-serif!important;white-space:nowrap!important;}
  .smv-pdf-modal-head .smv-pdf-modal-close{grid-area:close!important;justify-self:end!important;align-self:center!important;position:static!important;margin:0!important;width:38px!important;min-width:38px!important;height:38px!important;}
}
@media(max-width:360px){
  .smv-inv-pdf-actions :is(a,button):not([data-smv-pdf-close]),.smv-fb-head-actions :is(a,button):not([data-smv-fb-close]){padding:0 8px!important;font-size:11px!important;}
  .smv-pdf-modal-head .smv-pdf-modal-actions :is(a,button){padding:0 7px!important;font-size:11px!important;}
}

/* 1.0.8: Busqueda contextual, visible solo si el PDF contiene texto extraible. */
.smv-universal-find[hidden],.smv-universal-find-panel[hidden]{display:none!important}
.smv-universal-find{display:inline-flex;align-items:center;gap:6px;min-width:0;margin-left:auto}
.smv-universal-find-panel{display:inline-flex;align-items:center;gap:5px;min-width:0}
.smv-universal-toolbar .smv-universal-find button{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;min-height:32px;min-width:32px;padding:2px 6px;font:700 19px/1 Arial,sans-serif}
.smv-universal-find input{box-sizing:border-box;width:clamp(105px,18vw,240px);min-width:0;height:32px;padding:5px 8px;border-radius:3px;border:1px solid #b8c7d6;background:#fff;color:#19374e;font:400 13px Arial,sans-serif}
.smv-universal-find [data-smv-find-count]{font:600 11px Arial,sans-serif;white-space:nowrap}
.smv-universal-find-highlight{position:absolute;pointer-events:none;background:rgba(255,204,20,.43);box-shadow:inset 0 0 0 1px rgba(168,112,0,.35);z-index:2}
@media(max-width:650px){.smv-universal-find{order:3;margin-left:0;flex:1 1 100%}.smv-universal-find-panel{flex:1}.smv-universal-find input{flex:1;width:100%}.smv-universal-toolbar [data-smv-page-count]{margin-right:auto}}

/* 1.0.9 - Buscador contextual visible: icono + entrada + resultados. */
.smv-universal-toolbar .smv-universal-find [data-smv-find-toggle]{display:inline-flex;align-items:center;gap:6px;padding:4px 9px!important;min-width:75px;color:#194979!important;font:600 12px Arial,sans-serif!important;background:#fff!important}
.smv-universal-toolbar .smv-universal-find [data-smv-find-toggle] svg{display:block;flex-shrink:0}
.smv-universal-toolbar .smv-universal-find [data-smv-find-close]{font-size:18px!important}
.smv-universal-find-highlight.is-current{background:rgba(255,140,0,.65);box-shadow:inset 0 0 0 1px rgba(130,62,0,.8)}
@media(max-width:650px){.smv-universal-find{min-width:100%;width:100%;flex-wrap:wrap}.smv-universal-find-panel{width:100%;flex:1 1 100%}.smv-universal-find input{flex:1;min-width:80px}}

/* 1.0.10 - Buscador abierto en escritorio/tablet; lupa plegable solo en movil. */
@media(min-width:768px){
 .smv-universal-toolbar .smv-universal-find [data-smv-find-toggle],
 .smv-universal-toolbar .smv-universal-find [data-smv-find-close]{display:none!important}
 .smv-universal-find-panel:not([hidden]){display:inline-flex!important}
 .smv-universal-find input{width:clamp(160px,24vw,330px)}
}
@media(max-width:767px){
 .smv-universal-find{order:3;min-width:auto;width:auto;flex:0 0 auto;margin-left:auto}
 .smv-universal-toolbar .smv-universal-find [data-smv-find-toggle]{min-width:35px;padding:4px 7px!important}
 .smv-universal-find .smv-find-label{display:none}
 .smv-universal-find-panel:not([hidden]){width:100%;flex:1 1 100%}
 .smv-universal-find:has(.smv-universal-find-panel:not([hidden])){min-width:100%;width:100%;flex-wrap:wrap}
}

/* 1.0.13: Ventana única controlada por SMV Visor Universal. */
.smv-universal-document-modal{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:12px;box-sizing:border-box}
.smv-universal-document-backdrop{position:absolute;inset:0;background:rgba(12,25,40,.78)}
.smv-universal-document-dialog{position:relative;display:flex;flex-direction:column;width:min(1500px,98vw);height:min(920px,96dvh);min-height:260px;background:#edf2f6;border-radius:4px;overflow:hidden;box-shadow:0 15px 55px #0007}
.smv-universal-document-head{background:#194979;color:#fff;padding:8px 14px;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-sizing:border-box}
.smv-universal-document-title{font:700 15px/1.35 Roboto,Arial,sans-serif;min-width:0;overflow-wrap:anywhere;text-transform:uppercase}
.smv-universal-document-actions{display:flex;align-items:center;gap:9px;flex:0 0 auto}
.smv-universal-document-actions a,.smv-universal-document-actions button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:38px;padding:7px 12px;border:1px solid #b5cce3;border-radius:2px;background:transparent;color:#fff;text-decoration:none;font:600 12px/1.3 Roboto,Arial,sans-serif;cursor:pointer}
.smv-universal-document-actions a:hover,.smv-universal-document-actions button:hover{background:#ffffff24;color:#fff}
.smv-universal-document-actions .smv-universal-document-close{border-radius:50%;min-width:42px;width:42px;height:42px;font-size:25px;padding:0}
.smv-universal-document-body{position:relative;min-height:0;flex:1;overflow:hidden}
.smv-universal-document-frame{display:block;border:0;width:100%;height:100%;background:#edf2f6}
.smv-universal-document-body>.smv-universal-surface{height:100%!important;max-height:100%;overflow:auto}
@media(max-width:700px){.smv-universal-document-modal{padding:0}.smv-universal-document-dialog{width:100%;height:100dvh;border-radius:0}.smv-universal-document-head{flex-direction:column;align-items:stretch;padding:9px 10px;gap:7px}.smv-universal-document-title{font-size:12px}.smv-universal-document-actions{width:100%;gap:5px}.smv-universal-document-actions a,.smv-universal-document-actions button{font-size:11px;min-height:36px;padding:6px 8px}.smv-universal-document-actions .smv-universal-document-close{margin-left:auto;min-width:36px;width:36px;height:36px}}

/* 1.0.14: acciones del modal sin enlaces PDF decorables por otros plugins. */
.smv-universal-document-head .smv-universal-document-actions>button{
  appearance:none!important;-webkit-appearance:none!important;
  position:static!important;display:inline-flex!important;
  align-items:center!important;justify-content:center!important;
  flex:0 0 auto;white-space:nowrap!important;line-height:1.3!important;
  background-image:none!important;text-indent:0!important;
  color:#fff!important;opacity:1!important;visibility:visible!important;
}
.smv-universal-document-head .smv-universal-document-actions>button::before,
.smv-universal-document-head .smv-universal-document-actions>button::after{
  content:none!important;display:none!important;
}
.smv-universal-document-head .smv-universal-document-actions .smv-universal-document-close{
  flex:0 0 42px!important;
}
@media(max-width:700px){
 .smv-universal-document-head .smv-universal-document-actions .smv-universal-document-close{flex-basis:36px!important}
}
