#cxagent.cxagent-overlay{position:fixed;inset:0;z-index:100000;background:rgba(10,25,54,.55);display:flex;justify-content:flex-end;font-family:Inter,system-ui,sans-serif;color:#122342}
#cxagent .cxagent-panel{width:min(620px,100%);height:100dvh;background:#f5f8fc;display:flex;flex-direction:column;box-shadow:-18px 0 70px #0c214040}
#cxagent header{background:#0d1b3d;color:#fff;display:flex;justify-content:space-between;align-items:center;padding:23px 28px;gap:20px}
#cxagent header h2{font-size:22px;line-height:1.2;margin:5px 0 0;font-weight:800;color:#fff}
#cxagent header small{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#afccf2}
#cxagent button{cursor:pointer;font:inherit}
#cxagent .cxagent-close{border:0;background:transparent;color:white;font-size:30px}
#cxagent .cxagent-body{flex:1;overflow:auto;padding:25px 22px;display:flex;flex-direction:column;align-items:flex-start;gap:15px;overscroll-behavior:contain}
#cxagent .cxagent-msg{background:white;box-shadow:0 3px 20px #0c21400d;border:1px solid #e2eaf3;padding:15px 18px;border-radius:20px 20px 20px 4px;line-height:1.48;max-width:95%;font-size:14px;overflow-wrap:anywhere}
#cxagent .cxagent-msg.user{align-self:flex-end;color:white;background:#176baa;border-color:#176baa;border-radius:20px 20px 4px 20px}
#cxagent .cxagent-msg details{margin-top:10px}#cxagent .cxagent-msg summary{cursor:pointer;font-weight:700}
#cxagent .cxagent-choices,#cxagent .cxagent-groups{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
#cxagent .cxagent-choices button,#cxagent .cxagent-groups button,#cxagent .cxagent-primary,#cxagent .cxagent-files button{border:1px solid #abc8e5;background:#eaf4fc;color:#104a78;padding:9px 13px;border-radius:12px;font-weight:700;font-size:13px}
#cxagent .cxagent-choices button:hover,#cxagent .cxagent-groups button:hover{background:#d5ebff}
#cxagent .cxagent-groups button:disabled{cursor:not-allowed;background:#fbe9e8;border-color:#e8b5ae;color:#943f35}
#cxagent .cxagent-group-issue{font-size:12px;color:#943f35;margin:5px 0 0;max-width:540px}
#cxagent .cxagent-progress{padding:8px 25px 4px;display:grid;gap:5px;color:#264c6f;font-size:12px;font-weight:700}
#cxagent .cxagent-progress[hidden]{display:none}
#cxagent .cxagent-progress progress{width:100%;height:14px;accent-color:#176baa}
#cxagent .cxagent-status{padding:0 25px;min-height:20px;color:#436680;font-size:12px;font-weight:700}
#cxagent .cxagent-compose{display:flex;gap:8px;background:white;padding:16px 20px;border-top:1px solid #e0e8f2}
#cxagent .cxagent-compose input{flex:1;min-width:0;border:1px solid #c7d6e5;border-radius:12px;padding:12px 15px;background:white;color:#122342;font-size:14px}
#cxagent .cxagent-compose>button,#cxagent .cxagent-primary{border:0;background:#176baa;color:white;padding:12px 16px;border-radius:12px}
#cxagent .cxagent-files{display:grid;gap:14px;margin-top:12px}#cxagent .cxagent-files label{display:grid;gap:5px;font-weight:700}#cxagent .cxagent-files input{max-width:100%;font-size:12px}
#cxagent .cxagent-criteria{display:grid;gap:9px;padding:14px;background:#fff;border-radius:12px;width:100%;font-size:13px}
#cxagent .cxagent-period{display:flex;flex-wrap:wrap;gap:9px;align-items:end;padding:14px;background:#fff;border-radius:12px;width:100%;font-size:13px}
#cxagent .cxagent-period label{display:grid;gap:4px;min-width:110px;flex:1}
#cxagent .cxagent-period input{width:100%;min-width:0;padding:8px;border:1px solid #abc8e5;border-radius:8px}
#cxagent .cxagent-period button{padding:9px 11px;border:1px solid #abc8e5;border-radius:8px;background:#eaf4fc;color:#104a78;font-weight:700}
#cxagent .cxagent-criteria label{display:flex;gap:9px;align-items:center;cursor:pointer}
#cxagent .cxagent-criteria button{border:0;background:#176baa;color:#fff;border-radius:8px;padding:9px}
#cxagent .cxagent-board{position:relative;width:100%;min-height:260px;max-height:620px;background:#fff;border:2px solid #bed0df;overflow:auto;border-radius:14px;flex:none}
#cxagent .cxagent-shelf{position:absolute;background:#56748e;border-radius:0}
#cxagent .cxagent-product{position:absolute;border:1px solid #111;outline:0;background:#cde8fb;color:#173d60;border-radius:0;overflow:hidden;min-height:0;font-size:0;padding:0;margin:0;box-shadow:none;touch-action:none;box-sizing:border-box}
#cxagent .cxagent-product.fixed{background:#dce4ed;border-color:#7f9bb4;color:#304d63;cursor:default}
#cxagent .cxagent-product:hover{z-index:2;filter:brightness(.94)}
#cxagent .cxagent-changes{padding:16px;background:white;border:1px solid #dce9f2;border-radius:14px;font-size:13px;line-height:1.5;width:100%}#cxagent .cxagent-changes ul{padding-left:19px;margin:8px 0 0}
#cxagent .cxagent-issues{max-height:210px;overflow:auto;font-size:12px}#cxagent .cxagent-issues p{padding-bottom:6px;border-bottom:1px solid #e5eef5}
#cxagent.cxagent-workspace .cxagent-panel{width:min(98vw,1900px);display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto auto;grid-template-areas:"header header" "chat view" "progress view" "status view" "compose view"}
#cxagent.cxagent-workspace header{grid-area:header}
#cxagent.cxagent-workspace .cxagent-body{grid-area:chat;min-height:0;align-items:stretch;padding:15px;gap:10px}
#cxagent.cxagent-workspace .cxagent-progress{grid-area:progress}
#cxagent.cxagent-workspace .cxagent-status{grid-area:status}
#cxagent.cxagent-workspace .cxagent-compose{grid-area:compose}
#cxagent .cxagent-workview{grid-area:view;min-width:0;overflow:auto;background:#e9f0f7;padding:20px;display:flex;flex-direction:column;gap:12px}
#cxagent .cxagent-workview h3{margin:0;font-size:18px}
#cxagent .cxagent-workhead{display:flex;flex-wrap:wrap;align-items:center;gap:7px 18px}
#cxagent .cxagent-workhead p{margin:0;font-size:13px}
#cxagent .cxagent-legend{display:flex;gap:7px;flex-wrap:wrap;font-size:12px}
#cxagent .cxagent-legend span{padding:4px 8px;border-radius:6px;border:1px solid #9faeba}
#cxagent .cxagent-legend .alta,#cxagent .cxagent-product.alta{background:#b4fc8b;color:#08340d}
#cxagent .cxagent-legend .reach,#cxagent .cxagent-product.reach{background:#b8ff9b;color:#103e38}
#cxagent .cxagent-legend .baja,#cxagent .cxagent-product.baja{background:#f2bcb7;color:#692b27}
#cxagent .cxagent-legend .normal{background:#cde8fb}
#cxagent .cxagent-legend .pending{background:#fff0aa}
#cxagent .cxagent-product.pending{filter:saturate(.8)}
#cxagent .cxagent-shelf.pending{background:#d99618}
#cxagent .cxagent-shelf.floating{background:#54a543}
#cxagent .cxagent-shelf span{position:absolute;bottom:5px;left:2px;white-space:nowrap;font-size:10px;color:#536272;background:#fff9;padding:2px 3px;pointer-events:none}
#cxagent .cxagent-board{width:100%;min-height:380px;max-height:none;overflow:auto}
#cxagent .cxagent-canvas{position:relative;background:linear-gradient(#fff,#f7fbff);box-sizing:border-box}
#cxagent .cxagent-virtual{position:absolute;left:6px;right:6px;border-bottom:2px dashed #218b78;color:#176657;font-size:12px;font-weight:700;padding:2px 6px;pointer-events:none}
#cxagent .cxagent-changes h4{margin:0;font-size:14px}
#cxagent .cxagent-changes li{margin:4px 0;padding:4px 7px;border-radius:6px}
#cxagent .cxagent-changes li.alta{background:#dcffd0}
#cxagent .cxagent-changes li.alcance{background:#ddfbf4}
#cxagent .cxagent-changes li.baja{background:#fce5e2}
#cxagent .cxagent-group-collection{display:grid;gap:8px;width:100%}
#cxagent .cxagent-groups{display:grid;width:100%;max-height:48vh;overflow:auto;align-content:start}
#cxagent .cxagent-group-collection>summary{font-weight:700;cursor:pointer;font-size:12px;overflow-wrap:anywhere}
#cxagent .cxagent-group-collection h3{font-size:14px;margin:8px 0 0}
#cxagent .cxagent-group-collection>div{padding:8px;background:#fff;border:1px solid #dbe5f0;border-radius:9px}
#cxagent .cxagent-group-collection details{font-size:11px;overflow-wrap:anywhere}
#cxagent .cxagent-editor{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px;background:#fff;border-radius:10px}
#cxagent .cxagent-editor small{width:100%}
#cxagent .cxagent-editor select,#cxagent .cxagent-editor input{padding:8px;border:1px solid #adc4d7;border-radius:7px;max-width:100%}
#cxagent .cxagent-editor input{width:90px}
#cxagent .cxagent-editor button,#cxagent .cxagent-actions button{border:0;border-radius:8px;background:#176baa;color:white;padding:9px 11px}
#cxagent .cxagent-actions{display:flex;gap:8px}
#cxagent .cxagent-actions button:disabled{background:#a9b8c5;cursor:not-allowed}
#cxagent .cxagent-changes{width:auto}
#cxagent .cxagent-changes summary{cursor:pointer;font-weight:700}
#cxagent.cxagent-standalone{position:relative;inset:auto;min-height:100dvh;background:#edf3f8;z-index:1;display:flex;justify-content:center}
#cxagent.cxagent-standalone .cxagent-panel{width:min(100%,1800px);height:100dvh;box-shadow:0 10px 45px #0c214015}
#cxagent.cxagent-standalone.cxagent-workspace .cxagent-panel{width:min(100%,1900px)}
@media(max-width:850px){#cxagent.cxagent-workspace .cxagent-panel{grid-template-columns:1fr;grid-template-rows:auto minmax(300px,1fr) minmax(170px,34vh) auto auto auto;grid-template-areas:"header" "view" "chat" "progress" "status" "compose"}#cxagent .cxagent-workview{padding:10px}}
@media(max-width:600px){#cxagent .cxagent-body{padding:16px}#cxagent header{padding:17px}#cxagent header h2{font-size:18px}}
/* R47: dos referencias simultáneas y el mismo zoom físico. */
#cxagent .cxagent-compare{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
#cxagent .cxagent-compare-panel{min-width:0;background:white;border:1px solid #c8d8e6;border-radius:12px;padding:10px;display:grid;gap:8px}
#cxagent .cxagent-compare-panel>select{width:100%;padding:10px;border:1px solid #b8cbdf;border-radius:8px;font:700 14px Inter,system-ui,sans-serif;color:#173d60;background:#f3f8fc}
#cxagent .cxagent-compare-panel>small{color:#536b80;overflow-wrap:anywhere;min-height:30px}
#cxagent .cxagent-compare .cxagent-product.fixed{border-color:#111}
#cxagent .cxagent-compare .cxagent-board{height:430px;min-height:250px;border:1px solid #dce6ee;border-radius:7px}
#cxagent .cxagent-segment{position:absolute;border:1px dashed #8ba1b6;box-sizing:border-box;pointer-events:none}
#cxagent .cxagent-compare-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:13px}
#cxagent .cxagent-compare-controls label{display:flex;gap:8px;align-items:center}
#cxagent .cxagent-compare-controls button{padding:9px 12px;background:white;border:1px solid #b8cbdf;border-radius:8px;color:#173d60}
#cxagent .cxagent-impact-dialog{width:min(940px,92vw);max-height:88dvh;padding:0;border:1px solid #afc4d8;border-radius:18px;box-shadow:0 25px 100px #06172b77;color:#17324c;background:#f6f9fc;font-family:Inter,system-ui,sans-serif}
#cxagent .cxagent-impact-dialog::backdrop{background:#0d203d88;backdrop-filter:blur(3px)}
#cxagent .cxagent-impact-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;color:white;background:#12365a}
#cxagent .cxagent-impact-head h3{margin:6px 0 0;font-size:18px;overflow-wrap:anywhere}
#cxagent .cxagent-impact-head small{font-size:10px;letter-spacing:.14em}
#cxagent .cxagent-impact-head button{border:0;background:transparent;color:white;font-size:28px}
#cxagent .cxagent-impact-content{padding:18px 24px;font-size:13px;line-height:1.55}
#cxagent .cxagent-impact-scroll{overflow:auto;max-height:280px;border:1px solid #d0dfe9;border-radius:9px;background:#fff;margin:12px 0}
#cxagent .cxagent-impact-dialog table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}
#cxagent .cxagent-impact-dialog th,#cxagent .cxagent-impact-dialog td{padding:11px 13px;border-bottom:1px solid #e0e8ef}
#cxagent .cxagent-impact-dialog thead{background:#e4eef6;position:sticky;top:0}
#cxagent .cxagent-impact-note{color:#62778a;font-size:11px}
#cxagent .cxagent-impact-content>button{border:0;border-radius:8px;background:#176baa;color:#fff;padding:11px 16px;font-weight:700}
@media(max-width:650px){#cxagent .cxagent-compare{grid-template-columns:1fr}#cxagent .cxagent-compare .cxagent-board{height:300px}#cxagent .cxagent-impact-content{padding:14px}}
