:root{color-scheme:light;--ink:#111111;--muted:#53605a;--accent:#17cc5f;--line:#d8e1dc;--surface:#fff;--back:#f5f6f6;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--back)}
*{box-sizing:border-box}body{margin:0}header{background:var(--ink);color:#fff;padding:28px max(20px,calc((100% - 1100px)/2));display:flex;gap:20px;align-items:center;border-bottom:4px solid var(--accent)}header svg{width:46px;height:46px;flex:none;color:var(--accent)}header p{margin:5px 0 0;color:#bec8c1;font-size:14px}header strong{display:block;font-size:26px;font-weight:650;letter-spacing:-.5px}.brand-label{display:block;font-size:11px;font-weight:700;letter-spacing:1.5px;line-height:1.8}header .brand-label{color:var(--accent)}main{max-width:1100px;margin:32px auto;padding:0 24px}h2{font-size:27px;font-weight:650;margin:0 0 8px;letter-spacing:-.6px}h3{font-size:18px;font-weight:650;margin:30px 0 12px}.text-muted,.text-small{color:var(--muted)}.text-small{font-size:13px;line-height:1.6}.viz-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.card{background:var(--surface);padding:22px;border:1px solid var(--line);border-radius:12px}.card:nth-child(2){background:var(--accent);color:#071b0e;border-color:var(--accent)}.card:nth-child(2) .text-small{color:#10361f}.viz-stat-value{font-size:32px;font-weight:650;margin:12px 0;overflow-wrap:anywhere}.tabular-nums{font-variant-numeric:tabular-nums}.viz-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}.form-label{display:block;font-size:14px;font-weight:500;line-height:1.5}.form-control,.form-select{display:block;width:100%;border:1px solid #c3d1c8;border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:16px;min-height:46px;padding:10px 12px;margin-top:7px}.form-control:focus,.form-select:focus{outline:3px solid #a0e7b8;outline-offset:2px}.form-check{display:flex;gap:10px;align-items:center;min-height:44px;font-size:14px}.form-check-input{width:19px;height:19px;accent-color:#079b42}summary{padding:12px 0;cursor:pointer;font-weight:500}details{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:0 0 10px}.table{width:100%;border-collapse:collapse;font-size:14px}.table td,.table th{padding:11px 8px;border-bottom:1px solid var(--line);text-align:left}.table:not(.history-table) tbody tr:nth-last-child(4){font-weight:700}.table .text-end{text-align:right;font-variant-numeric:tabular-nums}textarea.form-control{resize:vertical;min-height:190px}.text-destructive{color:#b02a2a;margin-top:14px}.actions{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.btn{font:inherit;padding:12px 18px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);cursor:pointer;min-height:44px}.btn-primary{background:var(--accent);color:#071b0e;border-color:var(--accent);font-weight:600}.btn:hover{border-color:#079b42}.btn:disabled{opacity:.5;cursor:default}.btn:focus-visible{outline:3px solid #a0e7b8;outline-offset:2px}.btn-small{padding:8px 12px;font-size:13px}footer{max-width:1100px;margin:28px auto 40px;padding:0 24px;color:var(--muted);font-size:13px;line-height:1.6}.note{margin:14px 0 24px;font-size:14px;line-height:1.7}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#sx-energy-detail{margin-top:8px}.history{margin-top:36px;padding-top:28px;border-top:3px solid var(--ink)}.history-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.history-heading h3{margin:4px 0}.history .brand-label{color:#087d37}.count{background:#e2f7e9;color:#12622e;padding:8px 12px;border-radius:20px;font-size:13px}.table-scroll{overflow-x:auto;margin:16px 0}.history-table{min-width:650px}.history-table th{background:#111;color:#fff;font-size:12px}.history-table td{max-width:220px;overflow-wrap:anywhere}.history-table td:nth-child(5),.history-table td:nth-child(6){white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:640px){header{padding:22px 18px}header strong{font-size:23px}main{padding:0 18px;margin-top:24px}.viz-grid{grid-template-columns:1fr;gap:10px}.card{padding:18px}.viz-stat-value{font-size:29px;margin:8px 0}.viz-controls{grid-template-columns:1fr;gap:14px}h2{font-size:23px}.actions .btn{flex:1 1 180px}.table-scroll{max-width:100%}}
@media print{header,footer,details,.viz-controls,.form-check,.note,.actions,.history,#sx-file,#sx-import,#action-status{display:none}body{background:#fff}main{margin:0;padding:0}.card,.card:nth-child(2){background:#fff;color:#000}.card:nth-child(2) .text-small{color:#333}h3{margin-top:16px}textarea{border:0}.table td,.table th{padding:6px}#sx-summary{min-height:220px}}

.model-import{margin:24px 0;padding:22px}.model-import h3{margin-top:0}.model-import details{margin-top:18px}.model-import [hidden]{display:none}.model-import .actions{margin:12px 0}

.file-import{margin:20px 0;padding:20px;border:2px solid #22c55e}.file-import h3{margin-top:0}.file-import [hidden]{display:none}

.quote-settings{margin-top:24px}.quote-sheet{max-width:960px;margin:32px auto;padding:36px;background:white;border:1px solid var(--line);color:#17231b}.quote-sheet[hidden]{display:none}.quote-heading{display:flex;justify-content:space-between;gap:24px;border-bottom:3px solid #17cc5f;padding-bottom:20px}.quote-kicker{font-size:11px;letter-spacing:2px;color:#087d37;font-weight:700}.quote-heading h2{font-size:26px;margin-top:8px}.quote-heading p{font-size:13px;margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}.quote-ident{text-align:right}.quote-ident h1{font-size:23px;margin:0 0 10px;letter-spacing:2px}.quote-ident strong{font-size:13px;overflow-wrap:anywhere}.quote-meta{display:grid;grid-template-columns:1fr 1fr 1fr;gap:22px;margin:22px 0}.quote-meta span{display:block;color:#53605a;font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px}.quote-meta strong{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.quote-sheet h3{font-size:15px;margin:22px 0 10px}.quote-table{width:100%;border-collapse:collapse;font-size:13px}.quote-table th{background:#edf4ef;text-align:left;padding:10px 8px;font-size:11px}.quote-table td{border-bottom:1px solid #d8e1dc;padding:10px 8px;overflow-wrap:anywhere}.quote-table th:not(:first-child),.quote-table td:not(:first-child){text-align:right;white-space:nowrap}.quote-table td:first-child{width:50%}.quote-totals{width:50%;margin:18px 0 20px auto;font-size:13px}.quote-totals>div{display:flex;justify-content:space-between;gap:20px;padding:6px 8px}.quote-grand{border-top:2px solid #17cc5f;margin-top:6px;font-size:20px;padding:12px 8px!important}.quote-totals p{text-align:right;font-size:12px}.quote-tech{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;font-size:12px;line-height:1.6}.quote-small{font-size:10px;line-height:1.5;color:#53605a;overflow-wrap:anywhere}.quote-notes{font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.quote-footer{border-top:1px solid #d8e1dc;margin-top:22px;padding-top:12px;font-size:10px;line-height:1.6;color:#53605a}.quote-cost-table td{padding:5px 8px;font-size:11px}.quote-cost-table tbody tr:nth-last-child(-n+2){font-weight:700}.quote-sheet section[hidden],.quote-sheet p[hidden]{display:none}
@media(max-width:640px){.quote-sheet{margin:20px 10px;padding:18px}.quote-heading{flex-direction:column;gap:12px}.quote-ident{text-align:left}.quote-meta,.quote-tech{grid-template-columns:1fr;gap:12px}.quote-table{font-size:11px}.quote-table th{font-size:10px}.quote-table td,.quote-table th{padding:8px 3px}.quote-totals{width:100%}}
@page{size:A4;margin:14mm}
@media print{body>header,body>main,body>footer{display:none!important}body{background:#fff!important}.quote-sheet,.quote-sheet[hidden]{display:block!important;max-width:none;margin:0;padding:0;border:0}.quote-heading{display:flex;flex-direction:row;gap:24px}.quote-ident{text-align:right}.quote-meta,.quote-tech{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.quote-totals{width:50%}.quote-table{font-size:12px}.quote-table th{font-size:10px}.quote-table td,.quote-table th{padding:8px}.quote-cost-table td{padding:4px 8px;font-size:10px}.quote-heading,.quote-meta,.quote-tech,.quote-totals,.quote-footer,tr{break-inside:avoid}.quote-sheet h3{break-after:avoid}.quote-sheet section[hidden],.quote-sheet p[hidden]{display:none!important}.quote-sheet *{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

.quote-sheet[data-invalid="true"]{display:none!important}

@media screen and (max-width:640px){.quote-table th:not(:first-child){white-space:normal}.quote-table td:first-child{width:35%}.quote-heading h2{font-size:23px}}

.quality-note{padding:12px 16px;border-left:4px solid #17cc5f;background:#edf4ef;font-size:14px;line-height:1.6}.quote-ident h1{overflow-wrap:anywhere;max-width:330px}

.workshop{margin-top:32px;border-top:4px solid #17cc5f;padding-top:24px}.workshop details{margin:18px 0;padding:12px;background:white;border-radius:12px}.workshop details>summary{font-size:18px;font-weight:650}.workshop form{margin:16px 0}.workshop .btn{margin:6px 0}.workshop-heading p{color:var(--muted)}.workshop-tabs{display:flex;flex-wrap:wrap;gap:8px}.workshop-tabs a{padding:10px 14px;background:#e2f7e9;color:#12622e;border-radius:20px;text-decoration:none}.workshop .viz-stat-value{display:block;font-size:24px}.workshop .table-scroll{overflow:auto}.quote-logo{max-width:90px;max-height:90px;object-fit:contain}.quote-heading{border-color:var(--quote-accent,#17cc5f)}.quote-grand{border-color:var(--quote-accent,#17cc5f)}.quote-kicker{color:var(--quote-accent,#087d37)}.quote-sheet [hidden]{display:none!important}.workshop h3{margin-top:20px}.workshop .table td{overflow-wrap:anywhere}@media(max-width:640px){.workshop details{padding:12px 8px}.workshop .table{font-size:12px}.workshop .table td,.workshop .table th{padding:8px 4px}.workshop-tabs a{font-size:13px}.workshop .viz-grid{grid-template-columns:1fr}.quote-heading{flex-wrap:wrap}}@media print{.quote-logo{display:block;max-width:70px;max-height:70px}#quote-current-row[hidden],#quote-unit-row[hidden],#quote-logo[hidden]{display:none!important}}

/* Marca Carlitros3D: logo horizontal legible en pantalla y cotizaciones. */
.brand-logo{width:320px;max-width:100%;height:auto;object-fit:contain;background:#fff;border-radius:12px;padding:10px 14px;flex-shrink:0}.quote-logo{width:185px;max-width:185px;max-height:70px;flex-shrink:0}.quote-heading{flex-wrap:wrap}.quote-ident{margin-left:auto}@media(max-width:640px){body>header{flex-direction:column;align-items:flex-start;gap:12px}.brand-logo{width:290px}.quote-logo{width:180px;max-width:100%}.quote-ident{margin-left:0}}@media print{.quote-logo{width:175px;max-width:175px;max-height:64px}.quote-heading{gap:16px}}
