*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:linear-gradient(180deg,#021321 0%,#031b2c 100%);color:#eef6ff}a{color:inherit;text-decoration:none}.shell{min-height:100vh;padding:18px}.topbar,.panel{border:1px solid rgba(100,180,255,.18);background:linear-gradient(180deg,rgba(7,33,54,.92),rgba(4,24,40,.96));box-shadow:0 18px 40px rgba(0,0,0,.24)}.topbar{border-radius:18px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.route{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:#9ac3eb;font-size:13px;font-weight:700}.route b{color:#fff}.version{font-weight:800;font-size:13px;color:#9fd8ff;border:1px solid rgba(96,178,255,.28);padding:6px 10px;border-radius:999px}.content{display:flex;flex-direction:column;gap:16px}.panel{border-radius:22px;padding:18px}.hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-end}.hero-kicker{display:inline-block;color:#75c6ff;font-size:12px;font-weight:900;letter-spacing:.12em}.hero h1{margin:6px 0 8px;font-size:38px;line-height:1}.hero p{max-width:850px;margin:0;color:#a9c5df;font-size:14px;font-weight:600}.hero-actions{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.hero-actions label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:#93bcde}.select,.input,.textarea{width:100%;border:1px solid rgba(111,176,227,.22);border-radius:14px;background:rgba(5,23,37,.78);color:#fff;padding:12px 14px;font-size:14px;font-weight:700}.textarea{min-height:92px;resize:vertical}.textarea.small{min-height:72px}.btn{border:1px solid rgba(124,188,245,.28);background:rgba(255,255,255,.05);color:#fff;padding:12px 16px;border-radius:14px;font-size:13px;font-weight:800;cursor:pointer}.btn.primary{background:linear-gradient(180deg,#1ba0ff,#1477ff)}.btn.small{padding:10px 14px;border-radius:12px}.workspace{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:16px;align-items:start}.editor-column,.preview-column{display:flex;flex-direction:column;gap:16px}.panel-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:16px}.panel-head.compact{margin-bottom:10px}.panel-head h2{margin:0;font-size:26px}.panel-head p{margin:6px 0 0;color:#9ab9d5;font-size:13px;font-weight:700}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1/-1}.field label,.row-card label{font-size:12px;font-weight:800;color:#8fbce0}.upload-row{display:grid;grid-template-columns:110px minmax(0,1fr) minmax(200px,.9fr) auto;gap:10px;align-items:center}.logo-preview{height:82px;border-radius:16px;border:1px solid rgba(124,188,245,.22);background:rgba(255,255,255,.04);display:flex;align-items:center;justify-content:center;overflow:hidden}.logo-preview img{max-width:100%;max-height:100%;object-fit:contain}.file-input{padding:9px 12px}.save-state{min-height:20px;color:#95d5ff;font-weight:800;font-size:12px}.rows-editor{display:flex;flex-direction:column;gap:12px}.row-card{border:1px solid rgba(104,181,245,.18);border-radius:18px;padding:14px;background:linear-gradient(180deg,rgba(6,28,46,.88),rgba(5,23,37,.88))}.row-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.row-header strong{font-size:16px}.row-type-pill{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;border:1px solid rgba(103,181,245,.28);font-size:11px;font-weight:900;color:#8fd0ff;letter-spacing:.08em}.row-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.row-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.row-grid .full{grid-column:1/-1}.preview-stage{background:rgba(0,0,0,.18);border:1px solid rgba(104,181,245,.14);border-radius:22px;padding:18px;overflow:auto}.sticky-panel{position:sticky;top:16px}.bank-card-preview{position:relative;min-height:980px;padding:32px 34px 42px;border-radius:26px;color:#fff;background:radial-gradient(circle at 20% 15%,rgba(9,90,180,.18),transparent 24%),radial-gradient(circle at 86% 8%,rgba(0,106,255,.2),transparent 26%),linear-gradient(180deg,#01070d 0%,#03121d 45%,#061a28 100%);overflow:hidden}.bank-card-preview::before,.bank-card-preview::after{content:"";position:absolute;left:-8%;right:-8%;height:180px;border-radius:50%;border:2px solid rgba(0,184,255,.36);filter:drop-shadow(0 0 12px rgba(0,184,255,.2))}.bank-card-preview::before{top:-82px;transform:rotate(-4deg)}.bank-card-preview::after{bottom:-108px;transform:rotate(5deg)}.preview-dots{position:absolute;left:-20px;top:20px;width:220px;height:260px;background-image:radial-gradient(rgba(38,140,255,.75) 1.3px,transparent 1.3px);background-size:16px 16px;opacity:.45}.preview-logo{display:flex;align-items:center;justify-content:center;min-height:110px;margin-bottom:8px}.preview-logo img{max-width:270px;max-height:96px;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(0,0,0,.35))}.preview-title{position:relative;text-align:center;margin-bottom:8px}.preview-title .doc-type{display:block;font-size:32px;font-weight:900;letter-spacing:.02em}.preview-title .company{display:block;font-size:30px;font-weight:900;margin-top:4px}.preview-meta{position:relative;text-align:center;margin:8px auto 18px;max-width:92%}.preview-meta .line{font-size:14px;color:#f7fbff;font-weight:600;margin-top:4px}.preview-meta .muted{font-size:12px;color:#cfebff}.preview-table{position:relative;display:flex;flex-direction:column;gap:12px;margin-top:16px}.preview-row{display:grid;grid-template-columns:260px repeat(4,1fr);gap:0;border:2px solid #03baff;border-radius:22px;background:linear-gradient(180deg,rgba(0,0,0,.46),rgba(0,0,0,.3));box-shadow:0 0 0 1px rgba(9,188,255,.08) inset}.preview-row.sinpe{grid-template-columns:260px 1fr 1fr}.preview-brand{padding:22px 24px;display:flex;gap:18px;align-items:center;border-right:2px solid rgba(3,186,255,.86)}.brand-icon{width:54px;height:54px;border-radius:14px;border:2px solid rgba(255,255,255,.84);display:flex;align-items:center;justify-content:center;flex:0 0 auto;position:relative}.brand-icon.bac::before{content:"";width:22px;height:26px;background:linear-gradient(180deg,#fff,#d7ebff);clip-path:polygon(0 12%,44% 0,100% 0,56% 100%,0 88%)}.brand-icon.bn::before{content:"";width:22px;height:30px;background:linear-gradient(180deg,#fff,#d7ebff);clip-path:polygon(18% 0,50% 0,82% 100%,54% 100%)}.brand-icon.sinpe::before{content:"↔";font-size:26px;font-weight:900}.brand-lines strong{display:block;font-size:18px;font-weight:900}.brand-lines span{display:block;margin-top:4px;font-size:11px;color:#c9eaff;font-weight:700}.preview-cell{padding:18px 16px;border-right:2px solid rgba(3,186,255,.86);display:flex;flex-direction:column;justify-content:center;min-width:0}.preview-cell:last-child{border-right:none}.preview-label{font-size:13px;color:#e9f7ff;font-weight:500}.preview-value{font-size:16px;font-weight:900;line-height:1.25;word-break:break-word}.preview-footer{position:relative;margin-top:24px;padding-top:18px;text-align:center;font-size:14px;font-weight:700;color:#d3eeff;border-top:2px solid rgba(0,184,255,.6)}.cr-map{position:absolute;right:26px;bottom:54px;width:176px;height:118px;opacity:.95}.cr-map svg{width:100%;height:100%}.cr-map path{fill:none;stroke:#00afff;stroke-width:2.2}.cr-map circle{fill:#00afff}@media (max-width:1280px){.workspace{grid-template-columns:1fr}.sticky-panel{position:static}.bank-card-preview{min-height:0}}@media (max-width:860px){.hero{align-items:flex-start;flex-direction:column}.form-grid,.row-grid,.row-grid.cols-4{grid-template-columns:1fr}.upload-row{grid-template-columns:1fr}.preview-row,.preview-row.sinpe{grid-template-columns:1fr}.preview-brand,.preview-cell{border-right:none;border-bottom:1px solid rgba(3,186,255,.4)}.preview-cell:last-child{border-bottom:none}.preview-title .doc-type{font-size:26px}.preview-title .company{font-size:22px}.cr-map{position:relative;right:auto;bottom:auto;margin:16px 0 0 auto;width:140px}}
/* v4.2.23 · activos integrados, control de logo y tabla bancaria con ancho útil */
.workspace{grid-template-columns:minmax(520px,.82fr) minmax(760px,1.38fr)}
.range-control{display:grid;grid-template-columns:minmax(210px,1fr) minmax(220px,1.4fr) 72px;gap:14px;align-items:center;margin-top:12px;padding:12px 14px;border:1px solid rgba(104,181,245,.16);border-radius:14px;background:rgba(4,20,33,.5)}
.range-control div{display:flex;flex-direction:column;gap:3px}.range-control strong{font-size:13px}.range-control span{font-size:11px;color:#8fb8d8;font-weight:700}.range-control input[type="range"]{width:100%;accent-color:#19a8ff}.range-control output{justify-self:end;min-width:62px;padding:8px 10px;border-radius:10px;background:rgba(16,128,214,.16);border:1px solid rgba(42,171,255,.25);text-align:center;color:#a6ddff;font-size:13px;font-weight:900}.map-preview{background:linear-gradient(180deg,rgba(0,7,13,.94),rgba(3,19,30,.94))}.map-preview img{max-width:94%;max-height:94%}.asset-empty{color:#85b8e0;font-size:12px;font-weight:800}.row-subtitle{color:#91b9dc;font-size:12px;font-weight:700;margin-top:4px}.row-icon-editor{display:grid;grid-template-columns:72px minmax(180px,1fr) minmax(190px,.9fr) auto;gap:10px;align-items:center;margin-bottom:12px;padding:10px 12px;border-radius:14px;background:rgba(2,14,24,.52);border:1px solid rgba(89,176,244,.14)}.row-icon-preview{width:64px;height:58px;border-radius:12px;background:#01080e;border:1px solid rgba(123,193,247,.22);display:flex;align-items:center;justify-content:center;overflow:hidden}.row-icon-preview img{max-width:82%;max-height:82%;object-fit:contain}.row-icon-preview span{font-size:10px;color:#7aa6c7;font-weight:800}.row-icon-copy{display:flex;flex-direction:column;gap:3px}.row-icon-copy strong{font-size:12px}.row-icon-copy span{font-size:11px;line-height:1.35;color:#8fb7d5;font-weight:700}.preview-stage{padding:16px}.bank-card-preview{min-width:1080px;min-height:850px;padding:28px 30px 38px}.preview-logo{min-height:125px;margin-bottom:0}.preview-logo img{object-fit:contain;filter:drop-shadow(0 8px 18px rgba(0,0,0,.35));transition:width .12s ease,max-height .12s ease}.preview-title{margin-top:0}.preview-title .doc-type{font-size:30px}.preview-title .company{font-size:28px}.preview-meta{margin-bottom:16px}.preview-table{gap:10px;margin-top:14px}.preview-row{grid-template-columns:minmax(245px,1.22fr) minmax(205px,.92fr) minmax(260px,1.35fr) minmax(120px,.62fr) minmax(175px,.89fr);min-height:100px}.preview-row.sinpe{grid-template-columns:minmax(245px,1.1fr) minmax(250px,.9fr) minmax(410px,1.5fr)}.preview-brand{padding:18px 20px;gap:14px}.brand-icon{width:62px;height:62px;border:0;border-radius:10px;background:transparent}.brand-icon-img{display:block;max-width:100%;max-height:100%;object-fit:contain}.brand-lines{min-width:0}.brand-lines strong{font-size:18px;white-space:nowrap}.brand-lines span{font-size:11px;white-space:nowrap}.preview-cell{padding:16px 16px}.preview-label{font-size:12px}.preview-value{font-size:16px;line-height:1.2;white-space:nowrap;word-break:normal;overflow-wrap:normal}.iban-cell .preview-value{font-size:15px}.preview-footer{margin-top:22px;padding-right:190px}.cr-map{right:24px;bottom:22px;width:165px;height:150px;display:flex;align-items:center;justify-content:center}.cr-map img{display:block;max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 0 9px rgba(0,177,255,.22))}
@media (max-width:1500px){.workspace{grid-template-columns:1fr}.sticky-panel{position:static}.preview-stage{overflow:auto}}
@media (max-width:860px){.range-control,.row-icon-editor{grid-template-columns:1fr}.range-control output{justify-self:start}.bank-card-preview{min-width:0}.preview-value,.brand-lines strong,.brand-lines span{white-space:normal}.preview-footer{padding-right:0}.cr-map{position:relative;right:auto;bottom:auto;margin:18px 0 0 auto}}

/* v4.2.24 · SINPE corregido, mapa fuera del cuadro y PDF */
.preview-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sinpe-line{display:grid;grid-template-columns:minmax(0,1fr) 205px;gap:18px;align-items:center}
.preview-row.sinpe{grid-template-columns:minmax(245px,1.04fr) minmax(205px,.76fr) minmax(285px,1.02fr);width:auto;min-width:0}
.sinpe-line .preview-row{min-width:0}
.sinpe-line .cr-map{position:static;right:auto;bottom:auto;width:205px;height:130px;display:flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;overflow:visible}
.sinpe-line .cr-map img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 9px rgba(0,177,255,.22))}
.preview-footer{padding-right:0}
@media (max-width:860px){.sinpe-line{grid-template-columns:1fr}.sinpe-line .cr-map{width:150px;height:110px;margin-left:auto}.preview-actions{width:100%}}


/* v4.2.32 · Solo fondo de la plantilla bancaria: diseño premium azul. */
.bank-card-preview{background:#010914 url("/assets/document-templates/bank-background-premium.png?v=4298000") center/cover no-repeat;}
.bank-card-preview::before,.bank-card-preview::after{display:none!important;}
.preview-dots{display:none!important;}

/* v4.2.56 · etiqueta térmica editable. Preservar tarjeta bancaria. */
[hidden]{display:none !important}
.thermal-logo-preview{background:#fff}.thermal-logo-preview img{max-width:100%;max-height:100%;object-fit:contain}
.readonly-value{display:flex;align-items:center;min-height:42px;background:rgba(22,59,80,.48)}
.preview-stage:has(.thermal-label-preview){display:flex;justify-content:center;align-items:start;overflow:auto;background:rgba(255,255,255,.05)}
.thermal-label-preview{width:378px;min-width:378px;height:378px;min-height:0;display:flex;flex-direction:column;padding:20px 20px 16px;background:#fff;color:#080808;border-radius:0;box-shadow:0 8px 30px rgba(0,0,0,.2);overflow:hidden;font-family:Arial,Helvetica,sans-serif}
.thermal-label-preview .thermal-top{display:flex;justify-content:space-between;align-items:center;gap:12px;height:60px;flex:0 0 60px;border-bottom:2px solid #111;padding-bottom:6px}
.thermal-label-preview .thermal-brand{max-width:60%;height:48px;display:flex;align-items:center;overflow:hidden}
.thermal-label-preview .thermal-brand img{display:block;max-height:47px;object-fit:contain;object-position:left center}
.thermal-label-preview .fallback-logo{font-size:35px;font-weight:900}
.thermal-label-preview .thermal-top-right{text-align:right;font-size:11px;line-height:1.4;flex-shrink:0}
.thermal-label-preview .thermal-top-right span{display:block}
.thermal-label-preview .thermal-piece{border-bottom:1px solid #333;padding:18px 0 12px;min-height:102px}
.thermal-label-preview small{display:block;color:#333;font-size:10px;font-weight:800;letter-spacing:.04em}
.thermal-label-preview .thermal-piece strong{display:block;font-size:35px;line-height:1.1;overflow-wrap:anywhere;margin:4px 0 7px}
.thermal-label-preview .thermal-piece div{font-size:17px;font-weight:700;overflow-wrap:anywhere}
.thermal-label-preview .thermal-specs{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px 0;flex:1;align-content:start}
.thermal-label-preview .thermal-specs b{display:block;font-size:19px;line-height:1.12;margin-top:3px;overflow-wrap:anywhere}
.thermal-label-preview .thermal-quantity{display:flex;align-items:center;justify-content:space-between;border-top:2px solid #111;min-height:45px}
.thermal-label-preview .thermal-quantity b{font-size:18px}.thermal-label-preview .thermal-quantity strong{font-size:42px}
@media(max-width:450px){.thermal-label-preview{transform:scale(.77);transform-origin:top center;margin-bottom:-87px}}
@media(max-width:1450px){.workspace{grid-template-columns:1fr}.sticky-panel{position:static}}
