/* TerzaghAI — estilos de los entornos de motor y herramientas (sep-2026)
 * Extraídos de los 28 bloques <style> que vivían inline en TerzaghAI.html: así se
 * cachean 30 días como el resto de assets en vez de viajar sin caché en cada visita.
 * Orden de cascada: este archivo se enlaza DESPUÉS de app.css, que es el orden que
 * tenían los bloques inline. Un bloque por motor, en el mismo orden del HTML. */

/* ══════════ refra ══════════ */
#refra-modal-overlay{display:none;position:fixed;inset:0;background:rgba(10,16,38,.82);z-index:9000;align-items:center;justify-content:center;backdrop-filter:blur(3px);}
#refra-modal-overlay.open{display:flex;}
#refra-modal{background:#ffffff;border:1px solid #e4e8f0;border-radius:14px;width:min(760px,96vw);max-height:90vh;overflow-y:auto;padding:28px 32px 24px;box-shadow:0 20px 60px rgba(0,0,0,.15);position:relative;}
#refra-modal h2{color:#1a2649;margin:0 0 6px;font-size:1.2rem;display:flex;align-items:center;gap:10px;}
#refra-close{position:absolute;top:14px;right:16px;background:none;border:none;color:#56648a;font-size:1.4rem;cursor:pointer;line-height:1;padding:4px 8px;border-radius:6px;}
#refra-close:hover{background:#e4e8f0;color:#1a2649;}
#refra-dropzone{border:2px dashed #e4e8f0;border-radius:10px;padding:22px;text-align:center;color:#56648a;cursor:pointer;margin-bottom:10px;}
#refra-dropzone.drag-over{border-color:#2dd845;background:#f7f9fc;}
#refra-modal .cfg-row{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0;}
#refra-modal .cfg-row label{color:#56648a;font-size:.78rem;display:flex;flex-direction:column;gap:4px;}
#refra-modal .cfg-row input,#refra-modal .cfg-row select{background:#f7f9fc;border:1px solid #e4e8f0;border-radius:6px;color:#1a2649;padding:6px 10px;font-size:.85rem;font-family:inherit;}
#refra-process-btn,#refra-invert-btn{width:100%;padding:11px;border:none;border-radius:8px;background:#2dd845;color:#0f1830;font-weight:700;cursor:pointer;font-family:inherit;font-size:.92rem;margin-top:4px;}
#refra-process-btn:disabled,#refra-invert-btn:disabled{opacity:.45;cursor:not-allowed;}
#refra-error{display:none;background:#fdecec;border:1px solid #f5b5b5;color:#b91c1c;border-radius:8px;padding:9px 12px;font-size:.82rem;margin:10px 0;}
#refra-progress{display:none;text-align:center;color:#56648a;font-size:.85rem;padding:14px;}
#refra-result{display:none;margin-top:14px;}
#refra-plotbox{position:relative;background:#f7f9fc;border:1px solid #e4e8f0;border-radius:8px;overflow:hidden;}
#refra-dromo-box{position:relative;background:#f7f9fc;border:1px solid #e4e8f0;border-radius:8px;overflow:hidden;}
#refra-svg{display:block;width:100%;touch-action:none;}
#refra-hint{color:#56648a;font-size:.75rem;margin:6px 0 10px;}
#refra-tabla{width:100%;border-collapse:collapse;margin:10px 0;font-size:.82rem;color:#1a2649;}
#refra-tabla th,#refra-tabla td{border:1px solid #e4e8f0;padding:5px 9px;text-align:left;}
#refra-tabla th{background:#f7f9fc;color:#56648a;}
.refra-flag{border-left:3px solid #d97706;background:#f7f9fc;border-radius:6px;padding:7px 10px;font-size:.78rem;color:#1a2649;margin:6px 0;line-height:1.5;}
.refra-flag.alta{border-left-color:#dc2626;}
.refra-flag.info{border-left-color:#3b82f6;color:#56648a;}
.refra-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap;}
.refra-actions button{flex:1;min-width:150px;padding:9px;border:1px solid #e4e8f0;border-radius:8px;background:#f7f9fc;color:#1a2649;cursor:pointer;font-family:inherit;font-size:.82rem;}
.refra-actions button:hover{background:#e4e8f0;}

/* ══════════ exp ══════════ */
#exp-modal-overlay{display:none;position:fixed;inset:0;background:rgba(10,16,38,.82);z-index:9000;align-items:center;justify-content:center;backdrop-filter:blur(3px);}
#exp-modal-overlay.open{display:flex;}
#exp-modal{background:#ffffff;border:1px solid #e4e8f0;border-radius:14px;width:min(720px,96vw);max-height:90vh;overflow-y:auto;padding:28px 32px 24px;box-shadow:0 20px 60px rgba(0,0,0,.15);position:relative;}
#exp-modal h2{color:#1a2649;margin:0 0 6px;font-size:1.2rem;display:flex;align-items:center;gap:10px;}
#exp-close{position:absolute;top:14px;right:16px;background:none;border:none;color:#56648a;font-size:1.4rem;cursor:pointer;padding:4px 8px;border-radius:6px;}
#exp-close:hover{background:#e4e8f0;color:#1a2649;}
.exp-sec{background:#f7f9fc;border:1px solid #e4e8f0;border-radius:10px;padding:12px 14px;margin:10px 0;}
.exp-sec h3{margin:0 0 8px;font-size:.85rem;color:#56648a;letter-spacing:.5px;}
.exp-item{display:flex;justify-content:space-between;gap:8px;align-items:flex-start;font-size:.8rem;color:#1a2649;padding:5px 0;border-bottom:1px dashed #e4e8f0;line-height:1.5;}
.exp-item:last-child{border-bottom:none;}
.exp-del{background:none;border:none;color:#56648a;cursor:pointer;font-size:.85rem;padding:0 4px;flex-shrink:0;}
.exp-del:hover{color:#c0392b;}
.exp-proc{color:#56648a;font-size:.72rem;}
#exp-modal .cfg-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;}
#exp-modal .cfg-grid label{color:#56648a;font-size:.74rem;display:flex;flex-direction:column;gap:3px;}
#exp-modal .cfg-grid input{background:#f7f9fc;border:1px solid #e4e8f0;border-radius:6px;color:#1a2649;padding:6px 9px;font-size:.82rem;font-family:inherit;}
.exp-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap;}
.exp-actions button{padding:8px 14px;border:1px solid #e4e8f0;border-radius:8px;background:#f7f9fc;color:#1a2649;cursor:pointer;font-family:inherit;font-size:.8rem;}
.exp-actions button:hover{background:#e4e8f0;}
#exp-vacio{color:#56648a;font-size:.85rem;padding:18px;text-align:center;line-height:1.7;}

/* ══════════ foundaxis ══════════ */
#foundaxis-open-btn{background:none;border:none;cursor:pointer;padding:6px 8px;border-radius:8px;display:inline-flex;align-items:center;transition:background .15s;}
#foundaxis-open-btn:hover{background:#0f1a35;}
#foundaxis-modal-overlay{display:none;position:fixed;inset:0;background:rgba(10,16,38,.82);z-index:9000;align-items:center;justify-content:center;backdrop-filter:blur(3px);}
#foundaxis-modal-overlay.open{display:flex;}
#foundaxis-modal{background:#ffffff;border:1px solid #e4e8f0;border-radius:14px;width:min(760px,96vw);max-height:90vh;overflow-y:auto;padding:28px 32px 24px;box-shadow:0 20px 60px rgba(0,0,0,.15);position:relative;color:#1a2649;}
#foundaxis-modal h2{color:#1a2649;margin:0 0 6px;font-size:1.2rem;display:flex;align-items:center;gap:10px;}
#foundaxis-close{position:absolute;top:14px;right:16px;background:none;border:none;color:#56648a;font-size:1.4rem;cursor:pointer;line-height:1;}
.fx2-subtitle{color:#56648a;font-size:.9rem;margin:0 0 16px;}
#fx2-dropzone{border:2px dashed #e4e8f0;border-radius:12px;padding:22px;text-align:center;color:#56648a;cursor:pointer;transition:border-color .15s,background .15s;}
#fx2-dropzone:hover,#fx2-dropzone.drag-over{border-color:#2dd845;background:#eefdf3;}
#fx2-filelist{font-size:.8rem;color:#56648a;margin-top:8px;word-break:break-word;}
.fx2-primary{margin-top:14px;background:#1B3A6B;color:#fff;border:none;padding:9px 18px;border-radius:9px;font-size:.9rem;font-weight:600;cursor:pointer;}
.fx2-primary:disabled{opacity:.5;cursor:not-allowed;}
.fx2-ghost{margin-top:14px;background:transparent;color:#56648a;border:1px solid #e4e8f0;padding:9px 16px;border-radius:9px;font-size:.9rem;cursor:pointer;}
.fx2-muted{font-size:.82rem;color:#56648a;margin-top:8px;}
.fx2-h{font-weight:700;color:#1a2649;margin:18px 0 6px;font-size:.95rem;}
.fx2-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px;}
.fx2-table{width:100%;border-collapse:collapse;font-size:.8rem;margin-top:8px;}
.fx2-table th{background:#f0f2f7;color:#1a2649;padding:6px 8px;text-align:left;position:sticky;top:0;}
.fx2-table td{border:1px solid #e4e8f0;padding:5px 8px;color:#1a2649;}
.fx2-table input{width:84px;font-size:.8rem;padding:4px 6px;border:1px solid #e4e8f0;border-radius:5px;background:#f7f9fc;color:#1a2649;}
.fx2-warn{background:#fdf3e0;border-left:4px solid #E07B2A;padding:8px 12px;border-radius:6px;font-size:.85rem;margin-bottom:12px;color:#7a5209;}

/* ══════════ granulo ══════════ */
#granulo-open-btn{background:none;border:none;cursor:pointer;font-size:1.2rem;padding:6px 8px;border-radius:8px;color:#7a9cc0;transition:color .15s,background .15s;}
#granulo-open-btn:hover{color:#2dd845;background:#0f1a35;}
#granulo-modal-overlay{display:none;position:fixed;inset:0;background:rgba(10,16,38,.82);z-index:9000;align-items:center;justify-content:center;backdrop-filter:blur(3px);}
#granulo-modal-overlay.open{display:flex;}
#granulo-modal{background:#ffffff;border:1px solid #e4e8f0;border-radius:14px;width:min(680px,96vw);max-height:90vh;overflow-y:auto;padding:28px 32px 24px;box-shadow:0 20px 60px rgba(0,0,0,.15);position:relative;}
#granulo-modal h2{color:#1a2649;margin:0 0 6px;font-size:1.2rem;display:flex;align-items:center;gap:10px;}
#granulo-modal .hvsr-subtitle{color:#56648a;font-size:.82rem;margin:0 0 16px;}
#granulo-close{position:absolute;top:14px;right:16px;background:none;border:none;color:#56648a;font-size:1.4rem;cursor:pointer;line-height:1;padding:4px 8px;border-radius:6px;transition:background .15s;}
#granulo-close:hover{background:#e4e8f0;color:#1a2649;}
/* Aviso fijo, siempre visible */
#granulo-disclaimer{position:sticky;top:0;z-index:2;background:#fdf3e0;border-left:4px solid #E07B2A;color:#7a5209;border-radius:6px;padding:9px 12px;font-size:.82rem;margin-bottom:14px;}
/* Zona de carga de foto (estilo dropzone HVSR) */
#granulo-dropzone{border:2px dashed #e4e8f0;border-radius:10px;padding:26px 20px;text-align:center;cursor:pointer;transition:border-color .2s,background .2s;background:#f7f9fc;margin-bottom:14px;}
#granulo-dropzone:hover,#granulo-dropzone.drag-over{border-color:#2dd845;background:#eefdf3;}
#granulo-dropzone .dz-icon{font-size:2rem;margin-bottom:6px;}
#granulo-dropzone p{color:#1a2649;margin:4px 0;font-size:.9rem;}
#granulo-dropzone small{color:#5a7a99;font-size:.78rem;}
#granulo-tip{background:#eef7fa;border:1px solid #cfe8ee;color:#3a7a8c;border-radius:8px;padding:9px 12px;font-size:.78rem;line-height:1.45;margin-bottom:14px;}
#granulo-tip b{color:#1f6b82;}
.granulo-conf{display:inline-block;padding:2px 9px;border-radius:20px;font-size:.74rem;font-weight:700;}
.granulo-conf.alta{background:#e3f9e6;color:#2dd845;border:1px solid #2dd845;}
.granulo-conf.media{background:#fff6d6;color:#a67a00;border:1px solid #ffcc00;}
.granulo-conf.baja{background:#fdecec;color:#c0392b;border:1px solid #c0392b;}
#granulo-conf-warn{background:#fdf3e0;border-left:3px solid #ffcc00;color:#7a5209;border-radius:6px;padding:7px 12px;font-size:.78rem;margin-top:8px;}
#granulo-preview-wrap{display:none;margin-bottom:14px;text-align:center;}
#granulo-preview{max-width:100%;max-height:240px;border-radius:8px;border:1px solid #e4e8f0;}
#granulo-preview-box{position:relative;display:inline-block;line-height:0;}
#granulo-escala-svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
/* Escala de la foto: el dato sin el cual la medición local no puede existir */
#granulo-escala{background:#f7f9fc;border:1px solid #e4e8f0;border-radius:8px;padding:10px 14px;margin-bottom:14px;font-size:.8rem;color:#56648a;}
#granulo-escala .esc-cab{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:4px;}
#granulo-escala .esc-cab strong{color:#1a2649;font-size:.85rem;}
#granulo-escala-val{color:#1a8f3a;font-weight:600;font-size:.78rem;}
#granulo-escala p{margin:0 0 8px;line-height:1.45;}
#granulo-escala-btn{width:100%;padding:9px;background:#fff;color:#1a8f3a;border:1.5px solid #2dd845;border-radius:8px;cursor:pointer;font-family:inherit;font-weight:600;font-size:.84rem;}
#granulo-escala-btn:hover{background:#eafcee;}
/* Salida del motor morfológico local */
#granulo-cv{display:none;background:#f7f9fc;border-radius:8px;padding:12px 16px;margin-bottom:14px;font-size:.82rem;color:#1a2649;}
#granulo-cv h4{color:#1a2649;margin:0 0 10px;font-size:.85rem;}
#granulo-cv .row{display:flex;justify-content:space-between;gap:12px;padding:3px 0;color:#56648a;}
#granulo-cv .row b{color:#1a2649;font-weight:600;text-align:right;}
#granulo-cv .row small{color:#7a869e;font-weight:400;}
#granulo-cv .cv-uscs{font-weight:800;color:#1a8f3a;letter-spacing:.03em;}
#granulo-cv .cv-nota{color:#7a869e;font-size:.75rem;line-height:1.4;margin-top:6px;}
.granulo-cv-svg{width:100%;height:auto;margin:8px 0 2px;}
#granulo-cv .cv-leyenda{display:flex;align-items:center;gap:6px;font-size:.74rem;color:#7a869e;margin-bottom:8px;}
#granulo-cv .cv-leyenda .ln{display:inline-block;width:18px;height:0;border-top:2px solid #2dd845;}
#granulo-cv .cv-leyenda .ln.masa{border-top-style:dashed;border-top-color:#1a8f3a;margin-left:10px;}
#granulo-cv-warns{list-style:none;padding:0;margin:8px 0 0;}
#granulo-cv-warns li{background:#fdf3e0;border-left:3px solid #ffcc00;color:#7a5209;border-radius:6px;padding:7px 12px;font-size:.78rem;margin-bottom:6px;}
#granulo-cv-sup{margin-top:8px;}
#granulo-cv-sup summary{color:#56648a;font-size:.78rem;cursor:pointer;}
#granulo-cv-sup ul{margin:8px 0 0;padding-left:18px;color:#7a869e;font-size:.75rem;line-height:1.5;}
#granulo-cv-sup li{margin-bottom:5px;}
/* Botones (estilo #hvsr-process-btn) */
.granulo-btn{width:100%;padding:12px;background:#2dd845;color:#1a2649;border:none;border-radius:8px;cursor:pointer;font-weight:700;font-size:1rem;transition:background .15s;margin-bottom:14px;}
.granulo-btn:disabled{background:#1e5a2a;color:#4a8a55;cursor:not-allowed;}
.granulo-btn:not(:disabled):hover{background:#25b839;}
.granulo-btn-alt{background:#fff;color:#1a8f3a;border:1.5px solid #2dd845;}
.granulo-btn-alt:not(:disabled):hover{background:#eafcee;}
.granulo-btn-alt:disabled{background:#f4f6fa;color:#aab3c4;border-color:#e4e8f0;}
#granulo-print-btn{width:100%;margin-top:12px;padding:10px;background:#ffffff;color:#1a8f3a;border:1.5px solid #2dd845;border-radius:8px;cursor:pointer;font-weight:600;font-size:.9rem;transition:background .15s;}
#granulo-print-btn:hover{background:#eafcee;}
#granulo-status{font-size:.84rem;color:#56648a;margin-bottom:12px;min-height:18px;text-align:center;}
/* Bloque "Estimación IA" (estilo .sesame-detail) */
#granulo-ia{display:none;background:#f7f9fc;border-radius:8px;padding:12px 16px;margin-bottom:14px;font-size:.82rem;color:#1a2649;}
#granulo-ia h4{color:#1a2649;margin:0 0 8px;font-size:.85rem;}
#granulo-ia .row{display:flex;justify-content:space-between;gap:12px;padding:2px 0;color:#56648a;}
#granulo-ia .row b{color:#1a2649;font-weight:600;}
/* Atterberg opcional */
#granulo-atterberg{margin-bottom:14px;}
#granulo-atterberg summary{color:#56648a;font-size:.82rem;cursor:pointer;margin-bottom:8px;}
/* Resultado USCS */
#granulo-result{display:none;}
#granulo-code{font-size:1.8rem;font-weight:800;color:#2dd845;text-align:center;letter-spacing:.04em;margin-bottom:4px;}
#granulo-desc{text-align:center;color:#1a2649;font-size:.9rem;margin-bottom:14px;}
#granulo-warns{list-style:none;padding:0;margin:0;}
#granulo-warns li{background:#fdf3e0;border-left:3px solid #ffcc00;color:#7a5209;border-radius:6px;padding:7px 12px;font-size:.8rem;margin-bottom:6px;}
/* Error (estilo #hvsr-error) */
#granulo-error{display:none;background:#fdecec;border:1px solid #f5b5b5;color:#c0392b;border-radius:8px;padding:12px 16px;font-size:.83rem;margin-bottom:12px;}

/* ══════════ campana ══════════ */
#campana-open-btn{background:none;border:none;cursor:pointer;font-size:1.2rem;padding:6px 8px;border-radius:8px;color:#7a9cc0;transition:color .15s,background .15s;}
#campana-open-btn:hover{color:#2dd845;background:#0f1a35;}
#campana-modal-overlay{display:none;position:fixed;inset:0;background:rgba(10,16,38,.82);z-index:9000;align-items:center;justify-content:center;backdrop-filter:blur(3px);}
#campana-modal-overlay.open{display:flex;}
#campana-modal{background:#ffffff;border:1px solid #e4e8f0;border-radius:14px;width:min(680px,96vw);max-height:90vh;overflow-y:auto;padding:28px 32px 24px;box-shadow:0 20px 60px rgba(0,0,0,.15);position:relative;}
#campana-modal h2{color:#1a2649;margin:0 0 6px;font-size:1.2rem;display:flex;align-items:center;gap:10px;}
#campana-modal .hvsr-subtitle{color:#56648a;font-size:.82rem;margin:0 0 16px;}
#campana-close{position:absolute;top:14px;right:16px;background:none;border:none;color:#56648a;font-size:1.4rem;cursor:pointer;line-height:1;padding:4px 8px;border-radius:6px;transition:background .15s;}
#campana-close:hover{background:#e4e8f0;color:#1a2649;}
#campana-form label{display:block;color:#56648a;font-size:.8rem;margin:10px 0 4px;}
#campana-form select,#campana-form input[type=text],#campana-form textarea{width:100%;background:#f7f9fc;border:1px solid #e4e8f0;border-radius:8px;color:#1a2649;padding:9px 11px;font-size:.88rem;font-family:inherit;box-sizing:border-box;}
#campana-form textarea{resize:vertical;min-height:50px;}
#campana-dropzone{border:2px dashed #e4e8f0;border-radius:10px;padding:22px 20px;text-align:center;cursor:pointer;transition:border-color .2s,background .2s;background:#f7f9fc;margin-top:14px;}
#campana-dropzone:hover,#campana-dropzone.drag-over{border-color:#2dd845;background:#eefdf3;}
#campana-dropzone p{color:#1a2649;margin:4px 0;font-size:.9rem;}
#campana-dropzone small{color:#5a7a99;font-size:.78rem;}
#campana-preview-list{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;}
#campana-preview-list img{width:64px;height:64px;object-fit:cover;border-radius:6px;border:1px solid #e4e8f0;}
#campana-status{font-size:.84rem;color:#56648a;margin:10px 0;min-height:18px;text-align:center;}
#campana-gallery{margin-top:18px;border-top:1px solid #e4e8f0;padding-top:14px;}
#campana-gallery h3{color:#1a2649;font-size:.9rem;margin:0;}
#campana-gallery-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:10px;}
#campana-gallery-actions{display:flex;gap:8px;flex-wrap:wrap;}
#campana-gallery-actions .granulo-btn{font-size:.78rem;padding:6px 10px;}
.campana-foto-item{display:flex;align-items:center;gap:10px;background:#f7f9fc;border-radius:8px;padding:8px 10px;margin-bottom:8px;}
.campana-foto-item img{width:48px;height:48px;object-fit:cover;border-radius:6px;flex-shrink:0;cursor:pointer;}
.campana-foto-meta{flex:1;min-width:0;font-size:.78rem;color:#56648a;}
.campana-foto-meta b{color:#1a2649;}
.campana-foto-del{background:none;border:none;color:#c0392b;cursor:pointer;font-size:.85rem;padding:4px 8px;}
.campana-foto-del:hover{background:#fdecec;border-radius:6px;}
#campana-empty{color:#5a7a99;font-size:.82rem;text-align:center;padding:10px;}

/* ══════════ guardados ══════════ */
#guardados-open-btn{background:none;border:none;cursor:pointer;font-size:1.2rem;padding:6px 8px;border-radius:8px;color:#7a9cc0;transition:color .15s,background .15s;}
#guardados-open-btn:hover{color:#2dd845;background:#0f1a35;}
#guardados-modal-overlay{display:none;position:fixed;inset:0;background:rgba(10,16,38,.82);z-index:9000;align-items:center;justify-content:center;backdrop-filter:blur(3px);}
#guardados-modal-overlay.open{display:flex;}
#guardados-modal{background:#ffffff;border:1px solid #e4e8f0;border-radius:14px;width:min(680px,96vw);max-height:90vh;overflow-y:auto;padding:28px 32px 24px;box-shadow:0 20px 60px rgba(0,0,0,.15);position:relative;}
#guardados-modal h2{color:#1a2649;margin:0 0 6px;font-size:1.2rem;display:flex;align-items:center;gap:10px;}
#guardados-modal .hvsr-subtitle{color:#56648a;font-size:.82rem;margin:0 0 16px;}
#guardados-close{position:absolute;top:14px;right:16px;background:none;border:none;color:#56648a;font-size:1.4rem;cursor:pointer;line-height:1;padding:4px 8px;border-radius:6px;transition:background .15s;}
#guardados-close:hover{background:#e4e8f0;color:#1a2649;}
#guardados-filtro{width:100%;background:#f7f9fc;border:1px solid #e4e8f0;border-radius:8px;color:#1a2649;padding:9px 11px;font-size:.88rem;font-family:inherit;box-sizing:border-box;margin-bottom:14px;}
.guardado-item{display:flex;align-items:center;gap:10px;background:#f7f9fc;border-radius:8px;padding:10px 12px;margin-bottom:8px;}
.guardado-meta{flex:1;min-width:0;font-size:.8rem;color:#56648a;}
.guardado-meta b{color:#1a2649;}
.guardado-acciones{display:flex;gap:6px;flex-shrink:0;}
.guardado-acciones button{background:#f0f2f7;border:1px solid #e4e8f0;color:#1a2649;cursor:pointer;font-size:.78rem;padding:6px 9px;border-radius:6px;}
.guardado-acciones button:hover{background:#e4e8f0;}
.guardado-acciones .guardado-del{color:#c0392b;}
.guardado-acciones .guardado-del:hover{background:#fdecec;}
#guardados-empty{color:#5a7a99;font-size:.82rem;text-align:center;padding:10px;}

/* ══════════ talud ══════════ */
  #talud-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #talud-modal-overlay.open { display: flex; }
  #talud-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(900px, 96vw); max-height: 92vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #talud-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #talud-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 16px; }
  #talud-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #talud-close:hover { background: #e4e8f0; color: #1a2649; }
  .talud-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .talud-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; display:flex; align-items:center; gap:8px; }
  .talud-rows-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
  .talud-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 5px; font-size: .72rem; }
  .talud-rows-tbl td { padding: 3px 5px; color: #1a2649; }
  .talud-rows-tbl input, .talud-rows-tbl select {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 6px; font-size: .8rem; width: 100%; min-width: 50px;
  }
  .talud-rows-tbl input:focus, .talud-rows-tbl select:focus { outline: none; border-color: #2dd845; }
  .talud-rows-tbl input:disabled { opacity: .35; }
  .talud-rows-tbl .talud-row-del { background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 5px; border-radius: 5px; }
  .talud-rows-tbl .talud-row-del:hover { background: #fdecec; color: #c0392b; }
  #talud-methods { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 4px; }
  #talud-methods label { display: inline-flex; align-items: center; gap: 6px; color: #1a2649; font-size: .82rem; cursor: pointer; }
  #talud-methods input[type=checkbox] { accent-color: #2dd845; width: 15px; height: 15px; }
  .talud-svg-wrap { background: #0b1430; border: 1px solid #2a3d6b; border-radius: 8px; margin-top: 8px; overflow: hidden; }
  .talud-svg-wrap svg { display: block; width: 100%; height: auto; }
  .talud-svg-legend { font-size: .72rem; color: #56648a; padding: 4px 10px 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .talud-svg-legend span::before { content: ""; display: inline-block; width: 12px; height: 0; vertical-align: middle; margin-right: 5px; border-top-width: 3px; border-top-style: solid; }
  .talud-lg-deep::before  { border-top-color: #ff5a5a !important; }
  .talud-lg-surf::before  { border-top-color: #ffb24d !important; }
  .talud-lg-anchor::before{ border-top-color: #2dd845 !important; }
  .talud-lg-water::before { border-top-color: #4da6ff !important; border-top-style: dashed !important; }
  #talud-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #talud-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #talud-process-btn:not(:disabled):hover { background: #25b839; }
  #talud-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #talud-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #talud-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #talud-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #talud-result h3:first-child { margin-top: 0; }
  #talud-fs-tbl, #talud-refres-tbl { width: 100%; border-collapse: collapse; font-size: .78rem; }
  #talud-fs-tbl th, #talud-refres-tbl th { color: #56648a; text-align: right; font-weight: 600; padding: 4px 7px; border-bottom: 1px solid #e4e8f0; }
  #talud-fs-tbl th:first-child, #talud-refres-tbl th:first-child { text-align: left; }
  #talud-fs-tbl td, #talud-refres-tbl td { padding: 4px 7px; color: #1a2649; text-align: right; }
  #talud-fs-tbl td:first-child, #talud-refres-tbl td:first-child { text-align: left; }
  #talud-diag, #talud-warnings { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }
  #talud-warnings { color: #9a5a1f; border-color: #e8c9a0; background: #fdf3e0; }
  .talud-mini-note { color: #56648a; font-size: .76rem; }

  /* ── FEM (elementos finitos): mismo look del modal de taludes, acento violeta ── */
  #fem-modal-overlay { display:none; position:fixed; inset:0; background:rgba(10,16,38,.82); z-index:9000; align-items:center; justify-content:center; backdrop-filter:blur(3px); }
  #fem-modal-overlay.open { display:flex; }
  #fem-modal { background:#ffffff; border:1px solid #e4e8f0; border-radius:14px; width:min(900px,96vw); max-height:92vh; overflow-y:auto; padding:26px 30px 22px; box-shadow:0 20px 60px rgba(0,0,0,.15); position:relative; }
  #fem-modal h2 { color:#1a2649; margin:0 0 6px; font-size:1.2rem; display:flex; align-items:center; gap:10px; }
  #fem-modal .licuef-subtitle { color:#56648a; font-size:.82rem; margin:0 0 16px; }
  #fem-close { position:absolute; top:14px; right:16px; background:none; border:none; color:#56648a; font-size:1.4rem; cursor:pointer; line-height:1; padding:4px 8px; border-radius:6px; transition:background .15s; }
  #fem-close:hover { background:#e4e8f0; color:#1a2649; }
  #fem-process-btn { width:100%; padding:12px; background:#b46bf0; color:#141b38; border:none; border-radius:8px; cursor:pointer; font-weight:700; font-size:1rem; transition:background .15s; margin-top:14px; }
  #fem-process-btn:disabled { background:#4a2a6b; color:#8a6ab0; cursor:not-allowed; }
  #fem-process-btn:not(:disabled):hover { background:#a355e6; }
  #fem-error { display:none; color:#c0392b; background:#fdecec; border:1px solid #f0b8b8; border-radius:8px; padding:9px 12px; font-size:.82rem; margin-top:12px; }
  #fem-spinner { display:none; color:#56648a; font-size:.85rem; margin-top:12px; text-align:center; }
  #fem-result { display:none; margin-top:18px; border-top:1px solid #e4e8f0; padding-top:16px; }
  #fem-result h3 { color:#1a2649; font-size:.95rem; margin:14px 0 6px; }
  #fem-result h3:first-child { margin-top:0; }
  #fem-lamina-img { max-width:100%; border-radius:8px; border:1px solid #e4e8f0; display:block; background:#fff; }
  #fem-warnings { font-size:.8rem; color:#9a5a1f; background:#fdf3e0; border:1px solid #e8c9a0; border-radius:8px; padding:9px 12px; margin-top:10px; display:none; }

/* ══════════ licuef ══════════ */
  #licuef-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #licuef-modal-overlay.open { display: flex; }
  #licuef-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(760px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #licuef-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #licuef-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #licuef-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #licuef-close:hover { background: #e4e8f0; color: #1a2649; }
  .licuef-toggle { display: inline-flex; border: 1px solid #e4e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
  .licuef-toggle button {
    background: #f7f9fc; color: #56648a; border: none; padding: 8px 22px; cursor: pointer; font-size: .9rem; font-weight: 600; transition: background .15s, color .15s;
  }
  .licuef-toggle button.active { background: #2dd845; color: #1a2649; }
  #licuef-rows-tbl { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: 4px; }
  #licuef-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 6px; font-size: .76rem; }
  #licuef-rows-tbl td { padding: 3px 6px; color: #1a2649; }
  #licuef-rows-tbl input {
    background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 8px; font-size: .82rem; width: 100%;
  }
  #licuef-rows-tbl input:focus { outline: none; border-color: #2dd845; }
  #licuef-rows-tbl .licuef-row-del {
    background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 6px; border-radius: 5px;
  }
  #licuef-rows-tbl .licuef-row-del:hover { background: #fdecec; color: #c0392b; }
  #licuef-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #licuef-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #licuef-process-btn:not(:disabled):hover { background: #25b839; }
  #licuef-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #licuef-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #licuef-result h3 { color: #1a2649; font-size: .95rem; margin: 0 0 8px; }
  .licuef-metrics { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
  .licuef-metric { border: 1px solid #e4e8f0; border-radius: 8px; padding: 8px 14px; text-align: center; background: #f7f9fc; min-width: 96px; }
  .licuef-metric .val { font-size: 1.15rem; font-weight: 800; color: #2dd845; }
  .licuef-metric .lbl { font-size: .7rem; color: #56648a; margin-top: 2px; }
  #licuef-perfil-tbl { width: 100%; border-collapse: collapse; font-size: .78rem; }
  #licuef-perfil-tbl th { color: #56648a; text-align: right; font-weight: 600; padding: 3px 6px; border-bottom: 1px solid #e4e8f0; }
  #licuef-perfil-tbl td { padding: 3px 6px; color: #1a2649; text-align: right; }
  #licuef-perfil-tbl td.lic { color: #c0392b; font-weight: 700; }
  .licuef-out-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
  .licuef-out-actions button {
    flex: 1; min-width: 150px; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .88rem; border: 1px solid #e4e8f0; background: #f7f9fc; color: #1a2649; transition: border-color .15s, color .15s;
  }
  .licuef-out-actions button:hover { border-color: #2dd845; color: #2dd845; }
  #licuef-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }

/* ══════════ fundacion ══════════ */
  #fundacion-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #fundacion-modal-overlay.open { display: flex; }
  #fundacion-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #fundacion-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #fundacion-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #fundacion-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #fundacion-close:hover { background: #e4e8f0; color: #1a2649; }
  #fundacion-rows-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
  #fundacion-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 5px; font-size: .72rem; }
  #fundacion-rows-tbl td { padding: 3px 5px; color: #1a2649; }
  #fundacion-rows-tbl input {
    background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 6px; font-size: .8rem; width: 100%; min-width: 52px;
  }
  #fundacion-rows-tbl input:focus { outline: none; border-color: #2dd845; }
  #fundacion-rows-tbl .fund-row-del { background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 5px; border-radius: 5px; }
  #fundacion-rows-tbl .fund-row-del:hover { background: #fdecec; color: #c0392b; }
  #fundacion-adv-toggle { background: none; border: none; color: #56648a; cursor: pointer; font-size: .78rem; padding: 6px 0; text-decoration: underline; }
  #fundacion-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #fundacion-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #fundacion-process-btn:not(:disabled):hover { background: #25b839; }
  #fundacion-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #fundacion-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #fundacion-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #fundacion-result h3 { color: #1a2649; font-size: .95rem; margin: 0 0 8px; }
  #fundacion-cross, #fundacion-modo { margin-top: 14px; border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; background: #f7f9fc; font-size: .82rem; color: #1a2649; }
  #fundacion-modo .mf-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 700; font-size: .76rem; }
  #fundacion-cross .cc-bar { height: 10px; border-radius: 5px; background: #e4e8f0; position: relative; margin: 8px 0 4px; }
  #fundacion-cross .cc-band { position: absolute; top: 0; bottom: 0; background: #2a6b3a; border-radius: 5px; }
  #fundacion-cross .cc-mark { position: absolute; top: -3px; width: 3px; height: 16px; background: #d99a00; border-radius: 2px; }

/* ══════════ mejoramiento ══════════ */
  #mejoramiento-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #mejoramiento-modal-overlay.open { display: flex; }
  #mejoramiento-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(760px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #mejoramiento-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #mejoramiento-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #mejoramiento-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #mejoramiento-close:hover { background: #e4e8f0; color: #1a2649; }
  #mejoramiento-modal select, #mejoramiento-modal input[type="text"] {
    background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 7px 10px; font-size: .85rem; width: 100%;
  }
  #mejoramiento-restricciones { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
  #mejoramiento-restricciones label { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: #1a2649; font-weight: 500; cursor: pointer; }
  #mejoramiento-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 18px;
  }
  #mejoramiento-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #mejoramiento-process-btn:not(:disabled):hover { background: #25b839; }
  #mejoramiento-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #mejoramiento-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #mejoramiento-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #mejoramiento-result h3 { color: #1a2649; font-size: .95rem; margin: 0 0 8px; }
  #mejoramiento-sistemas { display: flex; flex-direction: column; gap: 8px; }
  .mej-sys { border: 1px solid #e4e8f0; border-radius: 10px; padding: 10px 14px; }
  .mej-sys-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .mej-sys-nombre { font-weight: 700; color: #1a2649; font-size: .88rem; }
  .mej-badge { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
  .mej-badge.recomendado { background: #d9f7dd; color: #1e7a2e; }
  .mej-badge.posible { background: #fdf1cf; color: #92700a; }
  .mej-badge.no_recomendado { background: #eef0f5; color: #56648a; }
  .mej-badge.no_evaluado { background: #eef0f5; color: #8a93a8; font-style: italic; }
  .mej-sys.no_recomendado, .mej-sys.no_evaluado { opacity: .6; }
  .mej-sys-rango { font-size: .76rem; color: #2dd845; font-weight: 600; margin-top: 2px; }
  .mej-sys-meta { font-size: .74rem; color: #56648a; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
  .mej-sys-costo { font-weight: 700; color: #1a2649; letter-spacing: .5px; }
  .mej-sys-razon { font-size: .8rem; color: #4a5776; margin-top: 4px; line-height: 1.4; }
  #mejoramiento-supuestos { margin-top: 14px; border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; background: #f7f9fc; font-size: .78rem; color: #56648a; }
  #mejoramiento-supuestos li { margin: 2px 0; }
  #mejoramiento-cross { display: none; margin-top: 14px; border: 1px solid #cfe3cf; border-radius: 8px; padding: 10px 12px; background: #f3faf3; font-size: .82rem; color: #1a2649; }
  #mejoramiento-cross b { color: #1e7a2e; }

/* ══════════ pilote ══════════ */
  #pilote-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #pilote-modal-overlay.open { display: flex; }
  #pilote-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(840px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #pilote-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #pilote-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #pilote-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #pilote-close:hover { background: #e4e8f0; color: #1a2649; }
  #pilote-rows-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
  #pilote-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 5px; font-size: .72rem; }
  #pilote-rows-tbl td { padding: 3px 5px; color: #1a2649; }
  #pilote-rows-tbl input, #pilote-rows-tbl select {
    background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 6px; font-size: .8rem; width: 100%; min-width: 56px;
  }
  #pilote-rows-tbl input:focus, #pilote-rows-tbl select:focus { outline: none; border-color: #2dd845; }
  #pilote-rows-tbl input:disabled { opacity: .35; }
  #pilote-rows-tbl .pil-row-del { background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 5px; border-radius: 5px; }
  #pilote-rows-tbl .pil-row-del:hover { background: #fdecec; color: #c0392b; }
  #pilote-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #pilote-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #pilote-process-btn:not(:disabled):hover { background: #25b839; }
  #pilote-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #pilote-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #pilote-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #pilote-result h3 { color: #1a2649; font-size: .95rem; margin: 0 0 8px; }
  #pilote-perfil-tbl { width: 100%; border-collapse: collapse; font-size: .78rem; margin-top: 6px; }
  #pilote-perfil-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 3px 6px; border-bottom: 1px solid #e4e8f0; }
  #pilote-perfil-tbl td { padding: 3px 6px; color: #1a2649; }
  #pilote-diag { margin-top: 12px; font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; }

/* ══════════ terraplen ══════════ */
  #terraplen-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #terraplen-modal-overlay.open { display: flex; }
  #terraplen-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(840px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #terraplen-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #terraplen-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #terraplen-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #terraplen-close:hover { background: #e4e8f0; color: #1a2649; }
  .terraplen-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .terraplen-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #terraplen-rows-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
  #terraplen-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 5px; font-size: .72rem; }
  #terraplen-rows-tbl td { padding: 3px 5px; color: #1a2649; }
  #terraplen-rows-tbl input, #terraplen-rows-tbl select {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 6px; font-size: .8rem; width: 100%; min-width: 54px;
  }
  #terraplen-rows-tbl input:focus, #terraplen-rows-tbl select:focus { outline: none; border-color: #2dd845; }
  #terraplen-rows-tbl input:disabled { opacity: .35; }
  #terraplen-rows-tbl .tpl-row-del { background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 5px; border-radius: 5px; }
  #terraplen-rows-tbl .tpl-row-del:hover { background: #fdecec; color: #c0392b; }
  #terraplen-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #terraplen-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #terraplen-process-btn:not(:disabled):hover { background: #25b839; }
  #terraplen-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #terraplen-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #terraplen-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #terraplen-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #terraplen-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }
  #terraplen-sub-tbl { width: 100%; border-collapse: collapse; font-size: .76rem; }
  #terraplen-sub-tbl th { color: #56648a; text-align: right; font-weight: 600; padding: 3px 6px; border-bottom: 1px solid #e4e8f0; }
  #terraplen-sub-tbl td { padding: 3px 6px; color: #1a2649; text-align: right; }

/* ══════════ consolidacion ══════════ */
  #consolidacion-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #consolidacion-modal-overlay.open { display: flex; }
  #consolidacion-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(840px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #consolidacion-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #consolidacion-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #consolidacion-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #consolidacion-close:hover { background: #e4e8f0; color: #1a2649; }
  .consolidacion-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .consolidacion-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #consolidacion-rows-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
  #consolidacion-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 5px; font-size: .72rem; }
  #consolidacion-rows-tbl td { padding: 3px 5px; color: #1a2649; }
  #consolidacion-rows-tbl input, #consolidacion-rows-tbl select {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 6px; font-size: .8rem; width: 100%; min-width: 54px;
  }
  #consolidacion-rows-tbl input:focus, #consolidacion-rows-tbl select:focus { outline: none; border-color: #2dd845; }
  #consolidacion-rows-tbl input:disabled { opacity: .35; }
  #consolidacion-rows-tbl .cns-row-del { background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 5px; border-radius: 5px; }
  #consolidacion-rows-tbl .cns-row-del:hover { background: #fdecec; color: #c0392b; }
  #consolidacion-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #consolidacion-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #consolidacion-process-btn:not(:disabled):hover { background: #25b839; }
  #consolidacion-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #consolidacion-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #consolidacion-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #consolidacion-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #consolidacion-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }
  #consolidacion-curva-tbl { width: 100%; border-collapse: collapse; font-size: .76rem; }
  #consolidacion-curva-tbl th { color: #56648a; text-align: right; font-weight: 600; padding: 3px 6px; border-bottom: 1px solid #e4e8f0; }
  #consolidacion-curva-tbl td { padding: 3px 6px; color: #1a2649; text-align: right; }

/* ══════════ losa ══════════ */
  #losa-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #losa-modal-overlay.open { display: flex; }
  #losa-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(760px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #losa-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #losa-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #losa-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #losa-close:hover { background: #e4e8f0; color: #1a2649; }
  .losa-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .losa-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #losa-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #losa-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #losa-process-btn:not(:disabled):hover { background: #25b839; }
  #losa-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #losa-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #losa-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #losa-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #losa-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ roca ══════════ */
  #roca-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #roca-modal-overlay.open { display: flex; }
  #roca-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(760px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #roca-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #roca-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #roca-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #roca-close:hover { background: #e4e8f0; color: #1a2649; }
  .roca-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .roca-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #roca-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #roca-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #roca-process-btn:not(:disabled):hover { background: #25b839; }
  #roca-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #roca-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #roca-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #roca-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #roca-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ tunel ══════════ */
  #tunel-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #tunel-modal-overlay.open { display: flex; }
  #tunel-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #tunel-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #tunel-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #tunel-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #tunel-close:hover { background: #e4e8f0; color: #1a2649; }
  #tunel-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #tunel-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #tunel-process-btn:not(:disabled):hover { background: #25b839; }
  #tunel-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #tunel-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #tunel-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #tunel-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #tunel-diag { font-size: .8rem; color: #b45309; margin-top: 10px; }
  /* El croquis de sección es cuadrado-ish: sin tope, un modal ancho lo estira a media
     pantalla y empuja el botón de calcular fuera de la vista. */
  #tunel-svg-in { max-height: 320px; }

/* ══════════ rplana (roca estructural, 15-sep-2026) ══════════ */
  #rplana-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #rplana-modal-overlay.open { display: flex; }
  #rplana-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #rplana-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #rplana-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #rplana-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #rplana-close:hover { background: #e4e8f0; color: #1a2649; }
  #rplana-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #rplana-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #rplana-process-btn:not(:disabled):hover { background: #25b839; }
  #rplana-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #rplana-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #rplana-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #rplana-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #rplana-diag { font-size: .8rem; color: #b45309; margin-top: 10px; }
  #rplana-svg-in { max-height: 320px; }

/* ══════════ rcuna (roca estructural, 15-sep-2026) ══════════ */
  #rcuna-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #rcuna-modal-overlay.open { display: flex; }
  #rcuna-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #rcuna-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #rcuna-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #rcuna-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #rcuna-close:hover { background: #e4e8f0; color: #1a2649; }
  #rcuna-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #rcuna-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #rcuna-process-btn:not(:disabled):hover { background: #25b839; }
  #rcuna-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #rcuna-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #rcuna-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #rcuna-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #rcuna-diag { font-size: .8rem; color: #b45309; margin-top: 10px; }
  #rcuna-svg-in { max-height: 320px; }

/* ══════════ rcaida (roca estructural, 15-sep-2026) ══════════ */
  #rcaida-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #rcaida-modal-overlay.open { display: flex; }
  #rcaida-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #rcaida-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #rcaida-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #rcaida-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #rcaida-close:hover { background: #e4e8f0; color: #1a2649; }
  #rcaida-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #rcaida-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #rcaida-process-btn:not(:disabled):hover { background: #25b839; }
  #rcaida-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #rcaida-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #rcaida-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #rcaida-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #rcaida-diag { font-size: .8rem; color: #b45309; margin-top: 10px; }
  #rcaida-svg-in { max-height: 320px; }

/* ══════════ expansivo ══════════ */
  #expansivo-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #expansivo-modal-overlay.open { display: flex; }
  #expansivo-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(860px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #expansivo-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #expansivo-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #expansivo-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #expansivo-close:hover { background: #e4e8f0; color: #1a2649; }
  .expansivo-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .expansivo-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #expansivo-rows-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
  #expansivo-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 5px; font-size: .72rem; }
  #expansivo-rows-tbl td { padding: 3px 5px; color: #1a2649; }
  #expansivo-rows-tbl input {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 6px; font-size: .8rem; width: 100%; min-width: 50px;
  }
  #expansivo-rows-tbl input:focus { outline: none; border-color: #2dd845; }
  #expansivo-rows-tbl .exp-row-del { background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 5px; border-radius: 5px; }
  #expansivo-rows-tbl .exp-row-del:hover { background: #fdecec; color: #c0392b; }
  #expansivo-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #expansivo-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #expansivo-process-btn:not(:disabled):hover { background: #25b839; }
  #expansivo-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #expansivo-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #expansivo-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #expansivo-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #expansivo-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }
  #expansivo-clas-tbl { width: 100%; border-collapse: collapse; font-size: .76rem; }
  #expansivo-clas-tbl th { color: #56648a; text-align: right; font-weight: 600; padding: 3px 6px; border-bottom: 1px solid #e4e8f0; }
  #expansivo-clas-tbl td { padding: 3px 6px; color: #1a2649; text-align: right; }

/* ══════════ socavacion ══════════ */
  #socavacion-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #socavacion-modal-overlay.open { display: flex; }
  #socavacion-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #socavacion-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #socavacion-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #socavacion-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #socavacion-close:hover { background: #e4e8f0; color: #1a2649; }
  .socavacion-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .socavacion-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
  .socavacion-sub.off .hvsr-config-row { opacity: .35; pointer-events: none; }
  #socavacion-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #socavacion-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #socavacion-process-btn:not(:disabled):hover { background: #25b839; }
  #socavacion-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #socavacion-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #socavacion-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #socavacion-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #socavacion-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ filtracion ══════════ */
  #filtracion-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #filtracion-modal-overlay.open { display: flex; }
  #filtracion-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #filtracion-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #filtracion-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #filtracion-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #filtracion-close:hover { background: #e4e8f0; color: #1a2649; }
  .filtracion-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .filtracion-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
  .filtracion-sub.off .hvsr-config-row { opacity: .35; pointer-events: none; }
  #filtracion-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #filtracion-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #filtracion-process-btn:not(:disabled):hover { background: #25b839; }
  #filtracion-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #filtracion-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #filtracion-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #filtracion-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #filtracion-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ anclaje ══════════ */
  #anclaje-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #anclaje-modal-overlay.open { display: flex; }
  #anclaje-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(760px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #anclaje-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #anclaje-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #anclaje-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #anclaje-close:hover { background: #e4e8f0; color: #1a2649; }
  .anclaje-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .anclaje-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #anclaje-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #anclaje-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #anclaje-process-btn:not(:disabled):hover { background: #25b839; }
  #anclaje-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #anclaje-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #anclaje-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #anclaje-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #anclaje-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ pavimento ══════════ */
  #pavimento-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #pavimento-modal-overlay.open { display: flex; }
  #pavimento-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #pavimento-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #pavimento-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #pavimento-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #pavimento-close:hover { background: #e4e8f0; color: #1a2649; }
  .pavimento-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .pavimento-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #pavimento-rows-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
  #pavimento-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 5px; font-size: .72rem; }
  #pavimento-rows-tbl td { padding: 3px 5px; color: #1a2649; }
  #pavimento-rows-tbl input {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 6px; font-size: .8rem; width: 100%; min-width: 54px;
  }
  #pavimento-rows-tbl input:focus { outline: none; border-color: #2dd845; }
  #pavimento-rows-tbl .pav-row-del { background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 5px; border-radius: 5px; }
  #pavimento-rows-tbl .pav-row-del:hover { background: #fdecec; color: #c0392b; }
  #pavimento-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #pavimento-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #pavimento-process-btn:not(:disabled):hover { background: #25b839; }
  #pavimento-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #pavimento-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #pavimento-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #pavimento-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #pavimento-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ pillat ══════════ */
  #pillat-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #pillat-modal-overlay.open { display: flex; }
  #pillat-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #pillat-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #pillat-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #pillat-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #pillat-close:hover { background: #e4e8f0; color: #1a2649; }
  .pillat-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .pillat-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
  .pillat-sub.off .hvsr-config-row { opacity: .35; pointer-events: none; }
  #pillat-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #pillat-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #pillat-process-btn:not(:disabled):hover { background: #25b839; }
  #pillat-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #pillat-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #pillat-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #pillat-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #pillat-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ sitio ══════════ */
  #sitio-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #sitio-modal-overlay.open { display: flex; }
  #sitio-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(820px, 96vw); max-height: 90vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #sitio-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #sitio-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #sitio-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #sitio-close:hover { background: #e4e8f0; color: #1a2649; }
  .sitio-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .sitio-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #sitio-rows-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
  #sitio-rows-tbl th { color: #56648a; text-align: left; font-weight: 600; padding: 4px 5px; font-size: .72rem; }
  #sitio-rows-tbl td { padding: 3px 5px; color: #1a2649; }
  #sitio-rows-tbl input {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 5px 6px; font-size: .8rem; width: 100%; min-width: 54px;
  }
  #sitio-rows-tbl input:focus { outline: none; border-color: #2dd845; }
  #sitio-rows-tbl .sit-row-del { background: none; border: none; color: #56648a; cursor: pointer; font-size: .95rem; padding: 2px 5px; border-radius: 5px; }
  #sitio-rows-tbl .sit-row-del:hover { background: #fdecec; color: #c0392b; }
  #sitio-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #sitio-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #sitio-process-btn:not(:disabled):hover { background: #25b839; }
  #sitio-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #sitio-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #sitio-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #sitio-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #sitio-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ muro ══════════ */
  #muro-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #muro-modal-overlay.open { display: flex; }
  #muro-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(860px, 96vw); max-height: 92vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #muro-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #muro-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #muro-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #muro-close:hover { background: #e4e8f0; color: #1a2649; }
  .muro-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .muro-sub > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  #muro-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #muro-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #muro-process-btn:not(:disabled):hover { background: #25b839; }
  #muro-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #muro-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #muro-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #muro-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #muro-result h3:first-child { margin-top: 0; }
  #muro-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }
  #muro-warnings { display: none; font-size: .8rem; color: #9a5a1f; background: #fdf3e0; border: 1px solid #e8c9a0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ pantalla ══════════ */
  #pantalla-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #pantalla-modal-overlay.open { display: flex; }
  #pantalla-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(860px, 96vw); max-height: 92vh; overflow-y: auto;
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #pantalla-modal h2 { color: #1a2649; margin: 0 0 6px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
  #pantalla-modal .licuef-subtitle { color: #56648a; font-size: .82rem; margin: 0 0 18px; }
  #pantalla-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none; color: #56648a;
    font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background .15s;
  }
  #pantalla-close:hover { background: #e4e8f0; color: #1a2649; }
  .pantalla-sub { border: 1px solid #e4e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f7f9fc; }
  .pantalla-sub > div.tt, #pantalla-anclaje-wrap > div.tt { color: #56648a; font-size: .78rem; font-weight: 600; margin-bottom: 6px; }
  .pantalla-anclaje-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 6px; }
  .pantalla-anclaje-row label { color: #1a2649; font-size: .8rem; display: flex; flex-direction: column; gap: 3px; }
  .pantalla-anclaje-row input { background: #ffffff; border: 1px solid #e4e8f0; border-radius: 6px; color: #1a2649; padding: 6px 10px; font-size: .85rem; width: 110px; }
  .pantalla-anclaje-rm { background: #fdecec; border: 1px solid #e0a0a0; border-radius: 6px; color: #c0392b; padding: 5px 9px; font-size: .8rem; cursor: pointer; }
  .pantalla-anclaje-rm:hover { background: #f8d7d7; }
  #pantalla-process-btn {
    width: 100%; padding: 12px; background: #2dd845; color: #1a2649; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 1rem; transition: background .15s; margin-top: 14px;
  }
  #pantalla-process-btn:disabled { background: #1e5a2a; color: #4a8a55; cursor: not-allowed; }
  #pantalla-process-btn:not(:disabled):hover { background: #25b839; }
  #pantalla-error { display: none; color: #c0392b; background: #fdecec; border: 1px solid #e0a0a0; border-radius: 8px; padding: 9px 12px; font-size: .82rem; margin-top: 12px; }
  #pantalla-spinner { display: none; color: #56648a; font-size: .85rem; margin-top: 12px; text-align: center; }
  #pantalla-result { display: none; margin-top: 18px; border-top: 1px solid #e4e8f0; padding-top: 16px; }
  #pantalla-result h3 { color: #1a2649; font-size: .95rem; margin: 14px 0 6px; }
  #pantalla-result h3:first-child { margin-top: 0; }
  #pantalla-diag { font-size: .8rem; color: #1a2649; background: #f7f9fc; border: 1px solid #e4e8f0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }
  #pantalla-warnings { display: none; font-size: .8rem; color: #9a5a1f; background: #fdf3e0; border: 1px solid #e8c9a0; border-radius: 8px; padding: 9px 12px; margin-top: 10px; }

/* ══════════ tsf ══════════ */
  #tsf-modal-overlay { display:none; position:fixed; inset:0; background:rgba(10,16,38,.82); z-index:9000; align-items:center; justify-content:center; backdrop-filter:blur(3px); }
  #tsf-modal-overlay.open { display:flex; }
  #tsf-modal { background:#ffffff; border:1px solid #e4e8f0; border-radius:14px; width:min(900px,96vw); max-height:92vh; overflow-y:auto; padding:26px 30px 22px; box-shadow:0 20px 60px rgba(0,0,0,.15); position:relative; }
  #tsf-modal h2 { color:#1a2649; margin:0 0 6px; font-size:1.2rem; display:flex; align-items:center; gap:10px; }
  #tsf-modal .licuef-subtitle { color:#56648a; font-size:.82rem; margin:0 0 16px; }
  #tsf-close { position:absolute; top:14px; right:16px; background:none; border:none; color:#56648a; font-size:1.4rem; cursor:pointer; line-height:1; padding:4px 8px; border-radius:6px; transition:background .15s; }
  #tsf-close:hover { background:#e4e8f0; color:#1a2649; }
  #tsf-modal select, #tsf-modal input[type=number] {
    background:#f7f9fc; border:1px solid #e4e8f0; border-radius:6px; color:#1a2649; padding:6px 10px; font-size:.85rem; width:100%;
  }
  #tsf-modal select:focus, #tsf-modal input[type=number]:focus { outline:none; border-color:#d99a3f; }
  .tsf-fields { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:10px 14px; }
  .tsf-fields label { color:#56648a; font-size:.8rem; display:flex; flex-direction:column; gap:4px; }
  .tsf-grupo { margin-top:12px; }
  .tsf-grupo > .gt { color:#56648a; font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; margin-bottom:6px; }
  #tsf-process-btn { width:100%; padding:12px; background:#d99a3f; color:#2b1d08; border:none; border-radius:8px; cursor:pointer; font-weight:700; font-size:1rem; transition:background .15s; margin-top:14px; }
  #tsf-process-btn:disabled { background:#5a4526; color:#8a7550; cursor:not-allowed; }
  #tsf-process-btn:not(:disabled):hover { background:#c98a30; }
  #tsf-error { display:none; color:#c0392b; background:#fdecec; border:1px solid #f0b8b8; border-radius:8px; padding:9px 12px; font-size:.82rem; margin-top:12px; }
  #tsf-spinner { display:none; color:#56648a; font-size:.85rem; margin-top:12px; text-align:center; }
  #tsf-result { display:none; margin-top:18px; border-top:1px solid #e4e8f0; padding-top:16px; }
  #tsf-result h3 { color:#1a2649; font-size:.95rem; margin:14px 0 6px; }
  #tsf-result h3:first-child { margin-top:0; }
  #tsf-mec-tbl { width:100%; border-collapse:collapse; font-size:.78rem; }
  #tsf-mec-tbl th { color:#56648a; text-align:left; font-weight:600; padding:4px 7px; border-bottom:1px solid #e4e8f0; }
  #tsf-mec-tbl td { padding:6px 7px; color:#1a2649; vertical-align:top; }
  #tsf-brechas, #tsf-avisos { font-size:.8rem; color:#1a2649; background:#f7f9fc; border:1px solid #e4e8f0; border-radius:8px; padding:9px 12px; margin-top:10px; }
  #tsf-brechas { display:none; color:#9a5a1f; border-color:#e8c9a0; background:#fdf3e0; }
  #tsf-avisos { display:none; }
  #tsf-lem-result { display:none; margin-top:16px; border-top:1px dashed #e4e8f0; padding-top:14px; }
  #tsf-lem-warnings { display:none; font-size:.8rem; color:#9a5a1f; background:#fdf3e0; border:1px solid #e8c9a0; border-radius:8px; padding:9px 12px; margin-top:10px; }
  .tsf-chip { display:inline-flex; align-items:center; padding:2px 9px; border-radius:999px; font-size:.7rem; font-weight:700; white-space:nowrap; }
  .tsf-chip-good { background:#e3f9e6; color:#2dd845; }
  .tsf-chip-warn { background:#fdf3e0; color:#9a5a1f; }
  .tsf-chip-bad  { background:#fdecec; color:#c0392b; }

/* ══════════ peligro ══════════ */
  #peligro-modal-overlay { display:none; position:fixed; inset:0; background:rgba(10,16,38,.82); z-index:9000; align-items:center; justify-content:center; backdrop-filter:blur(3px); }
  #peligro-modal-overlay.open { display:flex; }
  #peligro-modal { background:#ffffff; border:1px solid #e4e8f0; border-radius:14px; width:min(900px,96vw); max-height:92vh; overflow-y:auto; padding:26px 30px 22px; box-shadow:0 20px 60px rgba(0,0,0,.15); position:relative; }
  #peligro-modal h2 { color:#1a2649; margin:0 0 6px; font-size:1.2rem; display:flex; align-items:center; gap:10px; }
  #peligro-modal .licuef-subtitle { color:#56648a; font-size:.82rem; margin:0 0 16px; }
  #peligro-close { position:absolute; top:14px; right:16px; background:none; border:none; color:#56648a; font-size:1.4rem; cursor:pointer; line-height:1; padding:4px 8px; border-radius:6px; transition:background .15s; }
  #peligro-close:hover { background:#e4e8f0; color:#1a2649; }
  #peligro-modal input[type=text] {
    width:100%; background:#f7f9fc; border:1px solid #e4e8f0; border-radius:6px; color:#1a2649; padding:7px 9px; font-size:.85rem; box-sizing:border-box;
  }
  #peligro-modal input[type=text]:focus { outline:none; border-color:#4d9fff; }
  .peligro-fields { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:10px 14px; }
  .peligro-fields label { color:#56648a; font-size:.8rem; display:flex; flex-direction:column; gap:4px; }
  .peligro-grupo { margin-top:12px; }
  .peligro-grupo > .gt { color:#56648a; font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; margin-bottom:6px; }
  #peligro-process-btn { width:100%; padding:12px; background:#4d9fff; color:#08213a; border:none; border-radius:8px; cursor:pointer; font-weight:700; font-size:1rem; transition:background .15s; margin-top:14px; }
  #peligro-process-btn:disabled { background:#274a6b; color:#5c7a95; cursor:not-allowed; }
  #peligro-process-btn:not(:disabled):hover { background:#3d8ae6; }
  #peligro-error { display:none; color:#c0392b; background:#fdecec; border:1px solid #f0b8b8; border-radius:8px; padding:9px 12px; font-size:.82rem; margin-top:12px; }
  #peligro-spinner { display:none; color:#56648a; font-size:.85rem; margin-top:12px; text-align:center; }
  #peligro-result { display:none; margin-top:18px; border-top:1px solid #e4e8f0; padding-top:16px; }
  #peligro-result h3 { color:#1a2649; font-size:.95rem; margin:14px 0 6px; }
  #peligro-result h3:first-child { margin-top:0; }
  #peligro-uhs-tbl, #peligro-nh-tbl { width:100%; border-collapse:collapse; font-size:.78rem; }
  #peligro-uhs-tbl th, #peligro-nh-tbl th { color:#56648a; text-align:right; font-weight:600; padding:4px 7px; border-bottom:1px solid #e4e8f0; }
  #peligro-uhs-tbl th:first-child, #peligro-nh-tbl th:first-child { text-align:left; }
  #peligro-uhs-tbl td, #peligro-nh-tbl td { padding:4px 7px; color:#1a2649; text-align:right; }
  #peligro-uhs-tbl td:first-child, #peligro-nh-tbl td:first-child { text-align:left; color:#56648a; }
  #peligro-avisos, #peligro-warnings { font-size:.8rem; color:#1a2649; background:#f7f9fc; border:1px solid #e4e8f0; border-radius:8px; padding:9px 12px; margin-top:10px; display:none; }
  #peligro-warnings { color:#9a5a1f; border-color:#e8c9a0; background:#fdf3e0; }

/* ══════════ estrat ══════════ */
  #estrat-modal-overlay { display:none; position:fixed; inset:0; background:rgba(10,16,38,.82); z-index:9000;
    align-items:center; justify-content:center; backdrop-filter:blur(3px); }
  #estrat-modal-overlay.open { display:flex; }
  #estrat-modal { background:#fff; border-radius:14px; width:min(1040px,96vw); max-height:94vh; overflow:auto;
    padding:20px 22px 26px; position:relative; box-shadow:0 18px 60px rgba(15,24,48,.35); }
  #estrat-modal h2 { display:flex; align-items:center; gap:9px; color:#1a2649; font-size:1.12rem; margin:0 0 4px; }
  #estrat-close { position:absolute; top:12px; right:14px; background:none; border:none; font-size:1.35rem;
    color:#56648a; cursor:pointer; line-height:1; }
  #estrat-modal .est-sec { border:1px solid #e4e8f0; border-radius:10px; padding:12px 13px; margin-top:12px; background:#fbfcfe; }
  #estrat-modal .est-sec > h3 { margin:0 0 9px; font-size:.9rem; color:#1a2649; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  #estrat-modal label { display:flex; flex-direction:column; gap:4px; font-size:.78rem; color:#5a6b8c; }
  #estrat-modal input[type=text], #estrat-modal input[type=date], #estrat-modal select, #estrat-modal textarea {
    background:#fff; border:1px solid #dbe2ee; border-radius:8px; color:#1a2649; padding:9px 10px; font-size:.9rem; font-family:inherit; }
  #estrat-modal .est-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
  .est-chips { display:flex; flex-wrap:wrap; gap:6px; }
  .est-chip { border:1px solid #dbe2ee; background:#fff; color:#42536f; border-radius:999px; padding:7px 12px;
    font-size:.8rem; cursor:pointer; font-family:inherit; }
  .est-chip.on { background:#2dd845; border-color:#2dd845; color:#0f1830; font-weight:700; }
  .est-estrato { border:1px solid #e4e8f0; border-left:5px solid #2dd845; border-radius:10px; padding:11px 12px; margin-bottom:10px; background:#fff; }
  .est-estrato .est-cab { display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
  .est-estrato .est-num { background:#1a2649; color:#fff; border-radius:6px; padding:2px 8px; font-size:.75rem; font-weight:700; }
  .est-mini { background:#eef2f8; border:1px solid #dbe2ee; border-radius:7px; color:#1a2649; padding:7px 11px;
    font-size:.8rem; cursor:pointer; font-family:inherit; font-weight:600; }
  .est-mini.principal { background:#2dd845; border-color:#2dd845; }
  .est-del { background:none; border:none; color:#c0392b; cursor:pointer; font-size:1rem; margin-left:auto; }
  #estrat-result { display:none; margin-top:14px; }
  .est-hallazgo { border-radius:8px; padding:9px 12px; margin-bottom:7px; font-size:.82rem; }
  .est-hallazgo.error { background:#fdecea; border:1px solid #f5b7b1; color:#922b21; }
  .est-hallazgo.aviso { background:#fdf3e0; border:1px solid #e8c9a0; color:#9a5a1f; }
  .est-hallazgo.ok { background:#eaf8ee; border:1px solid #b5e6c3; color:#1a4d2b; }
  .est-barra { height:9px; background:#e4e8f0; border-radius:999px; overflow:hidden; margin:6px 0 3px; }
  .est-barra > i { display:block; height:100%; background:#2dd845; }
  #estrat-guardado { font-size:.74rem; color:#56648a; min-height:14px; }
  @media (max-width:640px) {
    #estrat-modal { padding:14px 12px 20px; width:100vw; max-height:100vh; border-radius:0; }
    #estrat-modal input[type=text], #estrat-modal input[type=date], #estrat-modal select { font-size:16px; padding:11px 10px; }
    .est-chip { padding:9px 14px; font-size:.85rem; }
    .est-mini { padding:10px 14px; }
  }

/* ══════════ verificación de fundación ══════════
   El modal es BLANCO como los demás (#fff / #1a2649). Lleva su propia estructura de
   overlay porque en este archivo cada motor declara la suya: sin `position:fixed` +
   `max-height:90vh` + `overflow-y:auto` el modal se renderiza en el flujo de la página y
   en iOS queda atrapado bajo el body bloqueado, sin poder desplazarse. */
  #verifund-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,16,38,.82); z-index: 9000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
  }
  #verifund-modal-overlay.open { display: flex; }
  #verifund-modal {
    background: #ffffff; border: 1px solid #e4e8f0; border-radius: 14px;
    width: min(860px, 96vw); max-height: 90vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch;          /* inercia de scroll en iOS */
    overscroll-behavior: contain;               /* el scroll no se filtra al fondo */
    padding: 26px 30px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.15); position: relative;
  }
  #verifund-modal h2 { color:#1a2649; margin:0 0 6px; font-size:1.2rem; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
  #verifund-modal .licuef-subtitle { color:#56648a; font-size:.82rem; margin:0 0 16px; }
  #verifund-close {
    position:absolute; top:14px; right:14px; width:30px; height:30px; border:none; border-radius:8px;
    background:#f0f3f8; color:#56648a; font-size:1rem; cursor:pointer; line-height:1;
  }
  #verifund-close:hover { background:#e4e8f0; color:#1a2649; }

  #verifund-modal .verifund-h3 { margin:18px 0 6px; font-size:.9rem; color:#1a2649; font-weight:700;
    border-bottom:1px solid #e4e8f0; padding-bottom:4px; }
  #verifund-modal .verifund-hint { font-weight:400; font-size:.72rem; color:#56648a; margin-left:6px; }
  #verifund-modal .hvsr-config-row { display:flex; gap:12px; flex-wrap:wrap; margin:8px 0; }
  #verifund-modal .hvsr-config-row label { color:#56648a; font-size:.76rem; display:flex; flex-direction:column; gap:4px; }
  #verifund-modal .hvsr-config-row input, #verifund-modal .hvsr-config-row select {
    background:#f7f9fc; border:1px solid #e4e8f0; border-radius:6px; color:#1a2649;
    padding:7px 10px; font-size:.85rem; font-family:inherit; min-width:130px;
  }
  #verifund-modal .verifund-chk { flex-direction:row !important; align-items:center; gap:6px; font-size:.78rem; }
  #verifund-modal .verifund-chk input { width:auto; min-width:0; }

  #verifund-modal .verifund-tabla-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:6px 0 2px; }
  #verifund-modal .verifund-tabla { border-collapse:collapse; width:100%; font-size:.8rem; min-width:430px; }
  #verifund-modal .verifund-tabla th, #verifund-modal .verifund-tabla td {
    border:1px solid #e4e8f0; padding:3px 6px; text-align:center; color:#1a2649; }
  #verifund-modal .verifund-tabla thead th { background:#f0f3f8; color:#56648a; font-weight:700; }
  #verifund-modal .verifund-tabla tbody th { background:#f7f9fc; width:52px; cursor:help; }
  #verifund-modal .verifund-tabla td input {
    width:100%; min-width:58px; box-sizing:border-box; padding:4px; text-align:right;
    font-size:.8rem; font-family:inherit; background:#fff; border:1px solid #e4e8f0; border-radius:4px; color:#1a2649; }

  #verifund-modal .verifund-acciones { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
  #verifund-procesar {
    flex:1 1 200px; padding:12px; background:#2dd845; color:#1a2649; border:none; border-radius:8px;
    cursor:pointer; font-weight:700; font-size:1rem; transition:background .15s; }
  #verifund-procesar:hover { background:#25b839; }
  #verifund-guardar, #verifund-inject {
    padding:12px 16px; background:#f0f3f8; color:#1a2649; border:1px solid #e4e8f0; border-radius:8px;
    cursor:pointer; font-weight:600; font-size:.88rem; }
  #verifund-guardar:hover, #verifund-inject:hover { background:#e4e8f0; }
  #verifund-status { color:#56648a; font-size:.85rem; margin-top:12px; text-align:center; }
  #verifund-resultado { margin-top:14px; }

  #verifund-modal .verifund-veredicto { margin:10px 0; padding:10px 14px; border-radius:8px; font-weight:700; font-size:1.02rem; }
  #verifund-modal .verifund-veredicto span { display:block; font-weight:400; font-size:.75rem; opacity:.9; margin-top:3px; }
  #verifund-modal .verifund-veredicto.verifund-ok { background:#eafaef; color:#1e7d34; border:1px solid #b7e6c4; }
  #verifund-modal .verifund-veredicto.verifund-no { background:#fdecec; color:#c0392b; border:1px solid #e0a0a0; }
  #verifund-modal .verifund-res td { text-align:left; }
  #verifund-modal .verifund-res .verifund-mono { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.7rem; text-align:center; }
  #verifund-modal .verifund-res .verifund-marca { text-align:center; font-weight:700; width:24px; }
  #verifund-modal tr.verifund-ok .verifund-marca { color:#1e7d34; }
  #verifund-modal tr.verifund-no { background:#fdecec; }
  #verifund-modal tr.verifund-no .verifund-marca { color:#c0392b; }
  #verifund-modal tr.verifund-na .verifund-marca { color:#56648a; }
  #verifund-modal .verifund-nota { font-size:.76rem; color:#56648a; margin:8px 0 0; }
  #verifund-modal .verifund-det { margin-top:10px; font-size:.78rem; color:#1a2649; }
  #verifund-modal .verifund-det summary { cursor:pointer; color:#56648a; font-weight:700; }
  #verifund-modal .verifund-det ul { margin:6px 0 0 18px; padding:0; }
  #verifund-modal .verifund-det li { margin:3px 0; line-height:1.35; }
  #verifund-modal .verifund-lamina { display:block; width:100%; margin:14px 0 4px;
    border:1px solid #e4e8f0; border-radius:6px; background:#fff; }

  /* Teléfono: el modal ocupa la pantalla completa y los campos van a una columna.
     Sin esto los 19 <label> en fila obligan a scroll horizontal en un iPhone. */
  @media (max-width:640px) {
    #verifund-modal { box-sizing:border-box;   /* sin esto el padding se suma a 100dvh
                                                  y la barra de acciones queda fuera */
      width:100vw; max-width:100vw; height:100dvh; max-height:100dvh;
      border-radius:0; border:none; padding:18px 14px 22px; }
    #verifund-modal .hvsr-config-row { flex-direction:column; gap:8px; }
    #verifund-modal .hvsr-config-row label { width:100%; }
    /* :not([type=checkbox]) — si no, la casilla se estira al 100% y empuja su texto */
    #verifund-modal .hvsr-config-row input:not([type=checkbox]),
    #verifund-modal .hvsr-config-row select { min-width:0; width:100%; }
    #verifund-modal .verifund-chk { justify-content:flex-start; }
    /* La barra de acciones NO va sticky: sobre un formulario de ~2,6 pantallas tapaba
       los campos al desplazarse. Va al final, que es el flujo natural de arriba abajo. */
    #verifund-modal .verifund-acciones { margin-top:18px; padding-top:12px;
      border-top:1px solid #e4e8f0; }
  }
