.topres-margen{margin:20px 0;background:#fff;border:1px solid #d8e5ef;border-radius:20px;overflow:hidden;color:#153858;min-width:0}.topres-margen-head{background:#153858;color:#fff;padding:22px 24px}.topres-margen-head small{color:#b8d5e9;letter-spacing:.12em;font-size:11px;font-weight:800}.topres-margen-head h3{color:#fff!important;margin:8px 0!important;font-size:24px!important}.topres-margen-head p{color:#dceaf4;margin:0;font-size:14px}.topres-margen-body{padding:24px}.topres-margen-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.topres-margen-item{background:#f3f7fb;border-radius:14px;padding:17px;min-width:0}.topres-margen-item span{display:block;font-size:13px;color:#52697d}.topres-margen-item strong{display:block;font-size:23px;margin-top:10px;overflow-wrap:anywhere}.topres-margen-result{display:flex;justify-content:space-between;gap:16px;align-items:center;background:#e8f7ef;color:#21664e;border-radius:16px;padding:22px;margin-top:18px}.topres-margen-result.negative{background:#fff0f0;color:#a12525}.topres-margen-result strong{font-size:30px}.topres-margen-result small{display:block;margin-top:5px}.topres-margen-secondary{display:flex;gap:20px;flex-wrap:wrap;padding:18px 0;border-bottom:1px solid #e1eaf1;font-size:14px}.topres-margen-note{font-size:13px;color:#52697d;line-height:1.5}.topres-margen-warning{background:#fff5df;color:#805710;border-radius:12px;padding:14px;font-size:14px}.topres-margen details{margin-top:15px}.topres-margen summary{cursor:pointer;font-weight:700}.topres-margen-caja{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}.topres-margen-caja span{display:block;font-size:12px}.topres-margen-caja b{display:block;margin-top:6px}@media(max-width:850px){.topres-margen-grid,.topres-margen-caja{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:440px){.topres-margen-body,.topres-margen-head{padding:17px}.topres-margen-grid{gap:9px}.topres-margen-item{padding:13px}.topres-margen-item strong{font-size:20px}.topres-margen-result{align-items:flex-start;flex-direction:column}.topres-margen-result strong{font-size:27px}}.topres-margen-grid button.topres-margen-item{border:1px solid transparent;color:#153858;text-align:left;font:inherit;cursor:pointer;width:100%;box-shadow:none}.topres-margen-grid button:hover,.topres-margen-grid button:focus-visible{border-color:#167c80;background:#eaf4f8}.topres-margen-item small{display:block;margin-top:9px;color:#167c80;font-size:12px;font-weight:700}#topresMargenDetalle[hidden]{display:none!important}#topresMargenDetalle{position:fixed;z-index:2147483645;top:var(--costes-top,0px);left:var(--costes-left,0px);width:var(--costes-width,100vw);height:var(--costes-height,100dvh);box-sizing:border-box;background:#102c47a8;display:flex;align-items:center;justify-content:center;padding:20px;overscroll-behavior:none;color:#153858}.margen-detalle-dialog{width:760px;max-width:100%;max-height:100%;display:flex;flex-direction:column;background:#f4f7fb;border-radius:20px;overflow:hidden;box-shadow:0 18px 60px #0005}.margen-detalle-dialog>header{position:static!important;display:flex!important;justify-content:space-between;align-items:center;gap:16px;flex:none;background:#153858;color:white;padding:20px!important}.margen-detalle-dialog h2{color:white!important;margin:6px 0!important;font-size:22px!important}.margen-detalle-dialog header small{color:#dceaf4}.margen-detalle-dialog header button{flex:none;background:#fff;color:#153858;border:0;border-radius:10px;padding:12px 18px;font-weight:700;cursor:pointer}.margen-detalle-dialog main{overflow:auto;overscroll-behavior:contain;min-height:0;padding:20px;-webkit-overflow-scrolling:touch}.margen-detalle-total{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:16px;background:#e8f7ef;border-radius:12px;color:#21664e}.margen-detalle-total strong{font-size:24px}.margen-detalle-dialog article{background:white;border:1px solid #d8e5ef;border-radius:14px;padding:18px;margin-top:14px;overflow-wrap:anywhere}.margen-detalle-dialog article h3{margin:0;color:#153858!important}.margen-detalle-dialog article p{margin:8px 0}.margen-detalle-importes{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.margen-detalle-importes span{display:block;color:#52697d;font-size:12px}.margen-detalle-importes b{display:block;margin-top:5px;font-size:20px}@media(max-width:440px){#topresMargenDetalle{padding:10px}.margen-detalle-dialog>header,.margen-detalle-dialog main{padding:14px!important}.margen-detalle-dialog h2{font-size:19px!important}.margen-detalle-total{align-items:flex-start;flex-direction:column}}/* R494: aislamiento frente a estilos globales y capas de la aplicación completa. */html body #topresMargenDetalle{z-index:2147483647!important;inset:auto!important;top:var(--costes-top,0px) !important;left:var(--costes-left,0px) !important;width:var(--costes-width,100vw) !important;height:var(--costes-height,100dvh) !important;transform:none!important;max-height:var(--costes-height,100dvh) !important}html body #topresMargenDetalle .margen-detalle-dialog>header,html body .topres-margen>header.topres-margen-head{position:static!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;z-index:auto!important;height:auto!important;width:auto!important;transform:none!important;margin:0!important;background:#153858!important;box-shadow:none!important;box-sizing:border-box!important;flex:none!important}html body #topresMargenDetalle .margen-detalle-dialog>header{padding:20px!important;min-height:0!important;display:flex!important;flex-wrap:nowrap!important}html body #topresMargenDetalle .margen-detalle-dialog>header>div{min-width:0;flex:1}html body #topresMargenDetalle .margen-detalle-dialog>main{position:static!important;margin:0!important;width:100%!important;max-width:none!important;min-height:0!important;flex:0 1 auto;box-sizing:border-box!important;padding:20px!important}html body #rcSubcontratasModal .topres-margen-grid button.topres-margen-item,html body .topres-margen-grid button.topres-margen-item{background:#f3f7fb!important;color:#153858!important;border:1px solid #d8e5ef!important;text-align:left!important;min-width:0!important;width:100%!important;padding:17px!important;box-shadow:none!important;touch-action:manipulation}html body .topres-margen>header.topres-margen-head{padding:22px 24px!important}@media(max-width:440px){html body #topresMargenDetalle .margen-detalle-dialog>header,html body #topresMargenDetalle .margen-detalle-dialog>main{padding:14px!important}}/* R495: impedir que las reglas generales de botones estrechen el título. */html body #topresMargenDetalle .margen-detalle-dialog>header{gap:16px!important;align-items:center!important;justify-content:space-between!important}html body #topresMargenDetalle .margen-detalle-dialog>header>div{flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important}html body #topresMargenDetalle .margen-detalle-dialog>header>button{flex:0 0 auto!important;width:auto!important;min-width:76px!important;max-width:none!important;white-space:nowrap!important;margin:0!important;padding:12px 18px!important;position:static!important;align-self:center!important;font-size:14px!important;line-height:1.2!important}html body #topresMargenDetalle #margenDetalleTitulo{white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;line-height:1.25!important;margin:6px 0 0!important;font-size:22px!important}html body #topresMargenDetalle header small{display:block!important;line-height:1.4!important}@media(max-width:440px){html body #topresMargenDetalle #margenDetalleTitulo{font-size:19px!important}html body #topresMargenDetalle .margen-detalle-dialog>header>button{padding:11px 13px!important}}/* R513: rentabilidad en ventana flotante desde Centro de gestión. */#topresMargenResumen[hidden]{display:none!important}html body #topresMargenResumen{position:fixed;z-index:2147483644;top:var(--costes-top,0px);left:var(--costes-left,0px);width:var(--costes-width,100vw);height:var(--costes-height,100dvh);box-sizing:border-box;background:#102c47a8;display:flex;align-items:center;justify-content:center;padding:60px 24px 24px;overscroll-behavior:none;color:#153858}html body #topresMargenResumen .margen-resumen-dialog{width:1040px;max-width:100%;max-height:100%;border-radius:20px;overflow:hidden}html body #topresMargenResumen .margen-resumen-dialog>header{position:static!important;inset:auto!important;display:flex!important;width:auto!important;height:auto!important;min-height:0!important;transform:none!important;justify-content:space-between!important;align-items:center!important;gap:16px!important;padding:20px 24px!important;background:#153858!important;color:#fff!important;box-sizing:border-box!important;box-shadow:none!important;flex:none!important}html body #topresMargenResumen .margen-resumen-dialog>header>div{min-width:0;overflow-wrap:anywhere}html body #topresMargenResumen .margen-resumen-dialog>main{position:static!important;margin:0!important;width:100%!important;min-height:0!important;max-width:none!important;flex:0 1 auto!important;padding:20px!important;box-sizing:border-box!important;overflow:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}html body #topresMargenResumen .topres-margen{margin:0}html body #topresMargenResumen .topres-margen-grid button.topres-margen-item{background:#f3f7fb!important;color:#153858!important;text-align:left!important;padding:17px!important;min-width:0!important;width:100%!important;border:1px solid #d8e5ef!important;box-shadow:none!important}@media(max-width:440px){html body #topresMargenResumen{padding:52px 10px 10px}html body #topresMargenResumen .margen-resumen-dialog>header,html body #topresMargenResumen .margen-resumen-dialog>main{padding:14px!important}}html body #panelGestionRC126 .gestion-centro-grid #topresMargenGestion{background:#e9f6f0!important;color:#153858!important;border:1px solid #c4e2d4!important}html body #panelGestionRC126 .gestion-centro-grid #topresMargenGestion strong{color:#153858!important;opacity:1!important}html body #panelGestionRC126 .gestion-centro-grid #topresMargenGestion small{color:#425c76!important;opacity:1!important}html body #panelGestionRC126 .gestion-centro-grid #topresMargenGestion>span{background:linear-gradient(145deg,#2c9c86,#1c7769) !important;color:#fff!important}html body #panelGestionRC126 .gestion-centro-grid #topresMargenGestion::after{background:#d2eee2!important;color:#216b54!important}html body #panelGestionRC126 .gestion-centro-grid #topresMargenGestion:focus-visible{outline:3px solid #216b54!important;outline-offset:3px!important}/* R514: el botón general ancho completo no debe desplazar el título del modal. */html body #topresMargenResumen .margen-resumen-dialog>header>div{flex:1 1 auto!important;min-width:0!important;width:auto!important}html body #topresMargenResumen .margen-resumen-dialog>header>button{flex:0 0 auto!important;width:auto!important;min-width:76px!important;max-width:40%!important;white-space:nowrap!important;margin:0!important;align-self:center!important;padding:12px 18px!important}html body #topresMargenResumen .margen-resumen-dialog>header h2{display:block!important;margin:6px 0 0!important;font-size:24px!important;line-height:1.25!important;color:#fff!important}html body #topresMargenResumen .margen-resumen-dialog>header small{display:block!important;font-size:12px!important;line-height:1.4!important;color:#dceaf4!important}
html body #panelGestionRC126 .gestion-centro-grid #topresMargenGestion[hidden],html body #topresMargenExpediente[hidden]{display:none!important}
