@media(min-width:761px){#workspace .workspace-layout>#tabs{position:sticky!important;top:0!important;align-self:start!important;height:100vh!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}#workspace .workspace-layout{align-items:start!important}.v5 #workspace.admin-layout>header{min-height:84px;padding:8px 20px}.v5 .admin-layout>header .brand{grid-template-columns:180px minmax(0,1fr);gap:10px}.v5 .admin-layout>header .brand img{max-height:66px;object-fit:contain}.v5 .admin-layout>header h1{font-size:21px}.v5 #workspace .statusline{min-height:28px;margin-bottom:7px;padding-bottom:5px}}
.loan-summary td,.loan-summary th{padding:9px 7px;white-space:nowrap}.loan-summary td:last-child{white-space:normal}.loan-editor{max-width:min(1100px,96vw)}.loan-editor [data-proposal]{grid-column:1/-1;max-height:40vh;overflow:auto}.loan-badge{display:inline-block;padding:4px 8px;border-radius:6px;font-weight:650;font-size:12px;background:#edf2f9;color:#163759}.loan-pagada{background:#dcefe4;color:#16582f}.loan-parcial{background:#fff0c4;color:#714e00}.loan-próxima{background:#dceafa;color:#154b7d}.loan-vencida{background:#fae1e1;color:#902222}.loan-preview{width:min(1000px,96vw)}.loan-summary details pre{white-space:pre-wrap;max-width:80vw;overflow:auto}.gl-editor [aria-invalid=true]{outline:2px solid #b52f35;outline-offset:1px}.gl-editor .search-combobox{min-width:190px}.gl-editor .search-combobox select:not(.combo-source){font-size:11px;padding:3px;max-width:130px}

@media(min-width:761px){.v5 .admin-layout>header .premium-logo{min-width:0;width:180px;box-sizing:border-box;padding:7px;gap:7px}.v5 .admin-layout>header .premium-logo svg{width:36px;flex-shrink:0}.v5 .admin-layout>header .premium-logo strong{font-size:14px;line-height:1.12}.v5 .admin-layout>header .premium-logo span{font-size:4.8px}}

/* Scoped to the loan PDF preview: no other report or editor layout changes. */
dialog.gl-dialog.loan-preview{box-sizing:border-box;width:min(1440px,96vw);max-width:96vw;max-height:96vh;padding:16px;overflow:auto}.loan-preview .loan-report-options,.loan-preview .loan-pdf-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0}.loan-preview .loan-pdf-toolbar{background:#edf2f9;border:1px solid #d2dfed;border-radius:8px;padding:8px;color:#102e50}.loan-preview [data-zoom]{min-width:52px;text-align:center;font-variant-numeric:tabular-nums}.loan-preview [data-download]{background:#cba637;color:#102e50;font-weight:650}.loan-preview [data-status]{font-size:12px;margin-left:auto}.loan-preview .loan-pdf-scroll{box-sizing:border-box;width:100%;height:65vh;overflow:auto;overscroll-behavior:contain;background:#dce3ec;border:1px solid #aebfd3;border-radius:8px;scrollbar-gutter:stable}.loan-preview .loan-pdf-pages{box-sizing:border-box;min-width:100%;width:max-content;display:flex;flex-direction:column;align-items:center;gap:16px;padding:12px}.loan-preview .loan-pdf-pages canvas{display:block;max-width:none!important;flex:none;background:white;box-shadow:0 2px 8px #102e5033}.loan-preview [data-loan-viewer]{min-width:0;width:100%}.loan-preview .loan-pdf-scroll:focus-visible{outline:3px solid #cba637;outline-offset:2px}@media(max-width:600px){dialog.gl-dialog.loan-preview{width:98vw;max-width:98vw;padding:10px}.loan-preview .loan-pdf-scroll{height:60vh}.loan-preview .loan-report-options select{min-width:0;max-width:100%}.loan-preview [data-status]{width:100%;margin-left:0}}

/* Contabilidad: keep the shared advanced-invoice header compact and aligned. */
#accountingHost #ac-invoice .invoice-advanced{min-width:0;max-width:100%;margin:0}
#accountingHost #ac-invoice .invoice-advanced>label{display:flex;align-items:center;gap:10px;white-space:normal;overflow-wrap:anywhere;margin:0 0 10px}
#accountingHost #ac-invoice .invoice-advanced input[type=checkbox]{width:18px;min-width:18px;height:18px;min-height:0;flex:0 0 18px;margin:0;padding:0;box-shadow:none}
#accountingHost #ac-invoice .invoice-advanced>.grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px}
#accountingHost #ac-invoice .invoice-advanced .grid>label{display:flex;flex-direction:column;gap:5px;min-width:0}
#accountingHost #ac-invoice .invoice-advanced .search-combobox{width:100%;min-width:0}
#accountingHost #ac-invoice .invoice-advanced [data-identities]{overflow-wrap:anywhere}
#accountingHost #ac-invoice .invoice-advanced [data-iv-status]:empty{display:none}
@media(max-width:700px){#accountingHost #ac-invoice .invoice-advanced>.grid{grid-template-columns:minmax(0,1fr)}}
