@font-face{font-family:LegalCondensed;src:url('/assets/RobotoCondensed-400.woff');font-weight:400}@font-face{font-family:LegalCondensed;src:url('/assets/RobotoCondensed-700.woff');font-weight:700}
:root{font-family:Segoe UI,Arial,sans-serif;color:#263442;background:#f4f6f9;font-size:13px;--blue:#164d79;--line:#dce3e9;--green:#267a54;--amber:#9d6508;--red:#b9343b;--muted:#667583}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:3px}button{cursor:pointer;border:1px solid #ccd6df;background:white;padding:8px 12px;border-radius:6px;color:#263442;font-weight:600}button:hover{background:#eef4f8}button:disabled{cursor:not-allowed;opacity:.5}button.primary{background:var(--blue);color:white;border-color:var(--blue)}button.small{padding:5px 9px;font-size:12px}input,select,textarea{width:100%;padding:7px 9px;border:1px solid #cdd7df;border-radius:5px;color:#243544;background:#fff}textarea{resize:vertical;line-height:1.45;min-height:90px}input[type=checkbox]{width:16px;height:16px;accent-color:var(--blue)}input[type=file]{padding:5px}label{display:block;font-size:12px;color:#566675}label>input,label>textarea,label>select{display:block;margin-top:5px}a{color:#155780;text-decoration:none}.sidebar{position:fixed;inset:0 auto 0 0;width:215px;background:#fff;border-right:1px solid var(--line);padding:24px 14px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:10px;margin:0 3px 30px;color:#253f55}.brand img{width:60px;height:48px;object-fit:contain}.brand strong{font-size:16px;line-height:1.25}.brand span{display:block;font-size:10px;font-weight:500;color:#778592;margin-top:4px}.sidebar nav{display:grid;gap:5px}.sidebar nav a{padding:11px 12px;color:#526675;border-radius:6px;font-size:12px;font-weight:600}.sidebar nav a.active{background:#e8f0f7;color:#164d79}.sidebar-bottom{margin-top:auto;font-size:11px;color:#446351;padding:15px 10px}.sidebar-bottom .muted{display:block;margin-top:6px}.local-dot{width:7px;height:7px;display:inline-block;border-radius:50%;background:#4b9d76;margin-right:5px}.shell{margin-left:215px;min-height:100vh;display:flex;flex-direction:column}header{padding:23px 28px 18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);background:white;gap:15px}.crumb{letter-spacing:1.3px;font-size:10px;color:#718292;font-weight:700}h1{font-size:24px;letter-spacing:-.4px;margin:5px 0 0;font-weight:650}h2{font-size:16px;margin:0 0 12px}h3{font-size:13px;margin:0 0 8px}.header-actions{display:flex;gap:14px;align-items:center}.user-label{display:flex;align-items:center;gap:8px}.user-label select{width:105px;margin:0}.muted{color:var(--muted);font-size:12px}.caption{font-size:11px;color:var(--muted);margin-top:8px;line-height:1.6}.context-bar{padding:12px 28px;background:#f9fbfd;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.context-bar select{width:260px}.piece-tabs{display:flex;gap:3px}.piece-tabs button.active{background:#164d79;color:white;border-color:#164d79}main{padding:22px 28px;flex:1;max-width:1600px;width:100%}footer{margin:8px 28px 0;padding:15px 0;border-top:1px solid var(--line);font-size:10px;color:#7a8793;display:flex;justify-content:space-between}.toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:10px}.toolbar p{margin:0;color:var(--muted)}.panel{background:#fff;border:1px solid var(--line);border-radius:8px;padding:18px;margin-bottom:16px}.panel.compact{padding:14px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.fields{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.field-wide{grid-column:1/-1}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.right{margin-left:auto}.pill{display:inline-block;padding:4px 8px;border-radius:20px;font-size:11px;font-weight:600;white-space:nowrap}.pill.ok{background:#e7f3ed;color:var(--green)}.pill.warning{background:#fff4df;color:var(--amber)}.pill.error{background:#fcebec;color:var(--red)}.pill.draft{background:#edf1f5;color:#617080}table{border-collapse:collapse;width:100%;font-size:12px}th{text-align:left;color:#6b7c89;text-transform:uppercase;letter-spacing:.4px;font-size:10px;background:#f6f8fa;font-weight:600}th,td{padding:11px 12px;border-bottom:1px solid #e7ecf1;vertical-align:top}tr:last-child td{border-bottom:0}.product-name{font-size:14px;font-weight:650;margin:3px 0 5px}.code{font:11px Consolas,monospace;color:#7c8c99}.lead-number{font-size:32px;line-height:1.1;font-weight:700;letter-spacing:-1px;color:var(--blue)}.capacity-status{padding:16px;background:#e9f4ed;border-left:3px solid var(--green);border-radius:4px}.capacity-status.error{background:#fbedee;border-left-color:var(--red)}.capacity-status strong{display:block;font-size:18px;line-height:1.3}.capacity-status span{display:block;font-size:12px;margin-top:5px;color:#546658}.capacity-status.error span{color:var(--red)}.language-chips{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}.chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #d7e0e7;padding:7px 10px;border-radius:5px;font-size:12px;background:#fff;cursor:pointer}.chip:has(input:checked){border-color:#709ab6;background:#ecf4fa;color:var(--blue)}.chip input{margin:0}.note{padding:10px 12px;background:#fff8e8;color:#86611b;font-size:12px;line-height:1.55;border-radius:5px;margin-bottom:14px}.note.blue{background:#eaf2f8;color:#376482}.note.error{background:#fcebec;color:var(--red)}.block-preview{background:#e7ecf0;padding:20px;overflow:auto;border-radius:6px;min-height:140px;display:flex;align-items:flex-start;justify-content:center}.block-preview svg{width:100%;height:auto;background:white;box-shadow:0 3px 12px #26344218;flex:none}.block-preview.vertical svg{max-width:280px}.art-preview{position:relative;display:inline-block;max-width:100%;background:white;cursor:zoom-in;line-height:0}.art-preview>img{width:100%;height:auto;display:block}.overlay{position:absolute;outline:1px solid #368bd0;overflow:hidden}.overlay svg{width:100%;height:100%}.art-stage{padding:12px;text-align:center;border-radius:5px;background:#e8edf1;overflow:auto}.art-stage .art-preview{max-height:560px}.art-stage .art-preview>img{max-height:540px;width:auto;max-width:100%}.check{padding:10px 0;border-bottom:1px solid #edf0f3;display:flex;align-items:flex-start;gap:9px;font-size:12px;line-height:1.5}.check:last-child{border:0}.check-icon{width:20px;flex:none;font-weight:700}.check.error .check-icon{color:var(--red)}.check.warning .check-icon{color:var(--amber)}.check.ok .check-icon{color:var(--green)}.mark-img{width:42px;height:34px;object-fit:contain}.import-value{max-width:300px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;max-height:150px;overflow:auto}.buttons{display:flex;gap:8px;flex-wrap:wrap}.ingredient-label{display:flex;gap:10px;align-items:center;margin-bottom:8px}.ingredients textarea{min-height:130px}.stat-row{display:flex;gap:25px;padding:10px 0}.stat{font-size:12px;color:#71818d}.stat strong{font-size:21px;color:#2b3f50;display:block;margin-bottom:4px}.empty{padding:35px;text-align:center;color:#81909b}.scroll{max-height:400px;overflow:auto}.rule-json{min-height:300px;font:11px Consolas,monospace}.sha{font:10px Consolas,monospace;overflow-wrap:anywhere;max-width:260px}.summary{font-weight:600;margin-bottom:8px}#toast{position:fixed;bottom:24px;right:24px;padding:12px 18px;background:#213e54;color:white;border-radius:7px;z-index:100;box-shadow:0 4px 15px #0002;opacity:0;pointer-events:none;transition:opacity .15s;max-width:450px}#toast.visible{opacity:1}dialog{width:95vw;max-width:1600px;border:0;border-radius:10px;padding:18px;max-height:95vh}dialog::backdrop{background:#18293899}#zoom-content{margin-top:12px;overflow:auto;max-height:82vh}#zoom-content .art-preview{max-width:none;width:1400px}#zoom-content svg{width:100%;height:auto}.search{max-width:260px}.rules-details{margin-top:16px}details summary{cursor:pointer;font-weight:600}details .fields{margin-top:12px}#live-capacity{margin-bottom:16px}.source-compare{font-size:11px;white-space:pre-wrap;max-height:150px;overflow:auto}
@media(max-width:1100px){.sidebar{width:185px}.shell{margin-left:185px}.header-actions{gap:8px}.fields{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}main{padding:18px}header{padding:18px}.context-bar{padding:10px 18px}.header-actions #dirty-state{display:none}}@media(max-width:720px){.sidebar{position:static;width:auto;padding:12px}.sidebar nav{display:flex;overflow:auto}.sidebar nav a{white-space:nowrap}.brand{margin:0 0 12px}.sidebar-bottom{display:none}.shell{margin:0}header{align-items:flex-start;flex-wrap:wrap}h1{font-size:21px}.context-bar{flex-wrap:wrap}.fields,.grid-3{grid-template-columns:1fr}.panel{padding:13px}table{min-width:600px}.table-scroll{overflow:auto}.stat-row{gap:15px}}

.login-page{min-height:100vh;display:grid;place-items:center;background:#eef2f7}.login-card{width:min(420px,92vw);padding:32px;border-radius:18px;background:white;box-shadow:0 20px 60px #11223318}.login-card img{display:block;max-width:170px;margin:0 auto 22px}.login-card h1,.login-card>p{text-align:center}.login-card form{display:grid;gap:18px}.login-card label{display:grid;gap:6px}.login-card #login-error{color:#a32626;min-height:24px}.user-label{max-width:230px;overflow-wrap:anywhere}@media(max-width:1000px){.header-actions{flex-wrap:wrap;gap:8px}}

/* C6: one workspace, compact controls and a persistent real-art preview. */
[hidden]{display:none!important}.shell{margin-left:0}.app-header{height:76px;padding:10px 24px;position:sticky;top:0;z-index:20;gap:20px}.brand{margin:0;flex:none}.brand img{width:50px;height:42px}.brand strong{font-size:14px}.brand span{margin-top:2px}.heading{flex:1;min-width:0}h1{font-size:21px;margin:2px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-actions{gap:12px;flex-wrap:nowrap}.context-bar{position:sticky;top:76px;z-index:19;padding:10px 24px;min-height:58px;background:#fff;gap:14px}.primary-slot{margin-left:auto;display:flex;gap:10px;align-items:center}.primary-slot .caption{margin:0;font-size:10px;max-width:165px}.piece-tabs button{padding:6px 12px}.shell>main{max-width:1480px;margin:0 auto;padding:16px 24px}.shell>footer{margin:8px 24px 0;padding:10px 0}.home-toolbar{margin:4px 0 15px}.home-toolbar h2{font-size:19px;margin-bottom:5px}.product-tools{display:flex;align-items:center;gap:15px;margin-bottom:12px}.product-tools .search{max-width:330px}.product-name{font-size:13px}.pill{padding:3px 7px}.pill:before{content:'';display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;margin-right:5px}.first-guide{display:flex;align-items:center;justify-content:space-between;border:1px solid #cbdce8;background:#eef5fa;color:#376482;padding:6px 10px;margin-bottom:12px;font-size:12px;border-radius:5px}.first-guide button{padding:2px 7px;background:transparent}.product-workspace{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(350px,1fr);gap:18px;align-items:start}.product-editor{min-width:0}.internal-tabs{display:flex;gap:2px;padding:7px 0 10px;position:relative}.internal-tabs button{flex:1;border:0;border-radius:5px;font-size:12px;padding:8px 5px;background:transparent}.internal-tabs button.active{background:#164d79;color:#fff}.checks-bar{background:#fff;border:1px solid var(--line);border-radius:5px;padding:8px 10px}.checks-bar>summary{display:flex;align-items:center;gap:8px;font-size:12px;list-style:none}.checks-bar>summary:after{content:'⌄';margin-left:auto}.checks-bar[open]>summary:after{content:'⌃'}.check-body{padding-top:12px;max-height:360px;overflow:auto}.check-body h3{margin-top:12px}.quality-group{background:#fff8e8;padding:4px 8px;margin:10px 0;border-left:3px solid #d6a34b}.quality-group h3{color:var(--amber)}.check{padding:8px 0;font-size:11px;gap:6px}.check button{flex:none}.product-editor .panel{padding:13px;margin-bottom:12px;border-radius:6px}.product-editor h2{font-size:14px;margin-bottom:9px}.product-editor .grid-2{grid-template-columns:1fr;gap:0}.product-editor .ingredients{grid-template-columns:1fr 1fr;gap:12px}.fields{gap:9px;grid-template-columns:repeat(3,minmax(0,1fr))}.fields label{min-width:0}.fields input,.fields select{padding:6px 7px}.product-editor textarea{min-height:70px}.product-editor .ingredients textarea{min-height:110px}.product-editor .caption{line-height:1.45}.product-editor .toolbar{margin-bottom:10px;flex-wrap:wrap}.product-editor th,.product-editor td{padding:8px 6px;font-size:11px}.product-editor .table-scroll{overflow-x:auto}.language-chips{margin:10px 0;gap:6px}.chip{padding:5px 8px}.capacity-status{padding:10px 12px}.capacity-status strong{font-size:16px}.capacity-status span{font-size:11px}.live-preview{position:sticky;top:150px;background:#fff;border:1px solid var(--line);border-radius:7px;padding:12px;max-height:calc(100vh - 164px);overflow:auto}.preview-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.preview-heading h2{font-size:14px;margin:0}.preview-heading .caption{margin:0}.art-stage{padding:8px;overflow:hidden}.art-stage .art-preview>img{max-height:410px;max-width:100%;width:auto}.metric-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 2px;font-size:12px}.metric-row:first-child{border-bottom:1px solid var(--line);padding-top:10px}.metric-row strong{font-size:15px;color:var(--blue)}.block-details{border-top:1px solid var(--line);margin-top:5px;padding-top:10px}.block-details summary{font-size:11px;color:var(--muted)}.block-preview{padding:12px;min-height:0;margin-top:9px}.live-preview .note{margin:6px 0;padding:8px;font-size:11px}.live-preview .caption{overflow-wrap:anywhere}.ok-text{color:var(--green)}.error-text,.save-error{color:var(--red)}.paste-import{margin-top:14px}.paste-import textarea{margin:8px 0}.comparison-controls{margin-top:12px}.comparison-controls input{width:70px}.empty{padding:20px;font-size:12px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px}.dialog-heading h2{margin:0}#art-request{width:min(860px,94vw)}#art-request .panel{padding:12px;margin-bottom:10px}#art-request .fields{grid-template-columns:1fr 1fr}#request-note{min-height:65px}.import-value{max-width:210px}.scroll{max-height:360px}.note{margin-bottom:10px}
@media(max-width:1150px){.app-header{gap:12px;padding:10px 16px}.brand strong{display:none}.context-bar{padding:10px 16px;gap:10px}.shell>main{padding:14px 16px}.product-workspace{grid-template-columns:minmax(0,1.25fr) minmax(330px,1fr);gap:12px}.fields{grid-template-columns:repeat(2,minmax(0,1fr))}.header-actions .user-label{max-width:160px;font-size:11px}.header-actions #dirty-state{display:inline-block;max-width:150px;font-size:11px}.primary-slot .caption{max-width:100px}.art-stage .art-preview>img{max-height:350px}.first-guide{font-size:11px}}
@media(max-width:760px){.app-header{height:auto;min-height:76px;flex-wrap:wrap}.heading{width:calc(100% - 80px)}.header-actions{margin-left:auto}.context-bar{position:static;flex-wrap:wrap}.primary-slot{width:100%;justify-content:flex-end}.product-workspace{grid-template-columns:1fr}.live-preview{position:static;grid-row:1;max-height:none}.live-preview .art-stage{max-height:280px}.art-stage .art-preview>img{max-height:260px}.product-editor .ingredients{grid-template-columns:1fr}.first-guide{gap:8px}.home-toolbar{flex-wrap:wrap}.product-tools{flex-wrap:wrap}.shell>main{padding:12px}.fields{grid-template-columns:1fr 1fr}.table-scroll table{min-width:520px}.first-guide span{line-height:1.5}#art-request .fields{grid-template-columns:1fr}.shell>footer{flex-wrap:wrap;gap:4px}}

/* C6b: la barra de producto queda fija bajo la cabecera */
#context{position:sticky;top:76px;z-index:30}
#context .context-bar{position:static}

/* C7: clear actions, compact languages and reviewable proposals. */
#products-table tbody tr,.combination-row{cursor:pointer}#products-table tbody tr:hover,.combination-row:hover{background:#eff6fa}
.issue-location{border:0;background:transparent;text-align:left;font:inherit;color:inherit;padding:0;flex:1}
.field-highlight{outline:3px solid #e3a734!important;box-shadow:0 0 0 5px #fff1be!important}
.preview-highlight{stroke:#e3a734;stroke-width:.4px}.fix-proposal{background:#fff5cd;border:1px solid #e7bd62;border-radius:10px;padding:14px;margin-bottom:15px}
.language-adder{background:#f4f8fa;border-radius:10px;padding:14px;margin-top:16px}.language-adder label{max-width:360px}.language-adder .buttons{margin-top:10px}
.machine-review{background:#fff1c9;color:#765018;padding:8px;border-radius:6px;font-size:12px}
.rules-details input,.rules-details select{min-width:80px;max-width:160px}.preview-heading{flex-wrap:wrap}.overlay svg{overflow:visible}.block-preview{overflow:auto;padding-bottom:12px}
