:root{--op-agent:274px;--op-hour:150px;--op-row:96px;--op-blue:#3157E6;--op-green:#1EAA72;--op-yellow:#E8AF1B;--op-red:#E24E60;--op-pending:#8A98B3}
*{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.op-body{margin:0;background:#F5F8FD;color:#001040}.op-topbar{height:76px;padding:0 34px;display:flex;align-items:center;gap:42px;background:linear-gradient(100deg,#071B62,#1433DE);color:#fff;box-shadow:0 8px 28px rgba(0,16,64,.18)}
.op-topbar .brand{color:#fff}.op-topbar .brand-ring{width:38px;height:38px}.op-topbar nav{display:flex;align-self:stretch;gap:30px}.op-topbar nav a{position:relative;display:flex;align-items:center;color:#fff;text-decoration:none;font-size:.9rem}.op-topbar nav a.is-current{font-weight:800}.op-topbar nav a.is-current::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:#50E0E0}.op-user{margin-left:auto;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#43B9EF;color:#fff;font-weight:800}
.op-main{max-width:1600px;margin:0 auto;padding:30px 34px 48px;overflow:hidden}.op-breadcrumb{margin:0 0 10px;color:#61709A;font-size:.82rem}.op-breadcrumb a{color:inherit}.op-titlebar{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:24px}.op-titlebar>div{min-width:0}.op-titlebar h1{font-size:2rem;line-height:1.1;margin:0 0 7px;color:#001040}.op-titlebar p{margin:0;color:#61709A}.op-button{height:42px;padding:0 18px;border-radius:10px;border:0;font:inherit;font-weight:700;cursor:pointer}.op-button-secondary{border:1px solid #CDD7EB;background:#fff;color:#001040}.op-button:hover{box-shadow:0 5px 14px rgba(0,16,64,.1)}
.op-notice{margin:18px 0 0;padding:11px 14px;border:1px solid #E2B52C;background:#FFF9E5;border-radius:10px;color:#624A00;font-size:.88rem}.op-metrics{display:flex;flex-wrap:wrap;gap:10px;margin:23px 0 16px}.op-metric{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 13px;border:1px solid #D6DFEF;border-radius:999px;background:#fff;color:#536180;font-size:.82rem}.op-metric::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--metric-color,#3157E6)}.op-metric strong{color:#001040}
.op-board{min-width:0;border:1px solid #D7E0EF;border-radius:17px;background:#fff;box-shadow:0 20px 50px rgba(0,16,64,.08);overflow:hidden}.op-toolbar{min-width:0;min-height:58px;padding:10px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #DDE5F2}.op-tabs{padding:4px;border-radius:10px;background:#F0F4FA}.op-tabs span{display:block;padding:8px 15px;border-radius:8px;font-size:.82rem}.op-tabs .is-active{background:#fff;color:#1230F0;font-weight:800;box-shadow:0 2px 8px rgba(0,16,64,.08)}.op-controls{min-width:0;display:flex;align-items:flex-end;gap:9px}.op-controls label{display:flex;flex-direction:column;gap:3px;font-size:.67rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#61709A}.op-controls select,.op-controls input{height:38px;min-width:145px;padding:0 10px;border:1px solid #D5DEED;border-radius:9px;background:#fff;color:#001040;font:inherit;font-size:.78rem;text-transform:none;letter-spacing:normal}.op-zoom{height:38px;display:flex;border:1px solid #D5DEED;border-radius:9px;overflow:hidden}.op-zoom button{width:38px;border:0;border-right:1px solid #E0E7F2;background:#fff;color:#1230F0;font-size:1.1rem;cursor:pointer}.op-zoom output{min-width:53px;display:grid;place-items:center;font-size:.76rem;color:#536180}
.op-scroll{overflow:auto;position:relative;scrollbar-color:#AAB7CF #EEF2F8}.op-scroll:focus-visible{outline:3px solid #50E0E0;outline-offset:-3px}.op-timeline{position:relative;min-width:calc(var(--op-agent) + 12 * var(--op-hour));isolation:isolate}.op-time-head,.op-row{display:grid;grid-template-columns:var(--op-agent) 1fr}.op-time-head{position:sticky;top:0;z-index:8;height:64px;background:#fff;border-bottom:1px solid #DDE5F2}.op-agent-heading{padding:21px 20px;border-right:1px solid #DDE5F2;color:#62729A;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.op-axis{position:relative;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(var(--op-hour) - 1px),#E5EAF3 calc(var(--op-hour) - 1px),#E5EAF3 var(--op-hour))}.op-tick{position:absolute;top:0;height:64px;padding:14px 0 0 13px;color:#001040;font-size:.76rem;font-weight:800}.op-tick small{display:block;margin-top:7px;color:#8794AF;font-size:.61rem;font-weight:600;text-transform:uppercase}.op-row{min-height:var(--op-row);border-bottom:1px solid #E3E9F3}.op-row:last-of-type{border-bottom:0}.op-agent{position:sticky;left:0;z-index:6;display:grid;grid-template-columns:44px 1fr 10px;align-items:center;gap:13px;padding:15px 18px;background:#fff;border-right:1px solid #DDE5F2}.op-avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;color:#fff;font-size:.79rem;font-weight:800}.op-agent strong,.op-agent small{display:block}.op-agent strong{font-size:.88rem}.op-agent small{margin-top:5px;color:#7583A1;font-size:.72rem}.op-agent-state{width:9px;height:9px;border-radius:50%;background:#3157E6;box-shadow:0 0 0 4px #E7ECFF}.op-track{position:relative;min-height:var(--op-row);background:repeating-linear-gradient(90deg,transparent 0,transparent calc(var(--op-hour) - 1px),#E8EDF5 calc(var(--op-hour) - 1px),#E8EDF5 var(--op-hour))}
.op-task{--status:#8A98B3;position:absolute;isolation:isolate;top:24px;height:48px;min-width:54px;overflow:hidden;border:1px solid color-mix(in srgb,var(--status) 45%,#fff);border-radius:11px;background:color-mix(in srgb,var(--status) 14%,#fff);color:#001040;box-shadow:0 5px 12px rgba(0,16,64,.08);cursor:pointer;text-align:left;padding:8px 11px;font:inherit}.op-task::before{content:"";position:absolute;inset:0 auto 0 0;width:var(--progress);background:color-mix(in srgb,var(--status) 23%,transparent);z-index:0}.op-task:hover,.op-task:focus-visible{z-index:5;box-shadow:0 8px 18px rgba(0,16,64,.18);outline:2px solid var(--status);outline-offset:2px}.op-task strong,.op-task small{position:relative;z-index:1;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.op-task strong{font-size:.75rem}.op-task small{margin-top:5px;color:#536180;font-size:.61rem}.op-task.is-active{--status:var(--op-blue)}.op-task.is-completed{--status:var(--op-green)}.op-task.is-blocked{--status:var(--op-yellow)}.op-task.is-error{--status:var(--op-red)}.op-task.is-pending{--status:var(--op-pending)}
.op-now{position:absolute;z-index:4;top:0;bottom:0;width:2px;background:#12ADD8;pointer-events:none}.op-now span{position:sticky;top:68px;display:block;width:max-content;transform:translate(-50%,-2px);padding:3px 8px;border:1px solid #7CD7EE;border-radius:999px;background:#E6FAFF;color:#00779B;font-size:.62rem;font-weight:800}.op-dependencies{position:absolute;z-index:2;inset:64px 0 0 0;pointer-events:none;overflow:visible}.op-dependencies path{fill:none;stroke:#8799BD;stroke-width:1.3;stroke-dasharray:4 3}.op-empty{padding:42px;text-align:center;color:#697796}
.op-legend{min-height:50px;padding:12px 18px;display:flex;align-items:center;gap:18px;border-top:1px solid #DDE5F2;color:#657391;font-size:.72rem}.op-legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.op-legend small{margin-left:auto}.op-swatch{width:10px;height:10px;border-radius:3px;background:var(--op-pending)}.op-swatch.is-active{background:var(--op-blue)}.op-swatch.is-completed{background:var(--op-green)}.op-swatch.is-blocked{background:var(--op-yellow)}.op-swatch.is-error{background:var(--op-red)}
.op-dialog{width:min(480px,calc(100% - 32px));border:0;border-radius:18px;padding:28px;box-shadow:0 25px 70px rgba(0,16,64,.3)}.op-dialog::backdrop{background:rgba(0,16,64,.55)}.op-dialog form{position:absolute;right:16px;top:14px}.op-dialog-close{width:38px;height:38px;border:0;border-radius:9px;background:#EEF2F8;color:#001040;font-size:1.4rem;cursor:pointer}.op-dialog-kicker{margin:0 48px 8px 0;color:#1230F0;font-size:.72rem;font-weight:800;text-transform:uppercase}.op-dialog h2{margin:0 40px 20px 0;color:#001040;font-size:1.35rem}.op-dialog dl{display:grid;grid-template-columns:130px 1fr;gap:10px;margin:0}.op-dialog dt{color:#6A7897;font-size:.8rem;font-weight:700}.op-dialog dd{margin:0;color:#001040;font-size:.85rem}
@media (max-width:900px){.op-topbar{padding:0 18px}.op-topbar nav{display:none}.op-main{padding:24px 16px}.op-toolbar{align-items:flex-start;flex-direction:column}.op-controls{width:100%;max-width:100%;overflow-x:auto;padding-bottom:3px}.op-legend{overflow-x:auto}.op-legend small{display:none}}
@media (max-width:600px){:root{--op-agent:210px;--op-hour:120px}.op-titlebar{align-items:flex-start}.op-titlebar h1{font-size:1.65rem}.op-button{flex:0 0 auto}.op-agent{grid-template-columns:38px 1fr 8px;padding:12px}.op-avatar{width:38px;height:38px}.op-dialog dl{grid-template-columns:1fr;gap:3px}.op-dialog dd{margin-bottom:8px}}
@media (prefers-reduced-motion:reduce){.op-task{transition:none}}

/* Calendario operativo multiescala y reprogramación por arrastre. */
.op-toolbar{min-height:68px}.op-calendar-nav{display:flex;align-items:center;gap:6px;white-space:nowrap}.op-calendar-nav button{height:38px;min-width:38px;padding:0 11px;border:1px solid #D5DEED;background:#fff;color:#1230F0;border-radius:9px;font:inherit;font-weight:700;cursor:pointer}.op-calendar-nav strong{margin-left:7px;min-width:118px;font-size:.83rem;text-transform:capitalize}.op-scope{height:38px;display:flex;padding:3px;border:1px solid #D5DEED;border-radius:9px;background:#F0F4FA}.op-scope button{padding:0 9px;border:0;border-radius:6px;background:transparent;color:#61709A;font:inherit;font-size:.72rem;cursor:pointer}.op-scope button.is-active{background:#fff;color:#1230F0;font-weight:800;box-shadow:0 2px 6px rgba(0,16,64,.1)}.op-task{cursor:grab;touch-action:none}.op-task.is-dragging{z-index:20;cursor:grabbing;opacity:.88;box-shadow:0 16px 32px rgba(0,16,64,.28)}.op-row.is-drop-target .op-track{background-color:#EDF3FF;box-shadow:inset 0 0 0 2px #3157E6}.op-notice.is-success{border-color:#65C99D;background:#ECFBF4;color:#08613E}.op-notice.is-error{border-color:#E98A96;background:#FFF0F2;color:#8F1827}
@media (max-width:1100px){.op-toolbar{align-items:flex-start;flex-direction:column}.op-controls{width:100%;max-width:100%;overflow-x:auto;padding-bottom:3px}}

/* v1.5: operación en vivo, cartera, capacidad, conflictos y edición. */
.op-live-controls{display:flex;align-items:center;gap:10px}.op-live{display:inline-flex;align-items:center;gap:7px;color:#287356;font-size:.75rem;font-weight:800}.op-live::before{content:"";width:8px;height:8px;border-radius:50%;background:#1EAA72;box-shadow:0 0 0 4px #DDF7EB}.op-live.is-syncing::before{background:#E8AF1B;box-shadow:0 0 0 4px #FFF3CD}.op-live.has-update::before{animation:op-pulse 1s ease 2}.op-undo{margin:12px 0 0;padding:10px 14px;display:flex;justify-content:space-between;align-items:center;border-radius:10px;background:#071B62;color:#fff;font-size:.84rem}.op-undo button{border:0;border-radius:7px;padding:7px 12px;background:#50E0E0;color:#001040;font-weight:800;cursor:pointer}.op-controls{flex-wrap:wrap;justify-content:flex-end}.op-controls input[type=search]{min-width:180px}.op-agent{content-visibility:auto;contain-intrinsic-size:auto 96px}.op-capacity{font-weight:700}.op-capacity.is-over{color:#C52F43}.op-density{position:absolute;right:12px;top:5px;z-index:1;color:#7583A1;font-size:.61rem;font-weight:700}.op-task.has-conflict{box-shadow:0 0 0 3px rgba(226,78,96,.25),0 6px 14px rgba(0,16,64,.12)}.op-task.has-conflict::after{content:"!";position:absolute;right:4px;top:3px;z-index:3;display:grid;place-items:center;width:15px;height:15px;border-radius:50%;background:#E24E60;color:#fff;font-size:.6rem;font-weight:900}.op-task.is-overdue{border-style:dashed}.op-task[data-priority=critica]{border-left:5px solid #B7192C}.op-task[data-priority=alta]{border-left:5px solid #E07816}.op-task.is-readonly{cursor:default}.op-resize{position:absolute;z-index:4;top:0;bottom:0;width:8px;cursor:ew-resize}.op-resize.is-left{left:0}.op-resize.is-right{right:0}.op-swatch.is-conflict{background:transparent;border:2px solid #E24E60}.op-tick.is-offday{color:#A94150}.op-task-edit{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid #E0E7F2}.op-task-edit label{display:flex;flex-direction:column;gap:4px;color:#657391;font-size:.72rem;font-weight:700}.op-task-edit input,.op-task-edit select{height:38px;padding:0 9px;border:1px solid #D5DEED;border-radius:8px;color:#001040}.op-task-edit .op-check{grid-column:1/-1;display:flex;flex-direction:row;align-items:center}.op-task-edit .op-check input{height:auto}.op-dialog-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}.op-dialog-actions button{min-height:38px;border:1px solid #CBD6E9;border-radius:8px;padding:0 12px;background:#fff;color:#001040;font-weight:800;cursor:pointer}.op-history{margin-top:14px;border-top:1px solid #E0E7F2;padding-top:12px;color:#536180;font-size:.78rem}.op-history summary{cursor:pointer;font-weight:800}.op-history ol{padding-left:20px}.op-history li{margin:8px 0}@keyframes op-pulse{50%{transform:scale(1.6)}}
@media(max-width:600px){.op-live-controls{width:100%;justify-content:space-between}.op-task-edit{grid-template-columns:1fr}.op-task-edit .op-check,.op-dialog-actions{grid-column:1}.op-dialog-actions{justify-content:stretch}.op-dialog-actions button{flex:1}}
.op-dialog .op-task-edit{position:static;right:auto;top:auto}

/* v1.5b: filas virtualizadas, carriles, horario laboral, cartera, ruta crítica, hitos y arrastre táctil. */
.op-scroll{max-height:min(74vh,960px);overscroll-behavior:contain}
.op-timeline{min-width:0}
.op-axis{background:none}.op-tick{border-left:1px solid #E5EAF3;padding-left:9px}.op-tick.is-holiday{color:#B7192C}
.op-rows{position:relative}
.op-row{position:absolute;left:0;right:0;display:grid;grid-template-columns:var(--op-agent) 1fr;min-height:0;border-bottom:1px solid #E3E9F3}
.op-row .op-track{position:relative;min-height:0;height:100%;background:none}
.op-row .op-agent{height:100%;grid-template-columns:44px 1fr 30px}
.op-row.is-drop-target .op-track{background:rgba(49,87,230,.06);box-shadow:inset 0 0 0 2px #3157E6}
.op-calendar-bg{position:absolute;top:0;bottom:0;z-index:0;pointer-events:none}
.op-shade{position:absolute;top:0;bottom:0;background:rgba(97,112,154,.06)}.op-shade.is-offday{background:repeating-linear-gradient(135deg,rgba(97,112,154,.07) 0 8px,rgba(97,112,154,.11) 8px 16px)}.op-shade.is-holiday{background:repeating-linear-gradient(135deg,rgba(183,25,44,.06) 0 8px,rgba(183,25,44,.1) 8px 16px)}
.op-gridline{position:absolute;top:0;bottom:0;width:1px;background:#E8EDF5}
.op-dependencies{inset:auto;top:0;z-index:2}
.op-dependencies path.is-violated{stroke:#E24E60;stroke-dasharray:2 3}.op-dependencies path.is-critical{stroke:#7646E8;stroke-width:2;stroke-dasharray:none}
.op-task{z-index:3;height:46px;touch-action:pan-x pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.op-task.is-armed{transform-origin:center;box-shadow:0 0 0 3px #50E0E0,0 16px 32px rgba(0,16,64,.28)}
.op-task.is-saving{opacity:.7}.op-task.is-saving::after{content:"Guardando…";position:absolute;right:6px;bottom:4px;z-index:2;font-size:.55rem;color:#536180}
.op-task.is-critical{outline:2px solid #7646E8;outline-offset:1px}
.op-task.is-milestone{padding-right:24px}.op-diamond{position:absolute;right:7px;top:50%;z-index:2;width:11px;height:11px;margin-top:-6px;background:#001040;transform:rotate(45deg);border-radius:2px}
.op-timeline.is-readonly .op-task{cursor:default}
.op-capacity.is-high{color:#B86A00}
.op-star{width:30px;height:30px;border:0;border-radius:8px;background:transparent;color:#8A98B3;font-size:1.05rem;cursor:pointer}.op-star.is-on{color:#E8AF1B}.op-star:hover,.op-star:focus-visible{background:#F0F4FA}
.op-avatar.is-group{background:#3157E6}.op-avatar.is-critica{background:#B7192C}.op-avatar.is-alta{background:#E07816}.op-avatar.is-media{background:#3157E6}.op-avatar.is-baja{background:#8A98B3}
.op-month-cell{position:absolute;top:16px;height:64px;padding:8px 10px;border:1px solid #D6DFEF;border-radius:10px;background:color-mix(in srgb,#3157E6 calc(var(--density,0) * 38%),#fff);color:#001040;text-align:left;font:inherit;cursor:pointer;overflow:hidden}
.op-month-cell strong,.op-month-cell small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.op-month-cell strong{font-size:.72rem}.op-month-cell small{margin-top:5px;font-size:.62rem;color:#2B3A63}.op-month-cell:hover,.op-month-cell:focus-visible{outline:2px solid #3157E6;outline-offset:1px}
.op-mode{padding:4px 10px;border-radius:999px;background:#EEF2F8;color:#536180;font-size:.72rem;font-weight:800}
.op-live.is-offline{color:#A3283A}.op-live.is-offline::before{background:#E24E60;box-shadow:0 0 0 4px #FFE3E7}
.op-toggle{flex-direction:row!important;align-items:center;height:38px;gap:6px!important;text-transform:none!important;letter-spacing:normal!important;font-size:.78rem!important;color:#001040!important}
.op-toggle input{min-width:0!important;height:auto!important}
.op-link-button{height:38px;border:0;background:none;color:#1230F0;font:inherit;font-size:.76rem;font-weight:700;cursor:pointer;text-decoration:underline}
.op-swatch.is-critical{background:transparent;border:2px solid #7646E8}.op-swatch.is-milestone{width:9px;height:9px;background:#001040;transform:rotate(45deg)}.op-swatch.is-offhours{background:repeating-linear-gradient(135deg,#D6DDEA 0 3px,#EEF2F8 3px 6px)}
.op-legend{flex-wrap:wrap}
.op-dialog .op-cascade-actions{position:static;margin-top:18px}.op-dialog-small{width:min(440px,calc(100% - 32px))}.op-dialog-small p:not(.op-dialog-kicker){color:#3A4870;font-size:.9rem;line-height:1.45}
.op-cascade-actions .op-button{background:#1230F0;color:#fff;border-color:#1230F0}
@media (max-width:600px){.op-row .op-agent{grid-template-columns:38px 1fr 28px}.op-scroll{max-height:68vh}}
@media (prefers-reduced-motion:reduce){.op-live.has-update::before{animation:none}}
.op-task-edit[hidden],.op-undo[hidden],.op-mode[hidden]{display:none}
.op-agent small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.op-row .op-agent>span:nth-child(2){min-width:0}
@media (max-width:1100px){.op-controls{justify-content:flex-start;overflow-x:visible}}
@media (max-width:600px){.op-controls{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:10px}.op-controls label{min-width:0}.op-controls select,.op-controls input,.op-controls input[type=search]{width:100%;min-width:0}.op-controls label:first-child,.op-controls .op-scope{grid-column:1/-1}.op-controls .op-toggle{flex-direction:row;align-items:center;gap:6px;height:38px}.op-controls .op-toggle input{width:auto;height:auto}.op-scope{justify-content:space-between}.op-scope button{flex:1}}
@media (max-width:600px){:root{--op-agent:150px}.op-row .op-agent{grid-template-columns:30px 1fr 22px;gap:8px;padding:10px 8px}.op-row .op-avatar{width:30px;height:30px;font-size:.66rem}.op-agent small:not(.op-capacity){display:none}.op-controls .op-link-button{justify-self:start;padding-left:0}}
@media (max-width:600px){.op-capacity-word{display:none}}
.op-dependencies.is-aggregate{display:none}
.op-user{border:0;font:inherit;font-weight:800;cursor:pointer}.op-user.is-signed-out{width:auto;padding:0 16px;border-radius:20px;background:#fff;color:#1230F0}.op-user[hidden]{display:none}
