:root{--nav:#0f2742;--nav2:#123557;--blue:#2563eb;--aqua:#20c7c9;--bg:#f5f7fb;--card:#fff;--line:#dfe6ef;--text:#0f172a;--muted:#64748b;--ok:#22c55e;--warn:#f59e0b;--bad:#ef4444;--purple:#7c3aed}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px}.app{display:flex;min-height:100vh}.sidebar{width:258px;background:linear-gradient(180deg,var(--nav),#0a1d31);color:#fff;position:fixed;top:0;bottom:0;left:0}.brand{height:68px;display:flex;align-items:center;gap:12px;padding:0 20px;font-weight:800;font-size:18px;border-bottom:1px solid rgba(255,255,255,.08)}.brand svg{width:30px;height:30px}.menu{padding:14px}.menu-title{font-size:11px;text-transform:uppercase;color:#8aa4be;margin:16px 12px 8px}.menu a{display:flex;align-items:center;gap:11px;color:#dbeafe;text-decoration:none;padding:11px 12px;border-radius:8px;margin:4px 0}.menu a:hover,.menu a.active{background:var(--blue);color:#fff}.menu svg{width:18px;height:18px}.main{margin-left:258px;width:calc(100% - 258px)}.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px}.userbox{display:flex;align-items:center;gap:12px}.avatar{width:36px;height:36px;border-radius:50%;background:#93a4b8;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;object-fit:cover}.content{padding:24px}.page-title{font-size:22px;font-weight:800;margin:0 0 18px}.grid{display:grid;gap:16px}.grid-4{grid-template-columns:repeat(4,1fr)}.grid-3{grid-template-columns:repeat(3,1fr)}.card{background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 22px rgba(15,39,66,.04);padding:18px}.kpi{display:flex;justify-content:space-between;align-items:center}.kpi h3{margin:0;color:var(--muted);font-size:13px}.kpi .num{font-size:28px;font-weight:800;margin-top:8px}.badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700}.b-ok{background:#dcfce7;color:#15803d}.b-warn{background:#fef3c7;color:#b45309}.b-bad{background:#fee2e2;color:#b91c1c}.b-blue{background:#dbeafe;color:#1d4ed8}.btn{border:0;border-radius:8px;background:var(--blue);color:#fff;padding:10px 14px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-flex;gap:8px;align-items:center}.btn.secondary{background:#e8eef8;color:#16324f}.btn.danger{background:var(--bad)}.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:14px}.table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden}.table th,.table td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:left}.table th{background:#f8fafc;color:#334155;font-size:12px}.form{display:grid;gap:12px}.form label{font-weight:700;font-size:13px}.input,select,textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px;background:#fff}textarea{min-height:90px}.split{display:grid;grid-template-columns:1fr 1fr;gap:14px}.alert{padding:12px 14px;border-radius:10px;margin-bottom:14px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.okalert{background:#ecfdf5;color:#065f46;border-color:#bbf7d0}.login-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#0f2742,#2563eb)}.login-card{width:420px;background:#fff;border-radius:18px;padding:28px;box-shadow:0 20px 60px rgba(0,0,0,.25)}.login-card h1{margin-top:0}.subnav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.subnav a{padding:9px 12px;border-radius:8px;background:#fff;border:1px solid var(--line);text-decoration:none;color:#17324d}.subnav a.active{background:var(--blue);color:#fff}.footer-note{color:var(--muted);font-size:12px;margin-top:16px}@media(max-width:1000px){.grid-4,.grid-3,.split{grid-template-columns:1fr}.sidebar{width:220px}.main{margin-left:220px;width:calc(100% - 220px)}}
.permission-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:8px 0 14px}.check-card{display:block;border:1px solid var(--line);border-radius:10px;padding:10px;background:#f8fafc}.check-card small{display:block;color:var(--muted);margin-top:3px}.table form{margin:0}hr{border:0;border-top:1px solid var(--line);margin:18px 0}@media(max-width:1100px){.permission-grid{grid-template-columns:1fr}}
.userbox-btn{border:0;background:transparent;cursor:pointer;color:var(--text);font:inherit}.userbox span{text-align:right}.userbox small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:999;align-items:center;justify-content:center;padding:18px}.modal-card{width:min(620px,96vw);background:#fff;border-radius:18px;box-shadow:0 25px 80px rgba(0,0,0,.28);border:1px solid var(--line);padding:20px}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.modal-head h2{margin:0}.modal-close{border:0;background:#eef2f7;color:#0f172a;border-radius:10px;width:36px;height:36px;font-size:24px;cursor:pointer}.profile-preview{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid var(--line);border-radius:14px;background:#f8fafc}.big-avatar{width:72px!important;height:72px!important;font-size:26px!important}.avatar img{object-fit:cover}.menu a[href="#"]{opacity:.72}.menu a[href="#"]:hover{opacity:1}
/* Fase 1.3 responsive + modal seguro */
.top-actions{display:flex;align-items:center;gap:14px}.lang-switch{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:#fff}.lang-switch a{padding:6px 10px;text-decoration:none;color:var(--muted);font-weight:800;font-size:12px}.lang-switch a.active{background:var(--blue);color:#fff}.mobile-menu{display:none;border:0;background:#e8eef8;color:#16324f;border-radius:9px;width:38px;height:38px;font-size:22px}.modal-backdrop{overflow:auto}.profile-modal{max-height:calc(100vh - 36px);overflow:auto}.modal-card{margin:auto}.responsive-table{overflow:auto;width:100%}.responsive-table table{min-width:760px}.backup-path{font-family:Consolas,monospace;font-size:12px;color:var(--muted);word-break:break-all}.mini-note{color:var(--muted);font-size:12px;line-height:1.45}
@media(max-width:900px){.app{display:block}.sidebar{transform:translateX(-102%);transition:.2s ease;z-index:1000;width:280px}.sidebar-open .sidebar{transform:translateX(0)}.main{margin-left:0;width:100%}.topbar{position:sticky;top:0;z-index:800;padding:0 12px;gap:10px}.mobile-menu{display:inline-flex;align-items:center;justify-content:center}.topbar>strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.content{padding:14px}.grid[style],.grid-4,.grid-3,.split{grid-template-columns:1fr!important}.card{padding:14px}.userbox span{display:none}.modal-backdrop{align-items:flex-start;justify-content:center;padding:10px}.modal-card{width:100%;border-radius:14px;padding:14px;max-height:calc(100vh - 20px)}.profile-preview{align-items:flex-start}.big-avatar{width:58px!important;height:58px!important;font-size:22px!important}.login-card{width:min(94vw,420px);padding:22px}.toolbar{align-items:stretch;flex-direction:column}.btn{justify-content:center}.table th,.table td{padding:9px 8px;font-size:12px}}
@media(min-width:901px){body.sidebar-open .sidebar{transform:none}}

/* Fase 1.4 layout hardening: sidebar scroll + cards/table responsiveness */
html,body{width:100%;max-width:100%;overflow-x:hidden}.app{min-width:0}.sidebar{display:flex;flex-direction:column;overflow:hidden}.sidebar .menu{flex:1;overflow-y:auto;overflow-x:hidden;padding-bottom:28px;scrollbar-width:thin;scrollbar-color:#3b82f6 rgba(255,255,255,.08)}.sidebar .menu::-webkit-scrollbar{width:8px}.sidebar .menu::-webkit-scrollbar-thumb{background:#3b82f6;border-radius:999px}.sidebar .menu::-webkit-scrollbar-track{background:rgba(255,255,255,.06)}.main{min-width:0;overflow-x:hidden}.content{max-width:100%;overflow-x:hidden}.topbar{min-width:0}.topbar>strong{min-width:0}.card{min-width:0;max-width:100%;overflow:hidden}.grid{min-width:0;max-width:100%}.grid[style]{grid-template-columns:minmax(300px,420px) minmax(0,1fr)!important}.table{max-width:100%;display:block;overflow-x:auto;white-space:nowrap}.table th,.table td{vertical-align:middle}.table td{max-width:280px;overflow:hidden;text-overflow:ellipsis}.table td:hover{overflow:visible;white-space:normal;word-break:break-word}.responsive-table{max-width:100%;overflow-x:auto}.responsive-table .table{display:table;min-width:760px}.form{min-width:0}.input,select,textarea{min-width:0}.btn{white-space:nowrap}.footer-note{max-width:100%;word-break:break-word}.profile-modal{overscroll-behavior:contain}
@media(max-width:1250px){.grid[style]{grid-template-columns:1fr!important}.card{overflow:hidden}.content{padding:18px}.table{font-size:13px}.table th,.table td{padding:9px 10px}.userbox span b{max-width:240px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media(max-width:900px){.sidebar{height:100vh}.sidebar-open{overflow:hidden}.sidebar-open:after{content:"";position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:900}.sidebar-open .sidebar{z-index:1001}.top-actions{gap:8px}.lang-switch a{padding:6px 9px}.userbox .avatar{width:34px;height:34px}.content{padding:12px}.grid[style],.grid-4,.grid-3,.split{grid-template-columns:1fr!important}.table{font-size:12px}.table td{max-width:220px}.card h3{font-size:16px}.page-title{font-size:20px}.modal-card{max-width:100%;overflow:auto}.profile-preview{gap:10px}.profile-preview>div{min-width:0}.profile-preview strong,.profile-preview small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media(max-width:560px){.brand{font-size:16px}.sidebar{width:86vw}.topbar{height:auto;min-height:64px;flex-wrap:wrap;padding:8px 10px}.topbar>strong{order:3;flex-basis:100%;font-size:13px}.top-actions{margin-left:auto}.userbox .avatar{width:32px;height:32px}.content{padding:10px}.page-title{font-size:18px}.card{padding:12px;border-radius:10px}.kpi .num{font-size:24px}.login-card{width:94vw}.btn{width:100%;justify-content:center}.table td{max-width:180px}.modal-backdrop{padding:6px}.modal-card{border-radius:12px;padding:12px;max-height:calc(100vh - 12px)}.big-avatar{width:52px!important;height:52px!important}.split{gap:10px}}

/* Fase 1.5 SaaS control */
.muted{color:var(--muted);line-height:1.5}.license-lock-card{max-width:560px}.row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row-actions form{margin:0}.row-actions .btn{padding:8px 10px}.table .row-actions .btn{width:auto}.btn.danger:hover{filter:brightness(.95)}@media(max-width:560px){.row-actions{display:grid}.row-actions .btn{width:100%}}


/* Fase 2: Projects, calendars, currencies */
.project-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 14px}.phase-card{margin-bottom:16px;background:linear-gradient(135deg,#fff,#f8fbff)}.phase-card span{color:var(--muted)}.phase2-grid{grid-template-columns:minmax(320px,520px) minmax(0,1fr)!important}.days-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.svg-card{overflow:hidden}.mini-gantt{width:100%;height:auto}.mini-gantt line{stroke:#cbd5e1;stroke-width:2}.mini-gantt .sum{fill:#334155}.mini-gantt .bar1{fill:#22c55e}.mini-gantt .bar2{fill:#3b82f6}.mini-gantt path{stroke:#60a5fa;stroke-width:3;fill:none;marker-end:url(#arrow)}.project-status-dot{width:10px;height:10px;border-radius:50%;display:inline-block;background:var(--blue);margin-right:6px}.content .phase2-grid .table{min-width:860px}@media(max-width:1200px){.phase2-grid{grid-template-columns:1fr!important}.days-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:560px){.project-toolbar{display:grid}.project-toolbar .btn{width:100%}.days-grid{grid-template-columns:1fr}.phase2-grid{grid-template-columns:1fr!important}}

/* Fase 2.1 Project module hardening */
.menu-group{margin:4px 0 10px}.menu-group-head{display:flex;align-items:center;gap:11px;color:#dbeafe;padding:10px 12px;font-weight:800}.menu a.submenu{margin-left:20px;padding-left:12px;font-size:13px;border-left:1px solid rgba(255,255,255,.12);border-radius:7px}.grid-5{grid-template-columns:repeat(5,1fr)}.dash-kpis .kpi{min-height:118px}.kpi-icon{width:42px;height:42px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:900}.kpi-icon.ok{background:#dcfce7;color:#16a34a}.kpi-icon.money{background:#dbeafe;color:#2563eb}.kpi-icon.warn{background:#fef3c7;color:#f97316}.kpi-icon.bad{background:#fee2e2;color:#ef4444}.green{color:#16a34a}.orange{color:#f97316}.red{color:#ef4444}.muted-small{color:var(--muted);font-size:15px}.spark{width:75px;height:40px}.spark polyline{fill:none;stroke:#3b82f6;stroke-width:3}.dash-charts{grid-template-columns:1.05fr 1.3fr 1.55fr;margin-top:16px}.donut-wrap{display:flex;align-items:center;gap:18px}.donut,.mini-donut{width:150px;max-width:100%}.donut-bg{fill:none;stroke:#e5e7eb;stroke-width:6}.donut-green,.donut-orange,.donut-red{fill:none;stroke-width:6;transform:rotate(-90deg);transform-origin:center}.donut-green{stroke:#22c55e}.donut-orange{stroke:#f59e0b}.donut-red{stroke:#ef4444}.donut-num{font-weight:900;font-size:7px;fill:var(--text)}.donut-label{font-size:3px;fill:var(--muted)}.legend{list-style:none;margin:0;padding:0;line-height:2}.legend .c{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px}.green-bg{background:#22c55e}.orange-bg{background:#f59e0b}.red-bg{background:#ef4444}.bar-list{display:grid;gap:13px}.bar-row{display:grid;grid-template-columns:130px 1fr 44px;align-items:center;gap:12px}.bar-row>span{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bar-row div{height:12px;background:#eef2f7;border-radius:999px;overflow:hidden}.bar-row i{display:block;height:100%;background:linear-gradient(90deg,#22c55e,#3b82f6);border-radius:999px}.line-chart{width:100%;height:auto}.line-chart .gridlines line{stroke:#e5e7eb}.line-chart .plan{fill:none;stroke:#3b82f6;stroke-width:3}.line-chart .real{fill:none;stroke:#22c55e;stroke-width:3}.line-chart text{font-size:12px;fill:var(--muted)}.kanban-section{margin-top:16px}.kanban-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.kanban-demo{display:grid;grid-template-columns:repeat(5,minmax(170px,1fr)) 220px;gap:12px;overflow:auto;padding-bottom:8px}.kanban-col,.kanban-summary{border:1px solid var(--line);border-radius:12px;background:#fbfdff;padding:12px;min-height:240px}.kanban-col{border-top:4px solid #64748b}.kanban-col.blue{border-top-color:#38bdf8}.kanban-col.orange-col{border-top-color:#f59e0b}.kanban-col.purple-col{border-top-color:#8b5cf6}.kanban-col.green-col{border-top-color:#22c55e}.kanban-col h4,.kanban-summary h4{margin:0 0 12px}.kanban-col h4 span{float:right;background:#e5e7eb;border-radius:999px;padding:2px 8px}.ticket{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px;margin-bottom:10px;box-shadow:0 5px 16px rgba(15,39,66,.04);font-size:12px}.ticket b{display:block;margin:5px 0}.ticket small{background:#fef3c7;color:#b45309;border-radius:999px;padding:3px 8px}.mini-donut{width:110px}.phase-card{line-height:1.5}.currency-help{color:var(--muted)}@media(max-width:1300px){.grid-5{grid-template-columns:repeat(2,1fr)}.dash-charts{grid-template-columns:1fr}.kanban-demo{grid-template-columns:repeat(3,minmax(180px,1fr))}}@media(max-width:700px){.grid-5{grid-template-columns:1fr}.donut-wrap{display:block}.bar-row{grid-template-columns:1fr}.kanban-demo{grid-template-columns:repeat(1,minmax(220px,1fr))}.kanban-head{display:block}.kanban-head .btn{margin-top:8px}}

/* Fase 2.2: responsive real 100%, sidebar colapsable y submenús toggle */
:root{--sidebar-w:248px;--sidebar-mini:76px}body{font-size:13px}.sidebar{width:var(--sidebar-w)}.main{margin-left:var(--sidebar-w);width:calc(100% - var(--sidebar-w))}.brand{height:64px;font-size:17px;white-space:nowrap}.brand span{overflow:hidden;text-overflow:ellipsis}.menu{padding:12px 10px}.menu a,.menu-group-head{min-height:42px}.menu a span,.menu-group-head span{min-width:0;overflow:hidden;text-overflow:ellipsis}.menu-group-head{width:100%;border:0;background:transparent;color:#dbeafe;text-align:left;display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:8px;cursor:pointer;font:inherit;font-weight:800}.menu-group-head:hover,.menu-group.open>.menu-group-head{background:rgba(37,99,235,.45);color:#fff}.menu-group-head svg{width:18px;height:18px;flex:0 0 auto}.menu-group-head b{margin-left:auto;transition:.18s ease}.menu-group.open .menu-group-head b{transform:rotate(180deg)}.submenu-wrap{display:none}.menu-group.open .submenu-wrap{display:block}.sidebar-toggle{border:0;background:#e8eef8;color:#16324f;border-radius:10px;width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto}.sidebar-toggle svg{width:19px;height:19px}.content{padding:18px;container-type:inline-size}.page-title{font-size:clamp(20px,2vw,26px);margin-bottom:14px}.card{padding:15px;border-radius:12px}.grid{gap:12px}.grid-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.dash-kpis .kpi{min-height:92px}.kpi h3{font-size:12px}.kpi .num{font-size:clamp(24px,2.2vw,32px)}.kpi-icon{width:38px;height:38px;flex:0 0 auto}.spark{width:62px;height:34px}.dash-charts{grid-template-columns:1fr 1.22fr 1.48fr!important;gap:12px}.dash-charts .card{min-height:238px}.donut{width:128px}.bar-row{grid-template-columns:minmax(96px,125px) 1fr 40px}.line-chart{max-height:190px}.kanban-demo{grid-template-columns:repeat(5,minmax(150px,1fr)) 190px}.kanban-col,.kanban-summary{min-height:220px;padding:10px}.ticket{padding:8px;font-size:11px}.responsive-table{overflow:auto}.topbar{height:64px;padding:0 18px;gap:12px}.topbar>strong{font-size:15px;white-space:nowrap}.top-actions{margin-left:auto}.table th,.table td{padding:9px 10px}.sidebar-collapsed .sidebar{width:var(--sidebar-mini)}.sidebar-collapsed .main{margin-left:var(--sidebar-mini);width:calc(100% - var(--sidebar-mini))}.sidebar-collapsed .brand{padding:0 18px;justify-content:center}.sidebar-collapsed .brand span,.sidebar-collapsed .menu-title,.sidebar-collapsed .menu a span,.sidebar-collapsed .menu-group-head span,.sidebar-collapsed .menu-group-head b{display:none}.sidebar-collapsed .menu a,.sidebar-collapsed .menu-group-head{justify-content:center;padding:11px 8px}.sidebar-collapsed .menu a.submenu{margin-left:0;border-left:0}.sidebar-collapsed .submenu-wrap{display:none!important}.sidebar-collapsed .menu-group.open>.menu-group-head{background:var(--blue)}
@media(max-width:1500px){.content{padding:16px}.grid-5{grid-template-columns:repeat(5,minmax(135px,1fr))!important}.dash-charts{grid-template-columns:1fr 1.15fr 1.35fr!important}.donut{width:118px}.kpi-icon{width:34px;height:34px}.kanban-demo{grid-template-columns:repeat(5,minmax(138px,1fr)) 175px}.bar-row{grid-template-columns:100px 1fr 34px}.card{padding:14px}.dash-kpis .kpi{min-height:86px}}
@media(max-width:1250px){.grid-5{grid-template-columns:repeat(3,minmax(0,1fr))!important}.dash-charts{grid-template-columns:1fr!important}.dash-charts .card{min-height:auto}.kanban-demo{grid-template-columns:repeat(3,minmax(180px,1fr))}.donut-wrap{display:flex}}
@media(max-width:900px){:root{--sidebar-w:280px}.sidebar-toggle{display:none}.sidebar-collapsed .sidebar{width:var(--sidebar-w)}.sidebar-collapsed .main{margin-left:0;width:100%}.sidebar-collapsed .brand span,.sidebar-collapsed .menu-title,.sidebar-collapsed .menu a span,.sidebar-collapsed .menu-group-head span,.sidebar-collapsed .menu-group-head b{display:initial}.sidebar-collapsed .menu a,.sidebar-collapsed .menu-group-head{justify-content:flex-start;padding:11px 12px}.sidebar-collapsed .submenu-wrap{display:block!important}.main{margin-left:0;width:100%}.grid-5{grid-template-columns:repeat(2,minmax(0,1fr))!important}.topbar{height:auto;min-height:62px}.kanban-demo{grid-template-columns:repeat(2,minmax(220px,1fr))}.donut-wrap{display:flex}.content{padding:12px}}
@media(max-width:620px){.grid-5{grid-template-columns:1fr!important}.dash-kpis .kpi{min-height:82px}.donut-wrap{display:block}.kanban-demo{grid-template-columns:1fr}.top-actions{gap:6px}.lang-switch a{padding:5px 8px}.card{padding:12px}.content{padding:10px}.page-title{font-size:20px}.topbar>strong{font-size:13px}.kpi .num{font-size:24px}}

/* Fase 2.3: sidebar estable, grupos colapsables y tabs persistentes */
.sidebar{overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;overscroll-behavior:contain}.menu-group .submenu-wrap{padding-top:6px}.menu-group:not(.open) .submenu-wrap{display:none!important}.menu-group.open .submenu-wrap{display:block!important}.menu-group-head{position:relative}.menu-group-head b{font-size:14px;line-height:1}.menu-group.open>.menu-group-head{background:rgba(37,99,235,.55)}.menu-group .submenu.active{background:var(--blue);color:#fff;border-left-color:rgba(255,255,255,.45)}.project-tabs{margin:0 0 14px;position:relative;z-index:1}.project-tabs .btn{min-width:132px;text-align:center}.project-tabs .btn.secondary{background:#e8eef8;color:#0f2742}.project-tabs .btn:not(.secondary){box-shadow:0 8px 18px rgba(37,99,235,.18)}.sidebar-collapsed .menu-group-head b{display:none!important}.sidebar-collapsed .menu-group .submenu-wrap{display:none!important}@media(max-width:900px){.menu-group.open .submenu-wrap{display:block!important}.project-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.project-tabs .btn{width:100%;min-width:0}.sidebar{scrollbar-gutter:auto}}@media(max-width:560px){.project-tabs{grid-template-columns:1fr}.topbar .userbox span{display:none}.top-actions{max-width:55%;justify-content:flex-end}}


/* Fase 2.4: Kanban funcional en dashboard de proyectos */
.kanban-select-card{margin-top:16px}.kanban-project-filter{display:flex;align-items:center;gap:12px;max-width:560px}.kanban-project-filter label{font-weight:800;margin:0}.kanban-project-filter select{min-width:280px}.muted-text{color:var(--muted);margin:.25rem 0}.kanban-live-card{margin-top:14px}.kanban-live{display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;padding:4px 0 14px;scroll-snap-type:x proximity;align-items:stretch}.kb-col{background:#fbfdff;border:1px solid var(--line);border-radius:14px;min-height:360px;display:flex;flex-direction:column;flex:0 0 318px;scroll-snap-align:start}.kb-col-head{border-top:4px solid #64748b;padding:12px;display:flex;align-items:center;gap:8px;border-radius:14px 14px 0 0;background:#fff;border-bottom:1px solid var(--line)}.kb-col-head strong{flex:1}.kb-col-head span{background:#e8eef8;border-radius:999px;min-width:26px;text-align:center;padding:3px 8px;font-weight:800}.kb-col-head button{border:0;background:#eef4ff;border-radius:8px;padding:5px 8px;cursor:pointer}.kb-col-body{padding:10px;min-height:300px;flex:1;overflow-y:auto;max-height:520px}.kb-ticket{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:10px;box-shadow:0 7px 18px rgba(15,39,66,.05);cursor:pointer}.kb-ticket:hover{border-color:#93c5fd;box-shadow:0 10px 24px rgba(37,99,235,.10)}.kb-ticket-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.kb-ticket b{display:block;margin-bottom:6px}.kb-ticket-actions{margin-top:8px;display:flex;align-items:center;gap:5px;justify-content:flex-end}.kb-ticket-actions button{border:0;background:#e8eef8;border-radius:7px;padding:4px 7px;cursor:pointer}.kb-link-chip{display:inline-flex;margin:4px 0 2px;padding:3px 8px;border-radius:999px;background:#e0f2fe;color:#075985;font-size:11px;font-weight:800}.kb-link-box{border:1px solid var(--line);border-radius:12px;background:#f8fbff;padding:10px;margin:10px 0}.checkline{display:flex!important;align-items:center;gap:8px;font-weight:700;margin:8px 0 4px!important}.checkline input{width:18px;height:18px}.ticket-avatar{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#94a3b8;color:#fff;font-weight:800;object-fit:cover}.b-warn{background:#fef3c7;color:#b45309}.b-critical{background:#fee2e2;color:#991b1b}.kb-modal{width:min(1040px,94vw);max-height:92vh;overflow:auto}.kb-tabs{display:flex;gap:6px;overflow:auto;margin:10px 0 14px;border-bottom:1px solid var(--line);padding-bottom:8px}.kb-tabs button{border:0;background:#e8eef8;color:#0f2742;padding:9px 11px;border-radius:9px;cursor:pointer;white-space:nowrap;font-weight:800}.kb-tabs button.active{background:var(--blue);color:#fff}.kb-tab-panel{display:none}.kb-tab-panel.active{display:block}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.kb-tab-panel textarea{min-height:95px}@media(max-width:1350px){.kb-col{flex-basis:300px}}@media(max-width:900px){.kb-col{flex-basis:285px}.kanban-project-filter{display:block}.kanban-project-filter select{width:100%;min-width:0;margin-top:6px}.kb-modal{width:96vw}.kb-tabs{gap:4px}.kb-tabs button{padding:8px 9px;font-size:12px}}@media(max-width:620px){.kb-col{min-height:260px;flex-basis:82vw}.kb-modal{width:98vw;max-height:94vh}.modal-actions{display:grid}.modal-actions .btn{width:100%}}

/* Phase 3 EDT / SVG Gantt */
.gantt-topbar{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:14px}.inline-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.inline-form select{min-width:220px}.toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.gantt-shell{padding:0;display:grid;grid-template-columns:minmax(620px, 48%) 1fr;overflow:hidden}.wbs-table-wrap{overflow:auto;border-right:1px solid var(--line);max-height:520px}.wbs-table th,.wbs-table td{font-size:12px;white-space:nowrap}.wbs-row{cursor:pointer}.wbs-row.selected{background:#dbeafe}.summary-row{font-weight:800;background:#f1f5f9}.gantt-svg-wrap{overflow:auto;max-height:520px;background:white}.gantt-svg{display:block;background:#fff}.g-grid,.g-row{stroke:#e2e8f0;stroke-width:1}.g-head{font-size:11px;fill:#334155}.g-bar.blue{fill:#3b82f6}.g-bar.green{fill:#22c55e}.g-bar.orange{fill:#f59e0b}.g-bar.purple{fill:#8b5cf6}.g-bar.dark{fill:#334155}.g-progress{fill:rgba(255,255,255,.22)}.g-summary{stroke:#334155;stroke-width:8;stroke-linecap:round;fill:none}.g-link{stroke:#3b82f6;stroke-width:1.6;fill:none}.g-today{stroke:#ef4444;stroke-width:1.4;stroke-dasharray:4 4}.empty-gantt{min-height:240px;display:grid;place-items:center;color:#64748b}.wbs-detail{margin-top:14px;padding:0}.detail-head{display:flex;gap:10px;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}.wbs-tabs{padding:12px 14px;border-bottom:1px solid var(--line);overflow-x:auto}.wbs-tab-panel{display:none;padding:16px}.wbs-tab-panel.active{display:block}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.wbs-tab-panel textarea{min-height:100px}.wbs-tab-panel .split{margin-bottom:12px}.kb-card .ticket-specialty{display:inline-block;width:12px;height:12px;border-radius:999px;margin-right:5px;vertical-align:middle}.ticket-specialty.blue{background:#3b82f6}.ticket-specialty.green{background:#22c55e}.ticket-specialty.orange{background:#f59e0b}.ticket-specialty.purple{background:#8b5cf6}.ticket-specialty.dark{background:#334155}
@media(max-width:1100px){.gantt-shell{grid-template-columns:1fr}.wbs-table-wrap,.gantt-svg-wrap{max-height:none}.detail-grid{grid-template-columns:1fr}.gantt-topbar{align-items:flex-start;flex-direction:column}}
/* Phase 3.1 WBS/Gantt usability fixes: compact view, stable detail and safer 100% zoom */
.main-content .page{max-width:100%;}
.gantt-topbar.card{padding:12px 14px;}
.gantt-topbar{display:grid;grid-template-columns:minmax(300px,1fr) auto;gap:12px;align-items:end;}
.gantt-topbar label{font-size:13px;margin-bottom:4px;}
.gantt-topbar select{height:40px;font-size:14px;}
.toolbar-actions .btn,.toolbar-actions button{height:40px;padding:0 14px;font-size:14px;}
.gantt-shell{grid-template-columns:minmax(520px, 46%) minmax(520px,54%);min-height:300px;}
.wbs-table-wrap,.gantt-svg-wrap{max-height:360px;}
.wbs-table th,.wbs-table td{font-size:12px;padding:9px 10px;}
.gantt-svg-wrap{min-width:0;}
.wbs-detail{margin-top:12px;}
.detail-head{position:sticky;top:0;background:#fff;z-index:5;}
.ml-auto{margin-left:auto}.btn.tiny{height:34px;padding:0 12px;font-size:13px;border-radius:10px;}
.wbs-tabs{display:flex;gap:8px;padding:10px 14px;}
.wbs-tabs button{white-space:nowrap;padding:10px 14px;font-size:14px;}
.wbs-tab-panel{padding:14px;}
.wbs-tab-panel textarea{min-height:78px;}
.wbs-tab-panel .split{gap:10px;}
.wbs-detail-form .modal-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);padding:10px 14px;margin:0 -14px -14px;z-index:4;}
@media(max-width:1300px){.gantt-topbar{grid-template-columns:1fr}.gantt-shell{grid-template-columns:1fr}.wbs-table-wrap,.gantt-svg-wrap{max-height:340px}.gantt-svg-wrap{border-top:1px solid var(--line)}}
@media(max-width:760px){.gantt-topbar.card{padding:10px}.inline-form{display:block}.inline-form select{width:100%;min-width:0;margin-bottom:8px}.toolbar-actions{display:grid;grid-template-columns:1fr 1fr}.toolbar-actions .btn,.toolbar-actions button{width:100%;font-size:13px;padding:0 8px}.wbs-table-wrap,.gantt-svg-wrap{max-height:300px}.detail-grid{grid-template-columns:1fr}.wbs-tab-panel .split{grid-template-columns:1fr}.wbs-tabs button{font-size:13px;padding:9px 12px}}


/* Phase 3.2: EDT/Gantt restored layout, modal create/edit behavior and 100% browser fit */
.content{padding:18px 20px;}
.gantt-topbar.card{padding:12px 14px;margin-bottom:12px;}
.gantt-topbar{display:grid!important;grid-template-columns:minmax(360px,1fr) auto!important;gap:14px;align-items:end!important;}
.gantt-form{display:grid!important;grid-template-columns:minmax(260px,1fr) minmax(180px,260px);gap:10px;align-items:end;}
.gantt-form label{display:block;font-weight:700;color:#334155;margin-bottom:4px;}
.gantt-form select{height:38px;}
.toolbar-actions{display:flex!important;gap:8px;align-items:end;justify-content:flex-end;flex-wrap:wrap;}
.toolbar-actions .btn{height:38px;padding:0 12px;font-size:13px;white-space:nowrap;}
.toolbar-actions .icon-only{width:42px;justify-content:center;padding:0;}
.gantt-shell.card{padding:0!important;display:grid!important;grid-template-columns:minmax(580px,52%) minmax(500px,48%)!important;min-height:330px;max-height:430px;overflow:hidden!important;border-radius:14px;}
.wbs-table-wrap{max-height:430px!important;overflow:auto!important;border-right:1px solid var(--line);}
.gantt-svg-wrap{max-height:430px!important;overflow:auto!important;background:#fff;min-width:0;}
.wbs-table{min-width:900px;}
.wbs-table th,.wbs-table td{font-size:12px!important;padding:8px 9px!important;white-space:nowrap;}
.wbs-row.selected{background:#dbeafe!important;}
.wbs-row:hover{background:#eef6ff;}
.summary-row{font-weight:800!important;background:#f8fafc;}
.gantt-svg{min-width:800px;}
.wbs-detail.card{padding:0!important;margin-top:12px;border-radius:14px;overflow:hidden;}
.detail-head{padding:10px 14px!important;background:#fff;position:sticky;top:0;z-index:5;}
.wbs-tabs{display:flex!important;gap:8px;overflow-x:auto;padding:10px 12px!important;margin:0!important;background:#fff;}
.wbs-tabs button{white-space:nowrap;font-size:13px!important;padding:9px 12px!important;border-radius:9px;}
.wbs-tab-panel{padding:12px 14px!important;}
.wbs-tab-panel textarea{min-height:76px!important;}
.wbs-tab-panel .split{gap:10px!important;}
.wbs-context-menu{position:absolute;z-index:9999;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 36px rgba(15,39,66,.16);padding:6px;min-width:180px;}
.wbs-context-menu button{display:block;width:100%;border:0;background:#fff;text-align:left;padding:9px 10px;border-radius:8px;cursor:pointer;font-weight:700;color:#0f2742;}
.wbs-context-menu button:hover{background:#e8eef8;}
.wbs-create-modal{max-width:760px;}
.ml-auto{margin-left:auto}.btn.tiny{height:32px;padding:0 10px;font-size:12px;border-radius:9px;}
@media(max-width:1250px){
 .gantt-topbar{grid-template-columns:1fr!important;}
 .toolbar-actions{justify-content:flex-start;}
 .gantt-shell.card{grid-template-columns:1fr!important;max-height:none;}
 .wbs-table-wrap,.gantt-svg-wrap{max-height:330px!important;border-right:0;}
 .gantt-svg-wrap{border-top:1px solid var(--line);}
}
@media(max-width:760px){
 .content{padding:10px;}
 .gantt-form{grid-template-columns:1fr!important;}
 .toolbar-actions{display:grid!important;grid-template-columns:1fr 1fr;}
 .toolbar-actions .btn{width:100%;}
 .toolbar-actions .icon-only{width:100%;}
 .wbs-table-wrap,.gantt-svg-wrap{max-height:280px!important;}
 .detail-grid,.wbs-tab-panel .split{grid-template-columns:1fr!important;}
 .wbs-create-modal{width:96vw;}
}

/* REV-F: EDT/Gantt single-scroll cleanup
   Evita la doble barra horizontal: el scroll maestro queda en .gantt-shell.
   Tabla EDT y SVG Gantt quedan dentro del mismo lienzo, alineados por filas. */
.gantt-shell.card{
  display:flex!important;
  align-items:flex-start!important;
  grid-template-columns:none!important;
  overflow:auto!important;
  max-height:430px!important;
  min-height:330px!important;
  padding:0!important;
  border-radius:14px;
}
.gantt-shell.card .wbs-table-wrap,
.gantt-shell.card .gantt-svg-wrap{
  overflow:visible!important;
  max-height:none!important;
  flex:0 0 auto!important;
}
.gantt-shell.card .wbs-table-wrap{
  border-right:1px solid var(--line);
  background:#fff;
}
.gantt-shell.card .wbs-table{
  width:max-content;
  min-width:760px;
}
.gantt-shell.card .gantt-svg-wrap{
  min-width:max-content;
  background:#fff;
}
.gantt-shell.card .gantt-svg{
  display:block;
}
@media(max-width:1300px){
  .gantt-shell.card{
    display:flex!important;
    max-height:430px!important;
    overflow:auto!important;
  }
  .gantt-shell.card .gantt-svg-wrap{border-top:0!important;}
}
@media(max-width:760px){
  .gantt-shell.card{max-height:360px!important;}
}


/* REV-G: divisor ajustable EDT / Gantt.
   La tabla y el Gantt quedan visibles lado a lado; el usuario arrastra la línea ↔ para abrir más espacio al Gantt. */
.gantt-shell.card#wbsGanttShell{
  --wbs-table-width: minmax(520px, 58%);
  display:grid!important;
  grid-template-columns: var(--wbs-table-width) 12px minmax(340px, 1fr)!important;
  align-items:stretch!important;
  overflow:hidden!important;
  max-height:430px!important;
  min-height:330px!important;
  padding:0!important;
  border-radius:14px;
}
#wbsGanttShell .wbs-table-wrap,
#wbsGanttShell .gantt-svg-wrap{
  overflow:auto!important;
  max-height:430px!important;
  min-height:330px!important;
  min-width:0!important;
  flex:initial!important;
}
#wbsGanttShell .wbs-table-wrap{
  border-right:0!important;
  background:#fff;
}
#wbsGanttShell .wbs-table{
  min-width:900px!important;
  width:max-content!important;
}
#wbsGanttShell .gantt-svg-wrap{
  background:#fff;
}
.wbs-gantt-splitter{
  position:relative;
  width:12px;
  min-width:12px;
  cursor:col-resize;
  background:linear-gradient(90deg,#e2e8f0,#f8fafc,#e2e8f0);
  border-left:1px solid var(--line);
  border-right:1px solid var(--line);
  z-index:3;
}
.wbs-gantt-splitter span{
  position:sticky;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:28px;
  margin-left:-6px;
  border-radius:999px;
  background:#fff;
  color:#334155;
  border:1px solid var(--line);
  box-shadow:0 2px 8px rgba(15,23,42,.16);
  font-size:13px;
  pointer-events:none;
}
.wbs-gantt-splitter:hover,
body.wbs-resizing .wbs-gantt-splitter{
  background:#bfdbfe;
}
body.wbs-resizing{
  cursor:col-resize!important;
  user-select:none!important;
}
@media(max-width:900px){
  .gantt-shell.card#wbsGanttShell{
    grid-template-columns:1fr!important;
    max-height:none!important;
  }
  #wbsGanttShell .wbs-gantt-splitter{display:none!important;}
  #wbsGanttShell .wbs-table-wrap,
  #wbsGanttShell .gantt-svg-wrap{max-height:320px!important;min-height:0!important;}
  #wbsGanttShell .gantt-svg-wrap{border-top:1px solid var(--line);}
}

/* REV-H: eliminar doble scrollbar horizontal dentro de la tabla EDT.
   Causa: la regla global .table{display:block;overflow-x:auto} convertia la tabla EDT en otro contenedor scrollable.
   Se deja un solo scroll horizontal: el del panel EDT/Gantt, no el de la tabla interna. */
#wbsGanttShell .wbs-table{
  display:table!important;
  overflow:visible!important;
  max-width:none!important;
  table-layout:auto!important;
}
#wbsGanttShell .wbs-table th,
#wbsGanttShell .wbs-table td{
  max-width:none!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}
#wbsGanttShell .wbs-table-wrap{
  overflow:auto!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
}
#wbsGanttShell .wbs-table-wrap table.wbs-table::-webkit-scrollbar{
  display:none!important;
}


/* REV-K: toolbar EDT/Gantt compacta sin tocar lógica WBS/Gantt */
.content{padding-top:12px;}
.gantt-topbar.card{padding:10px 12px!important;margin-top:0!important;margin-bottom:10px!important;}
.gantt-topbar{grid-template-columns:minmax(440px,1fr) auto!important;gap:10px!important;align-items:end!important;}
.gantt-form{grid-template-columns:minmax(260px,390px) minmax(120px,150px)!important;gap:10px!important;}
.gantt-form select{height:36px!important;}
.toolbar-actions{gap:7px!important;align-items:end!important;flex-wrap:nowrap!important;}
.toolbar-actions .btn{height:36px!important;padding:0 10px!important;font-size:13px!important;}
.toolbar-actions .icon-only{width:40px!important;min-width:40px!important;}
.wbs-selected-badge{white-space:nowrap;align-self:center;}
@media(max-width:1180px){
 .gantt-topbar{grid-template-columns:1fr!important;}
 .toolbar-actions{justify-content:flex-start!important;flex-wrap:wrap!important;}
 .gantt-form{grid-template-columns:minmax(260px,390px) minmax(120px,150px)!important;}
}
@media(max-width:760px){
 .gantt-form{grid-template-columns:1fr!important;}
 .toolbar-actions{display:grid!important;grid-template-columns:1fr 1fr!important;}
 .toolbar-actions .btn,.toolbar-actions .icon-only{width:100%!important;}
}

/* PDM-1/2: predecessor inline editor using visible row ID (1..n), relation FC/CC/FF/CF and lag +/-days */
.wbs-rownum-col{width:54px;min-width:54px;text-align:center;color:#334155;font-weight:700;white-space:nowrap;}
.wbs-pred-input{width:118px;max-width:140px;border:1px solid #dbe4f0;border-radius:10px;padding:7px 9px;font-size:.92rem;background:#fff;color:#0f172a;outline:none;}
.wbs-pred-input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12);}
.wbs-pred-input.saving{opacity:.65;}
.wbs-pred-input.saved{border-color:#22c55e;background:#f0fdf4;}
.wbs-pred-input.error{border-color:#ef4444;background:#fff5f5;}


/* PDM-UX1: tabla EDT usable para predecesoras.
   - Splitter permite tabla hasta 96% desde JS.
   - Fija checkbox + ID fila + ID EDT + Actividad para comparar contra Predecesoras.
   - Compacta columnas de porcentajes y da más aire a Predecesoras.
   No toca cálculo PDM ni BD. */
#wbsGanttShell .wbs-table{
  min-width:1180px!important;
}
#wbsGanttShell .wbs-table th:nth-child(1),
#wbsGanttShell .wbs-table td:nth-child(1){width:42px!important;min-width:42px!important;max-width:42px!important;}
#wbsGanttShell .wbs-table th:nth-child(2),
#wbsGanttShell .wbs-table td:nth-child(2){width:54px!important;min-width:54px!important;max-width:54px!important;}
#wbsGanttShell .wbs-table th:nth-child(3),
#wbsGanttShell .wbs-table td:nth-child(3){width:86px!important;min-width:86px!important;max-width:86px!important;}
#wbsGanttShell .wbs-table th:nth-child(4),
#wbsGanttShell .wbs-table td:nth-child(4){width:300px!important;min-width:300px!important;max-width:300px!important;}
#wbsGanttShell .wbs-table th:nth-child(5),
#wbsGanttShell .wbs-table td:nth-child(5){width:84px!important;min-width:84px!important;}
#wbsGanttShell .wbs-table th:nth-child(6),
#wbsGanttShell .wbs-table td:nth-child(6),
#wbsGanttShell .wbs-table th:nth-child(7),
#wbsGanttShell .wbs-table td:nth-child(7){width:116px!important;min-width:116px!important;}
#wbsGanttShell .wbs-table th:nth-child(8),
#wbsGanttShell .wbs-table td:nth-child(8),
#wbsGanttShell .wbs-table th:nth-child(9),
#wbsGanttShell .wbs-table td:nth-child(9){width:96px!important;min-width:96px!important;}
#wbsGanttShell .wbs-table th:nth-child(10),
#wbsGanttShell .wbs-table td:nth-child(10){width:132px!important;min-width:132px!important;}
#wbsGanttShell .wbs-table th:nth-child(11),
#wbsGanttShell .wbs-table td:nth-child(11){width:180px!important;min-width:180px!important;}
#wbsGanttShell .wbs-table th:nth-child(-n+4),
#wbsGanttShell .wbs-table td:nth-child(-n+4){
  position:sticky!important;
  background:#fff!important;
  z-index:6!important;
  box-shadow:1px 0 0 #e2e8f0;
}
#wbsGanttShell .wbs-table thead th:nth-child(-n+4){z-index:8!important;background:#f8fafc!important;}
#wbsGanttShell .wbs-table tr.selected td:nth-child(-n+4){background:#dbeafe!important;}
#wbsGanttShell .wbs-table tr.summary-row td:nth-child(-n+4){background:#f8fafc!important;}
#wbsGanttShell .wbs-table tr.summary-row.selected td:nth-child(-n+4){background:#dbeafe!important;}
#wbsGanttShell .wbs-table th:nth-child(1), #wbsGanttShell .wbs-table td:nth-child(1){left:0!important;}
#wbsGanttShell .wbs-table th:nth-child(2), #wbsGanttShell .wbs-table td:nth-child(2){left:42px!important;}
#wbsGanttShell .wbs-table th:nth-child(3), #wbsGanttShell .wbs-table td:nth-child(3){left:96px!important;}
#wbsGanttShell .wbs-table th:nth-child(4), #wbsGanttShell .wbs-table td:nth-child(4){left:182px!important;}
#wbsGanttShell .wbs-table td:nth-child(4){overflow:hidden!important;text-overflow:ellipsis!important;}
#wbsGanttShell .wbs-pred-input{width:156px!important;max-width:168px!important;}

/* REV-O PDM3: resalta actividades críticas si existen columnas PDM */
.g-bar.critical{stroke:#ef4444;stroke-width:2.2}


/* REV-O2: reparación PDM3 render/binding.
   Alinea tabla EDT y SVG Gantt con la misma altura de encabezado/fila.
   No toca BD ni lógica de interacción: solo evita barras flotantes y filas sin rectángulo visible. */
#wbsGanttShell .wbs-table thead th{
  height:56px!important;
  padding-top:0!important;
  padding-bottom:0!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
}
#wbsGanttShell .wbs-table tbody td{
  height:48px!important;
  padding-top:0!important;
  padding-bottom:0!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
}
#wbsGanttShell .wbs-pred-input{
  height:34px!important;
  box-sizing:border-box!important;
}
#wbsGanttShell .gantt-svg{
  display:block!important;
}
#wbsGanttShell .g-task-row,
#wbsGanttShell .g-task-bar{
  pointer-events:none;
}

/* REV-P: flechas PDM más claras + sticky reducido.
   - La actividad deja de estar congelada para facilitar llegar a fechas/predecesoras.
   - Se conservan fijas solo checkbox, ID e ID EDT.
   - Las flechas PDM se dibujan encima de las barras con punta visible al destino. */
#wbsGanttShell .wbs-table th:nth-child(4),
#wbsGanttShell .wbs-table td:nth-child(4){
  position:static!important;
  left:auto!important;
  z-index:auto!important;
  width:260px!important;
  min-width:260px!important;
  max-width:260px!important;
  background:inherit!important;
  box-shadow:none!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#wbsGanttShell .wbs-table th:nth-child(-n+3),
#wbsGanttShell .wbs-table td:nth-child(-n+3){
  position:sticky!important;
  background:#fff!important;
  z-index:6!important;
  box-shadow:1px 0 0 #e2e8f0;
}
#wbsGanttShell .wbs-table thead th:nth-child(-n+3){z-index:8!important;background:#f8fafc!important;}
#wbsGanttShell .wbs-table tr.selected td:nth-child(-n+3){background:#dbeafe!important;}
#wbsGanttShell .wbs-table tr.summary-row td:nth-child(-n+3){background:#f8fafc!important;}
#wbsGanttShell .wbs-table tr.summary-row.selected td:nth-child(-n+3){background:#dbeafe!important;}
#wbsGanttShell .wbs-table th:nth-child(1), #wbsGanttShell .wbs-table td:nth-child(1){left:0!important;}
#wbsGanttShell .wbs-table th:nth-child(2), #wbsGanttShell .wbs-table td:nth-child(2){left:42px!important;}
#wbsGanttShell .wbs-table th:nth-child(3), #wbsGanttShell .wbs-table td:nth-child(3){left:96px!important;}
#wbsGanttShell .wbs-table{min-width:1140px!important;}
#wbsGanttShell .g-link{
  fill:none!important;
  stroke:#2563eb!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  pointer-events:none!important;
}
#wbsGanttShell .g-link-arrow{
  fill:none!important;
  stroke:#2563eb!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#wbsGanttShell .g-task-bar{pointer-events:none;}
/* REV-Q: dependencias SVG en capa agrupada; se ocultan junto a tareas colapsadas. */
#wbsGanttShell .g-link-wrap{pointer-events:none!important;}
