:root {
  --ink: #263b4b;
  --surface: #fff;
  --line: #e3e9ee;
  --accent: #126a8b;
  --task: #6594b3;
  --task-edge: #4d7f9e;
  --summary: #344f63;
  --selection: #e7f2f8;
  color: var(--ink);
  background: #f4f6f8;
  font-variant-numeric: tabular-nums;
}
body {height: 100dvh; display: flex; flex-direction: column; overflow: hidden;}
.corporate-header {min-height: 68px; padding: 10px 24px; border-bottom-width: 2px; flex-shrink: 0;}
.brand strong {font-size: 16px; letter-spacing: 0;}
.brand span {font-size: 9px; letter-spacing: 1.2px; margin-top: 3px;}
.brand small {font-size: 10px; margin-top: 3px; color: #53778d;}
.logos img {height: 28px;}
.logos img:first-child {height: 24px;}
.module-nav {height: 42px; flex-shrink: 0; gap: 4px;}
.module-nav button {font-size: 13px; padding: 0 18px;}
.module-nav button[aria-selected=true] {background: #f6fafc; border-color: var(--accent);}
main {min-height: 0; flex: 1; padding: 0 20px 14px; overflow: auto;}
body[data-view=gantt] main {display: flex; flex-direction: column; overflow: hidden;}
.gantt-view {min-height: 0; flex: 1; display: flex; flex-direction: column;}
.workspace-title {min-height: 54px; padding: 12px 0; flex-shrink: 0;}
.workspace-title .eyebrow {display: none;}
h1 {font-size: 20px; font-weight: 650; letter-spacing: -.3px;}
.workspace-meta {font-size: 12px; gap: 12px;}
.pill {border: 0; background: #eaf1f6; border-radius: 4px; font-size: 11px; color: #3c617c; padding: 6px 9px;}
.button {font-size: 12px; height: 32px; padding: 5px 11px; border-color: #d2dce4; border-radius: 4px; font-weight: 500; color: #35556c;}
.button:hover {background: #edf4f8; border-color: #9fb7c9;}
.button:active {background: #dfeaf1;}
.button:disabled {opacity: .55; cursor: wait;}
.button[aria-pressed=true] {background: #eaf3f8; border-color: #aec9d9; color: #215e7e;}
.gantt-workspace {flex: 1; min-height: 0; height: auto; border: 1px solid #d5dfe6; border-radius: 6px; box-shadow: none;}
.workbar {padding: 10px 12px; gap: 8px;}
.workbar input, .workbar select, .extra-filters input, .extra-filters select {height: 32px; font-size: 12px; border-color: #d2dce4; border-radius: 4px;}
.workbar .search-label {min-width: 180px;}
.workbar select {max-width: 200px;}
.timeline-tools {padding: 7px 12px; gap: 10px; background: #fff; border-color: var(--line);}
.scale-buttons, .zoom-buttons {gap: 1px; border: 1px solid #d8e1e8; border-radius: 4px; padding: 2px; background: #f5f7f9;}
.scale-buttons button, .zoom-buttons button {height: 27px; border: 0!important; border-radius: 3px!important; font-size: 11px; background: transparent; padding: 3px 10px; font-weight: 500;}
.scale-buttons button.active {color: #1f5875; background: #fff; box-shadow: 0 1px 3px #18374618; font-weight: 650;}
.timeline-right {gap: 5px;}
.tool-note {font-size: 11px; color: #667c8d;}
.legend {font-size: 10px; padding: 6px 13px; gap: 14px; background: #fbfcfd; border-color: var(--line); color: #526b7d;}
.legend .interaction-tip {display: none;}
.legend i {height: 6px; width: 16px;}
.legend-progress {background: #2e6483;}
.legend-assumption {background: #cc9b48;}
.gantt-scroll {min-height: 100px; cursor: default; overflow-anchor: none; background: #fff;}
.gantt-scroll:focus-visible {outline: 2px solid var(--accent); outline-offset: -2px;}
.gantt-grid {background: #fff;}
.gantt-head {height: 64px; border-bottom-color: #c8d6e0;}
.gantt-head-label {background: #f6f8fa; padding: 0; font-size: 11px; font-weight: 600; color: #536c7f;}
.head-name {padding: 0 16px; flex: 1;}
.table-columns {display: grid; grid-template-columns: minmax(100px, 1fr) 72px 72px 54px; width: 100%; height: 100%; align-items: center;}
.table-columns > .cell {padding: 0 7px; font-size: 11px; text-align: right; color: #506777; border-left: 1px solid var(--line); height: 100%; display: flex; align-items: center; justify-content: flex-end; overflow: hidden; white-space: nowrap;}
.table-columns > .head-cell {justify-content: center; color: #526c7e; font-weight: 600;}
.gantt-grid.names-only .table-columns {grid-template-columns: 1fr;}
.gantt-grid.names-only .cell {display: none;}
.column-resizer {right: -5px; width: 10px; border: 0; border-right: 2px solid #a8bbc9;}
.column-resizer:hover {background: #1787af33;}
.contract-year {height: 20px; line-height: 20px; font-size: 10px; background: #e1ebf2; color: #567187; font-weight: 500; border-color: #c6d7e4;}
.calendar-year {top: 20px; height: 22px; line-height: 22px; font-size: 11px; background: #f6f8fa; color: #35576f;}
.tick {top: 42px; font-size: 10px; color: #6e8392; padding-top: 5px;}
.timeline-gridline {position: absolute; top: 64px; bottom: 0; width: 1px; background: #e9eef2; z-index: 0; pointer-events: none;}
.weekend-band {position: absolute; top: 64px; bottom: 0; background: #f5f7f9; z-index: 0; pointer-events: none;}
.phase-backdrop {display: none;}
.gantt-row {border-bottom: 1px solid #edf1f4;}
.row-label {background: #fff; border-right-color: #bccedb;}
.group-row.level-0 .row-label, .group-row.level-0 .row-time {background: #f3f6f9; color: #2e4a60;}
.group-row.level-1 .row-label, .group-row.level-1 .row-time {background: #fafbfd; color: #435d71;}
.group-row.master-group .row-label, .group-row.master-group .row-time {background: #eaf1f6; color: #214d6c;}
.group-button {font-size: 12px; font-weight: 600; padding: 0 12px; gap: 8px;}
.group-row.level-1 .group-button {padding-left: 26px; font-size: 12px;}
.group-button .disclosure {width: 16px; height: 20px; font-size: 11px; display: flex; align-items: center; justify-content: center; color: #536f84;}
.group-button small {font-size: 10px; color: #5c7689; opacity: 1;}
.group-title {font-weight: 600;}
.summary-bar {top: 15px; height: 7px; padding: 0; min-width: 5px; background: var(--summary)!important; border: 0; border-radius: 0; overflow: visible; color: transparent; cursor: zoom-in;}
.summary-bar::before, .summary-bar::after {content: ""; position: absolute; top: 0; width: 7px; height: 12px; background: var(--summary); clip-path: polygon(0 0,100% 0,50% 100%);}
.summary-bar::before {left: 0;}
.summary-bar::after {right: 0;}
.summary-bar:hover {background: #1d718f!important;}
.summary-bar:hover::before, .summary-bar:hover::after {background: #1d718f;}
.summary-bar.summary-single {width: 7px!important; height: 7px; top: 15px; transform: rotate(45deg);}
.summary-bar.summary-single::before, .summary-bar.summary-single::after {display: none;}
.phase-row .row-label {background: #fbfcfe;}
.phase-label {font-size: 12px; padding: 0 14px;}
.phase-focus {font-size: 10px; padding: 3px 8px; border-radius: 4px;}
.phase-bar {top: 10px; height: 12px; line-height: 12px; border-radius: 2px; padding: 0 8px; font-size: 10px; font-weight: 500;}
.master-strip .row-label {background: #fbfcfd;}
.master-label strong {font-size: 12px; color: #365c74;}
.master-label small {font-size: 11px; line-height: 1.5;}
.master-marker {width: 11px; height: 11px; background: #bd9553; border: 1px solid white; box-shadow: 0 0 0 1px #aa8241;}
.master-caption {font-size: 10px; width: 92px; background: #ffffffda; color: #3f5b70;}
.master-caption strong {font-size: 9px; color: #637f94;}
.activity-label {padding: 0 12px 0 30px; gap: 9px; font-size: 12px; color: #364e60; text-align: left;}
.activity-label strong {min-width: 34px; font-size: 11px; font-weight: 500; color: #697f90;}
.activity-label .row-kind {display: none;}
.activity-name {line-height: 1.35;}
.source-mark {width: 5px; height: 5px; flex-shrink: 0; border-radius: 1px; background: #9db3c4;}
.source-mark.ingenieria {background: #48809e;}
.source-mark.ganttgeneral {background: #45566a;}
.source-mark.tablero1 {background: #9baebd;}
.activity-row:hover .row-label, .activity-row:hover .row-time {background-color: #f2f7fa;}
.activity-row.selected .row-label, .activity-row.selected .row-time {background-color: var(--selection);}
.activity-row.selected .activity-name {font-weight: 600; color: #235f7e;}
.activity-bar {top: 9px; height: 18px; border-radius: 3px; border: 1px solid var(--task-edge); background: var(--task); box-shadow: inset 0 1px 0 #ffffff30; overflow: hidden; cursor: pointer; padding: 0; text-align: left;}
.activity-bar:hover {background: #5289a9; border-color: #326d90; box-shadow: 0 0 0 2px #729ebd25;}
.activity-bar.assumption {background: #c4a264; border-color: #aa8a4e; box-shadow: inset 0 -3px 0 #99743d30;}
.activity-bar.closed {background: #79a68d; border-color: #5a896e;}
.bar-fill {position: absolute; inset: 0 auto 0 0; background: #2b607f; pointer-events: none;}
.bar-label {position: relative; z-index: 1; display: block; color: white; padding: 0 6px; font-size: 10px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.milestone {width: 11px; height: 11px; top: 12px; background: white; border-color: #6a879a; box-shadow: 0 0 0 3px #fff;}
.milestone:hover {box-shadow: 0 0 0 5px #4c8dab25;}
.milestone.engineering.projected {background: #6492b0; border-color: #4c7d9b;}
.milestone.open-past {background: #b96e61; border-color: #a25347;}
.today-line {top: 64px; background: #cf7868; opacity: .85;}
.today-line span {font-size: 9px; color: #985244; background: #fff8f5;}
.gantt-footer {font-size: 11px; padding: 7px 12px; border-color: var(--line); color: #5d7486;}
.undated {position: relative; flex-shrink: 0; margin: 8px 0 0; padding: 8px 12px; font-size: 11px; border-color: #d5dfe6; border-radius: 4px;}
.undated-content {position: absolute; bottom: 38px; left: 0; right: 0; max-height: min(420px,65dvh); overflow: auto; padding: 12px; background: white; border: 1px solid #c8d8e3; border-radius: 6px; box-shadow: 0 8px 28px #1c384a20; z-index: 25;}
.undated-content p {margin-top: 0; font-size: 12px;}
.drawer {width: 390px; top: 110px; height: calc(100dvh - 110px); padding: 24px; box-shadow: -3px 0 18px #14374b0c; border-left: 1px solid #d2dfe8; transition: transform 160ms ease-out;}
.drawer h2 {font-size: 18px; line-height: 1.4; padding-right: 8px;}
.drawer .eyebrow {font-size: 10px; margin: 30px 0 8px;}
.drawer input, .drawer textarea {font-size: 13px;}
.drawer .detail-context, .drawer #edit-guidance {font-size: 12px; line-height: 1.6;}
.source-details {font-size: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; color: #546e80; line-height: 1.6;}
.source-details summary {cursor: pointer; font-weight: 600;}
.source-details p {margin-bottom: 0;}
.drawer-backdrop {background: #19344640;}
body.has-detail main {margin-right: 390px;}
body.has-detail .drawer-backdrop {display: none;}
.origin-link:visited {color: #5e647c;}
.presentation .corporate-header {min-height: 60px; padding: 8px 20px;}
.presentation main {padding: 8px 14px 12px;}
.presentation .gantt-workspace {height: auto; min-height: 0; border-radius: 5px;}
.presentation .drawer {top: 60px; height: calc(100dvh - 60px);}
.reports .panel-heading p, .source-note p {font-size: 13px; line-height: 1.6;}
@media (max-width: 1150px) {
  .tool-note {display: none;}
  .workbar select {max-width: 180px;}
  .timeline-right {margin-left: auto;}
  .button {padding-left: 8px; padding-right: 8px;}
}
@media (max-width: 1000px) {
  body.has-detail main {margin-right: 0;}
  body.has-detail .drawer-backdrop {display: block;}
  .drawer {top: 0; height: 100dvh; width: min(420px,90vw);}
  .presentation .drawer {top: 0; height: 100dvh;}
}
@media (max-width: 760px) {
  .corporate-header {min-height: 64px; padding: 8px 12px; gap: 8px;}
  .identity {width: 100%;}
  .brand strong {font-size: 13px;}
  .brand span {font-size: 8px;}
  .header-actions {width: 100%;}
  .header-actions .button {height: 30px;}
  .module-nav {height: 40px;}
  .module-nav button {font-size: 12px; padding: 0 12px;}
  main {padding: 0 8px 8px;}
  .workspace-title {min-height: 44px; padding: 8px 0;}
  h1 {font-size: 18px;}
  .workspace-meta .pill {display: none;}
  .workspace-meta #rows-count {font-size: 10px;}
  .workbar {padding: 8px; gap: 6px;}
  .workbar .search-label {min-width: 100%;}
  .workbar select {font-size: 11px; max-width: 165px; height: 32px;}
  .timeline-tools {padding: 6px 8px; gap: 6px;}
  .scale-buttons button, .zoom-buttons button {padding: 3px 7px;}
  .timeline-right {width: 100%; margin-left: 0; justify-content: flex-end;}
  .legend {display: none;}
  .gantt-workspace {min-height: 0; height: auto;}
  .gantt-footer {font-size: 10px;}
  .table-columns {grid-template-columns: 1fr;}
  .table-columns > .cell {display: none;}
  .activity-label {padding-left: 16px;}
  .group-button small {display: none;}
  .phase-label {font-size: 11px; padding-left: 10px;}
  .phase-focus {font-size: 10px;}
  .presentation .gantt-workspace {height: auto;}
  .presentation .corporate-header {padding: 8px 12px;}
}
@media (prefers-reduced-motion: reduce) {.drawer {transition: none;}}
