/* CP04 R1 — composición directa de la Hoja canónica en el único host profundo. */
#detallePedido.cp04-control-host{padding:0;overflow:auto;background:#f2f5f8;scroll-behavior:smooth}
#detallePedido.cp04-control-host #sheet{min-height:100%;color:#26384a;background:#f2f5f8}
#detallePedido.cp04-control-host .cp04-sheet-head{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:15px;min-height:78px;padding:13px 23px;background:#103f69;color:#fff;border-bottom:4px solid #e4bc38;box-shadow:0 2px 10px rgba(20,49,73,.2)}
#detallePedido.cp04-control-host .cp04-sheet-head .title{min-width:0;flex:1}
#detallePedido.cp04-control-host .cp04-sheet-head h2{margin:0 0 4px;color:#fff;font-size:1.16rem}
#detallePedido.cp04-control-host .cp04-sheet-head p{margin:0;color:#c4d5e3;font-size:.76rem}
#detallePedido.cp04-control-host .cp04-sheet-head .cp04-breadcrumb{color:#f4da72;font-size:.68rem;font-weight:850;letter-spacing:.06em;text-transform:uppercase}
#detallePedido.cp04-control-host .cp04-sheet-actions{display:flex;gap:8px;flex-wrap:wrap}
#detallePedido.cp04-control-host .cp04-sheet-actions .btn{border-color:#c9e1ee;background:#fff;color:#103f69}
#detallePedido.cp04-control-host .cp04-sheet-content{max-width:1450px;margin:0 auto;padding:0 22px 40px}
#detallePedido.cp04-control-host .summary-strip{display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));gap:8px;margin:13px 0 0}
#detallePedido.cp04-control-host .summary-box{min-width:0;padding:10px;border:1px solid #d7e1e9;border-radius:11px;background:#fff}
#detallePedido.cp04-control-host .summary-box small{display:block;color:#728597;font-size:.58rem;font-weight:900;letter-spacing:.05em;text-transform:uppercase}
#detallePedido.cp04-control-host .summary-box b{display:block;margin-top:4px;overflow:hidden;color:#214b69;font-size:.76rem;text-overflow:ellipsis;white-space:nowrap}
#detallePedido.cp04-control-host .cp04-tabs{position:sticky;top:78px;z-index:4;display:flex;align-items:flex-end;gap:3px;height:58px;margin:0;border-bottom:1px solid #d7e1e9;background:#f2f5f8}
#detallePedido.cp04-control-host .cp04-tab{border:0;border-bottom:3px solid transparent;background:transparent;color:#607487;padding:12px 14px 10px;font-size:.8rem;font-weight:850}
#detallePedido.cp04-control-host .cp04-tab:hover{background:#e8f2fa;color:#174c74}
#detallePedido.cp04-control-host .cp04-tab.active{color:#174c74;border-bottom-color:#e4bc38}
#detallePedido.cp04-control-host .cp04-pane{display:block;padding-top:17px}
#detallePedido.cp04-control-host .cp04-pane[hidden]{display:none!important}
#detallePedido.cp04-control-host .cp04-pane-lead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 12px;padding:12px 14px;border:1px solid #d5e4eb;border-left:4px solid #1e75b7;border-radius:10px;background:#fff}
#detallePedido.cp04-control-host .cp04-pane-lead p{margin:0 0 2px;color:#1e75b7;font-size:.64rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
#detallePedido.cp04-control-host .cp04-pane-lead h3{margin:0;color:#174c73;font-size:1rem}
#detallePedido.cp04-control-host .cp04-pane-lead span{display:block;margin-top:3px;color:#718397;font-size:.76rem;line-height:1.42}
#detallePedido.cp04-control-host .card,#detallePedido.cp04-control-host .action-card,#detallePedido.cp04-control-host .units-card,#detallePedido.cp04-control-host .docs-card,#detallePedido.cp04-control-host .key-card{border:1px solid #d7e1e9;border-radius:15px;background:#fff;box-shadow:0 5px 18px rgba(20,49,73,.07)}
#detallePedido.cp04-control-host .info-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(310px,.84fr);gap:13px;align-items:start}
#detallePedido.cp04-control-host .right-stack{display:grid;gap:12px}
#detallePedido.cp04-control-host .mockup-card{display:flex;flex-direction:column;min-height:475px;padding:13px}
#detallePedido.cp04-control-host .mockup-head,#detallePedido.cp04-control-host .units-head,#detallePedido.cp04-control-host .cp04-work-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
#detallePedido.cp04-control-host .mockup-head h3,#detallePedido.cp04-control-host .units-head h3,#detallePedido.cp04-control-host .action-card h3,#detallePedido.cp04-control-host .docs-card h3,#detallePedido.cp04-control-host .key-card h3,#detallePedido.cp04-control-host .cp04-work-toolbar h3{margin:0;color:#174c73;font-size:1rem}
#detallePedido.cp04-control-host .mockup-head span,#detallePedido.cp04-control-host .units-head p,#detallePedido.cp04-control-host .action-card p,#detallePedido.cp04-control-host .docs-card p,#detallePedido.cp04-control-host .key-card p,#detallePedido.cp04-control-host .cp04-work-toolbar p{margin:4px 0 0;color:#718397;font-size:.72rem;line-height:1.42}
#detallePedido.cp04-control-host .mockup-frame{display:grid;flex:1;place-items:center;min-height:360px;margin-top:10px;overflow:hidden;border:1px solid #d7e1e8;border-radius:12px;background:#f8fafc}
#detallePedido.cp04-control-host .mockup-frame .adn-ux-mockup{display:grid;width:100%;height:100%;place-items:center}
#detallePedido.cp04-control-host .mockup-frame img{width:100%;height:100%;object-fit:contain}
#detallePedido.cp04-control-host .mockup-placeholder{color:#7b8d9c;text-align:center;font-size:.78rem}
#detallePedido.cp04-control-host .mockup-placeholder .btn{margin-top:10px}
#detallePedido.cp04-control-host .cp04-mockup-actions{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;padding:10px;border-top:1px solid #d7e1e8;background:#fff}
#detallePedido.cp04-control-host .units-card,#detallePedido.cp04-control-host .action-card,#detallePedido.cp04-control-host .docs-card,#detallePedido.cp04-control-host .key-card{padding:14px}
#detallePedido.cp04-control-host .unit-counts{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
#detallePedido.cp04-control-host .unit-count{border-radius:999px;padding:5px 8px;background:#edf3f7;color:#476178;font-size:.63rem;font-weight:850}
#detallePedido.cp04-control-host .physical-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:10px 0}
#detallePedido.cp04-control-host .physical-metric{min-width:0;padding:7px;border:1px solid #d9e3ea;border-radius:9px;background:#f8fafc}
#detallePedido.cp04-control-host .physical-metric small{display:block;color:#7b8c99;font-size:.53rem;font-weight:850;letter-spacing:.04em;text-transform:uppercase}
#detallePedido.cp04-control-host .physical-metric b{display:block;margin-top:3px;overflow:hidden;color:#224f70;font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}
#detallePedido.cp04-control-host .unit-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:7px}
#detallePedido.cp04-control-host .unit-card{display:grid;grid-template-columns:20px 34px minmax(0,1fr);gap:8px;align-items:center;min-height:64px;padding:9px;border:1px solid #d4e0e8;border-radius:10px;background:#f8fafc;cursor:pointer}
#detallePedido.cp04-control-host .unit-card:hover{border-color:#94bad5}
#detallePedido.cp04-control-host .unit-card.selected{border-color:#65a2cf;background:#eaf4fb;box-shadow:0 0 0 2px rgba(43,130,190,.1)}
#detallePedido.cp04-control-host .unit-card input{width:16px;height:16px;accent-color:#1e75b7}
#detallePedido.cp04-control-host .unit-kind{display:grid;width:34px;height:34px;place-items:center;border-radius:9px;background:#edf3f7;color:#245b84;font-size:.67rem;font-weight:900}
#detallePedido.cp04-control-host .unit-card.package .unit-kind{background:#fff4cf;color:#7d6205}
#detallePedido.cp04-control-host .unit-card.piece .unit-kind{background:#eeeaf8;color:#674e8e}
#detallePedido.cp04-control-host .unit-card b{display:block;color:#214f70;font-size:.74rem}
#detallePedido.cp04-control-host .unit-card small{display:block;margin-top:2px;color:#748698;font-size:.64rem;line-height:1.32}
#detallePedido.cp04-control-host .unit-meta-line{display:flex;gap:4px;margin-top:5px;flex-wrap:wrap}
#detallePedido.cp04-control-host .unit-meta-line em{border:1px solid #dbe4ea;border-radius:999px;background:#fff;padding:2px 5px;color:#5d7182;font-size:.54rem;font-style:normal;font-weight:750}
#detallePedido.cp04-control-host .unit-empty{padding:13px;border:1px dashed #c8d6e0;border-radius:10px;background:#fafcfd;color:#8393a0;font-size:.7rem;text-align:center}
#detallePedido.cp04-control-host .cp04-context-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 9px;padding:8px 10px;border:1px solid #d9e3ea;border-radius:10px;background:#f5f9fc}
#detallePedido.cp04-control-host .cp04-context-actions__label{color:#51697e;font-size:.68rem;font-weight:850;white-space:nowrap}
#detallePedido.cp04-control-host .dynamic-actions{display:flex;align-items:center;gap:7px;flex:1 1 300px;flex-wrap:wrap;margin:0;padding:0;border:0;background:transparent}
#detallePedido.cp04-control-host .dynamic-actions .operation-context-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;width:100%}
#detallePedido.cp04-control-host .dynamic-actions .operation-context-actions.empty{color:#758899;font-size:.72rem}
#detallePedido.cp04-control-host .dynamic-actions button,#detallePedido.cp04-control-host .operation-unification-bar button{min-height:30px;border-radius:8px;font-size:.7rem}
#detallePedido.cp04-control-host .cp04-reunification{border-color:#bdd9cc;background:#f7fcf9}
#detallePedido.cp04-control-host .operation-unification-bar{margin-top:10px;padding:10px;border:1px solid #c9e2d5;border-radius:10px;background:#fff}
#detallePedido.cp04-control-host .operation-unification-title{display:flex;justify-content:space-between;gap:8px;color:#315e4d;font-size:.72rem}
#detallePedido.cp04-control-host .operation-unification-options{display:grid;gap:5px;margin:8px 0;color:#4f6c62;font-size:.7rem}
#detallePedido.cp04-control-host .doc-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px}
#detallePedido.cp04-control-host .doc{display:flex;min-width:0;flex-direction:column;align-items:flex-start;padding:10px;border:1px solid #d6e1e9;border-radius:11px;background:#fff}
#detallePedido.cp04-control-host .doc .icon{display:grid;width:32px;height:32px;place-items:center;border-radius:9px;background:#edf3f7;color:#1f5a86;font-size:.62rem;font-weight:900}
#detallePedido.cp04-control-host .doc b{margin-top:7px;color:#234f6e;font-size:.72rem}
#detallePedido.cp04-control-host .doc small{display:block;min-height:32px;margin:3px 0 8px;color:#748698;font-size:.62rem;line-height:1.28;overflow-wrap:anywhere}
#detallePedido.cp04-control-host .cp04-doc-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto}
#detallePedido.cp04-control-host .cp04-doc-actions .btn{min-height:29px;font-size:.65rem}
#detallePedido.cp04-control-host .cp04-doc-state{margin-top:auto;color:#8493a0;font-size:.6rem;font-style:italic}
#detallePedido.cp04-control-host .doc.is-informative{border-style:dashed;background:#fbfcfd}
#detallePedido.cp04-control-host .cp04-data-controls{display:grid;grid-template-columns:minmax(150px,.45fr) minmax(0,1fr);gap:10px;margin-top:10px}
#detallePedido.cp04-control-host .cp04-data-controls label{display:grid;gap:5px;color:#597085;font-size:.62rem;font-weight:850;letter-spacing:.04em;text-transform:uppercase}
#detallePedido.cp04-control-host .cp04-data-controls select,#detallePedido.cp04-control-host .cp04-data-controls textarea{width:100%;border:1px solid #cbd8e2;border-radius:9px;padding:8px 9px;background:#fff;color:#26394b;font:inherit;font-size:.75rem;text-transform:none;letter-spacing:normal}
#detallePedido.cp04-control-host .cp04-data-controls textarea{min-height:74px;resize:vertical}
#detallePedido.cp04-control-host .cp04-sizing-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
#detallePedido.cp04-control-host .cp04-sizing-head p{margin:4px 0 0;color:#718397;font-size:.68rem}
#detallePedido.cp04-control-host .cp04-sizing-detail:focus{outline:3px solid rgba(30,117,183,.25);outline-offset:2px}
#detallePedido.cp04-control-host .tallaje{width:100%;border-collapse:collapse;margin-top:10px}
#detallePedido.cp04-control-host .tallaje th,#detallePedido.cp04-control-host .tallaje td{padding:8px;border:1px solid #dbe4eb;text-align:left;font-size:.68rem}
#detallePedido.cp04-control-host .tallaje th{background:#eef3f7;color:#34566f}
#detallePedido.cp04-control-host .cp04-work-layout,#detallePedido.cp04-control-host .cp04-route-layout{display:grid;gap:12px}
#detallePedido.cp04-control-host .cp04-work-toolbar{padding:14px}
#detallePedido.cp04-control-host .cp04-work-list{display:grid;gap:8px;margin-top:10px}
#detallePedido.cp04-control-host .cp04-work-card{padding:11px;border:1px solid #d6e1e9;border-radius:10px;background:#f8fafc}
#detallePedido.cp04-control-host .cp04-work-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
#detallePedido.cp04-control-host .cp04-work-card b{display:block;color:#214f70;font-size:.75rem}
#detallePedido.cp04-control-host .cp04-work-card header small,#detallePedido.cp04-control-host .cp04-work-progress small{display:block;margin-top:3px;color:#718397;font-size:.64rem}
#detallePedido.cp04-control-host .cp04-work-card .state{border-radius:999px;background:#edf3f7;padding:4px 6px;color:#476178;font-size:.59rem;font-weight:800;white-space:nowrap}
#detallePedido.cp04-control-host .cp04-work-card .state.done{background:#e5f5ea;color:#237150}
#detallePedido.cp04-control-host .cp04-work-progress{display:grid;grid-template-columns:auto minmax(80px,1fr) auto;align-items:center;gap:7px;margin:9px 0;color:#536d80;font-size:.65rem}
#detallePedido.cp04-control-host .cp04-work-progress progress{width:100%;height:8px;accent-color:#1e75b7}
#detallePedido.cp04-control-host .cp04-result-list{display:grid;gap:6px;margin-top:10px}
#detallePedido.cp04-control-host .cp04-result-list>div{display:flex;justify-content:space-between;gap:8px;padding:8px;border:1px solid #e0e8ee;border-radius:8px;background:#f8fafc}
#detallePedido.cp04-control-host .cp04-result-list b{color:#244e6d;font-size:.72rem}
#detallePedido.cp04-control-host .cp04-result-list small{color:#718397;font-size:.64rem}
#detallePedido.cp04-control-host .timeline{margin-top:10px;margin-left:8px;border-left:2px solid #d8e2e9;padding-left:16px}
#detallePedido.cp04-control-host .cp04-route-event{position:relative;padding:0 0 14px;color:#264e6b}
#detallePedido.cp04-control-host .cp04-route-event:before{position:absolute;top:3px;left:-22px;width:9px;height:9px;border-radius:50%;background:#5a8eb6;content:""}
#detallePedido.cp04-control-host .cp04-route-event b{display:block;font-size:.74rem;text-transform:capitalize}
#detallePedido.cp04-control-host .cp04-route-event span{display:block;margin-top:3px;color:#758697;font-size:.64rem;line-height:1.35}
@media(max-width:1180px){#detallePedido.cp04-control-host .summary-strip{grid-template-columns:repeat(4,minmax(0,1fr))}#detallePedido.cp04-control-host .info-layout{grid-template-columns:1fr}#detallePedido.cp04-control-host .mockup-card{min-height:350px}#detallePedido.cp04-control-host .physical-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){#detallePedido.cp04-control-host .cp04-sheet-head{align-items:flex-start;padding:13px 14px}#detallePedido.cp04-control-host .cp04-sheet-content{padding:0 12px 28px}#detallePedido.cp04-control-host .summary-strip{grid-template-columns:repeat(2,minmax(0,1fr))}#detallePedido.cp04-control-host .cp04-tabs{top:78px;overflow:auto}#detallePedido.cp04-control-host .cp04-tab{padding:12px 10px 10px;font-size:.7rem;white-space:nowrap}#detallePedido.cp04-control-host .cp04-pane-lead{align-items:flex-start;flex-direction:column}#detallePedido.cp04-control-host .physical-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#detallePedido.cp04-control-host .doc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#detallePedido.cp04-control-host .cp04-data-controls{grid-template-columns:1fr}#detallePedido.cp04-control-host .cp04-work-toolbar{align-items:flex-start;flex-direction:column}#detallePedido.cp04-control-host .cp04-work-progress{grid-template-columns:1fr}}
