.construction-progress-page {
    display: grid;
    gap: .45rem;
    padding: .45rem 1rem .75rem;
    color: #233746;
}

.construction-progress-page.is-gantt-view {
    min-height: 0;
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}


.progress-program-actions,
.progress-program-actions__selector,
.progress-program-actions__trigger,
.progress-program-actions__menu button {
    display: flex;
    align-items: center;
}

.progress-program-actions { gap: .5rem; }
.progress-program-actions__selector {
    min-height: 2.55rem;
    gap: .4rem;
    padding: .45rem .65rem;
    border: 1px solid #dce6eb;
    border-radius: .65rem;
    background: #fff;
    color: #405f72;
    box-shadow: 0 .2rem .65rem rgba(40, 74, 100, .04);
}
.progress-program-actions__selector select { max-width: 14rem; appearance: none; overflow: hidden; border: 0; outline: 0; background: transparent; color: #405f72; font-size: .76rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.progress-program-actions__selector select:disabled { cursor: not-allowed; opacity: .55; }
.progress-program-actions__selector > i:last-child { font-size: .62rem; }
.progress-program-actions__manage { position: relative; }
.progress-program-actions__trigger { min-height: 2.55rem; justify-content: center; gap: .35rem; border: 1px solid #dce6eb; background: #fff; color: #405f72; }
.progress-program-actions__trigger.is-active { border-color: #9278bd; background: #f4f0fa; color: #62498d; }
.progress-program-actions__menu { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 60; display: grid; min-width: 11.5rem; gap: .3rem; padding: .35rem; border: 1px solid #dce6eb; border-radius: .55rem; background: #fff; box-shadow: 0 .7rem 1.5rem rgba(35, 55, 70, .16); }
.progress-program-actions__menu button { min-height: 2.15rem; justify-content: flex-start; gap: .4rem; padding: .4rem .55rem; border: 0; background: transparent; color: #405f72; font-size: .72rem; font-weight: 700; }
.progress-program-actions__menu button:hover { background: #f2f5f7; }
.progress-program-actions__menu button.is-danger { color: #a63d3d; }
.progress-program-actions__menu button:disabled { cursor: not-allowed; opacity: .5; }

.progress-program-dialog { width: min(34rem, calc(100vw - 2rem)); }
.progress-program-dialog__fields { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: .75rem; }
.progress-program-dialog__fields label small { color: #71838e; font-size: .65rem; font-weight: 500; line-height: 1.35; }
.progress-program-dialog__state-date { display: flex; align-items: center; gap: .4rem; color: #526f81 !important; font-size: .7rem !important; }
.progress-program-dialog__state-date { margin: .75rem 0 0; }
.progress-schedule-setup__guidance { grid-column: 1 / -1; display: grid; gap: .3rem; margin-top: .1rem; }
.progress-schedule-setup__guidance p { display: flex; align-items: flex-start; gap: .4rem; margin: 0; color: #526f81; font-size: .7rem; line-height: 1.35; text-align: left; }
.progress-schedule-setup__guidance i,
.progress-program-dialog__state-date i { color: #128373; }
.progress-program-dialog__baseline { display: flex !important; align-items: center; gap: .55rem !important; margin-top: .75rem; padding: .6rem; border: 1px solid #ded5ec; border-radius: .45rem; background: #f7f4fb; }
.progress-program-dialog__baseline input { width: 1rem; height: 1rem; flex: 0 0 auto; padding: 0; accent-color: #7357a6; }
.progress-program-dialog__baseline span { display: grid; }
.progress-program-dialog__baseline strong { color: #62498d; font-size: .72rem; }
.progress-program-dialog__baseline small { color: #7b6a96; font-size: .64rem; font-weight: 500; }
.progress-program-dialog__delete { display: grid; gap: .75rem; }
.progress-program-dialog__delete p { margin: 0; color: #775757; font-size: .76rem; }
.progress-program-dialog__delete-button { border: 1px solid #ad3636; background: #ad3636; color: #fff; }

.progress-loading {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3.25rem;
    padding: .75rem 1rem;
    border: 1px solid #dce5eb;
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 3px 14px rgba(40, 74, 100, .07);
}

.progress-loading i { color: #ff6c37; animation: progress-spin 1s linear infinite; }

.progress-dialog header small,

.progress-view-panel { min-width: 0; }
.is-gantt-view .progress-view-panel { min-height: 0; overflow: hidden; }

.progress-workspace-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #dbe5eb;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 7px 24px rgba(40, 74, 100, .08);
}

.is-gantt-view .progress-workspace-card {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.progress-workspace-card.is-fullscreen {
    position: fixed;
    inset: .5rem;
    z-index: 1200;
    display: grid;
    width: auto;
    height: calc(100dvh - 1rem);
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-radius: .6rem;
    background: #fff;
    box-shadow: 0 0 0 100vmax rgba(18, 37, 50, .58), 0 24px 70px rgba(13, 35, 50, .3);
}

.progress-workspace-card__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    padding: .38rem .55rem;
    border-bottom: 1px solid #e1e8ed;
    background: #f8fafb;
}

.progress-workspace-card__tools { display: flex; flex: 0 0 auto; align-items: center; gap: .45rem; }
.progress-workspace-card__count { color: #70838f; font-size: .62rem; font-weight: 700; white-space: nowrap; }
.progress-fullscreen-toggle {
    display: flex;
    height: 2rem;
    align-items: center;
    gap: .35rem;
    padding: 0 .65rem;
    border: 1px solid #b9c9d3;
    border-radius: .45rem;
    background: #fff;
    color: #405f72;
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
}
.progress-fullscreen-toggle:hover { border-color: #284a64; background: #f2f6f8; }
.progress-fullscreen-toggle[aria-pressed="true"] { border-color: #284a64; background: #284a64; color: #fff; }

.progress-workspace-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid #e1e8ed;
    background: #fff;
}

.progress-workspace-card__heading > div { display: grid; gap: .1rem; }
.progress-workspace-card__heading small { color: #d95a2d; font-size: .66rem; font-weight: 700; letter-spacing: .08em; }
.progress-workspace-card__heading h2 { margin: 0; color: #284a64; font-size: 1.05rem; }
.progress-workspace-card__heading p { margin: 0; color: #71838e; font-size: .74rem; }
.progress-workspace-card__heading > span { padding: .32rem .6rem; border-radius: 1rem; background: #edf3f6; color: #526a78; font-size: .7rem; font-weight: 700; white-space: nowrap; }


.progress-critical-toggle {
    height: 2rem;
    padding: 0 .65rem;
    border: 1px solid #ff6c37;
    border-radius: .45rem;
    background: #fff;
    color: #d95729;
    font-size: .7rem;
    font-weight: 600;
}

.progress-critical-toggle[aria-pressed="true"] { background: #ff6c37; color: #fff; }
.progress-workspace {
    display: grid;
    grid-template-columns: var(--progress-list-width, 40%) .5rem minmax(0, 1fr);
    min-height: 32rem;
    overflow: hidden;
}
.is-gantt-view .progress-workspace {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

/* El desplazamiento vertical vive en el contenedor de la Carta Gantt: así el listado de actividades y
   las barras se mueven juntos. Si el panel recortara su contenido, el encabezado pegajoso de la tabla
   se anclaría al panel y no al área que realmente se desplaza. */
.progress-workspace__activities,
.progress-workspace__timeline { min-width: 0; overflow: visible; }
.progress-workspace__activities { background: #fff; }
.progress-workspace__timeline { background: #fbfcfd; }
.progress-workspace__splitter {
    position: relative;
    z-index: 5;
    display: grid;
    place-items: center;
    width: .5rem;
    cursor: col-resize;
    touch-action: none;
    background: #edf2f5;
    outline: none;
}
.progress-workspace__splitter::before {
    position: absolute;
    inset: 0 -.25rem;
    content: '';
}
.progress-workspace__splitter span {
    width: .18rem;
    height: 2.4rem;
    border-radius: 1rem;
    background: #aebdc6;
    transition: background-color .15s, height .15s;
}
.progress-workspace__splitter:hover span,
.progress-workspace__splitter:focus-visible span,
.progress-workspace__splitter.is-dragging span { height: 3.4rem; background: #ff6c37; }
.progress-workspace__splitter.is-dragging { background: #fbe7df; }

.progress-table { position: relative; min-width: 0; border-right: 1px solid #dfe7ec; container-type: inline-size; container-name: progress-table; }
.progress-table > header,
.progress-table__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 4.6rem 6rem 5.2rem;
    align-items: center;
    column-gap: .5rem;
}

.progress-table > header {
    position: sticky;
    top: 0;
    z-index: 2;
    box-sizing: border-box;
    min-height: 2.75rem;
    padding: 0 .75rem;
    border-bottom: 1px solid #dfe7ec;
    background: #f6f9fb;
    color: #6b7f8d;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .01em;
}
.progress-table__header-activity { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.progress-table__header-activity button { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; padding: 0; border: 1px solid #d5e0e7; border-radius: .45rem; background: #fff; color: #526f81; font-size: .85rem; }
.progress-table__header-activity button:hover { border-color: #ff6c37; color: #d95729; }
.progress-table > header > span:not(.progress-table__header-activity),
.progress-table__row > span:not(.progress-table__activity):not(.progress-table__activity-drop-zone) { text-align: right; font-variant-numeric: tabular-nums; }
.progress-table__quick-editor { position: absolute; top: 3rem; left: .75rem; right: .75rem; z-index: 12; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: end; gap: .45rem; padding: .65rem; border: 1px solid #bfd0da; border-radius: .5rem; background: #fff; box-shadow: 0 10px 28px rgba(28, 56, 75, .2); }
.progress-table__quick-editor > i { align-self: center; color: #ff6c37; font-size: 1.1rem; }
.progress-table__quick-editor label { display: grid; gap: .25rem; color: #526a79; font-size: .65rem; font-weight: 700; }
.progress-table__quick-editor input { min-width: 0; padding: .42rem .5rem; border: 1px solid #cbd8e0; border-radius: .35rem; color: #284a64; font: inherit; }
.progress-table__quick-editor button,
.progress-table__group-rename button { display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border: 0; border-radius: .35rem; background: #edf3f6; color: #405f72; }
.progress-table__quick-editor button[type="submit"],
.progress-table__group-rename button[type="submit"] { background: #284a64; color: #fff; }

.progress-table__row {
    box-sizing: border-box;
    width: 100%;
    min-height: 3.45rem;
    padding: 0 .75rem;
    border: 0;
    border-bottom: 1px solid #edf1f3;
    background: #fff;
    color: #526773;
    text-align: left;
    font-size: .76rem;
}

.progress-table__row:hover,
.progress-table__row.is-selected { background: #f3f8fb; }
.progress-table__row.is-selected { box-shadow: inset 3px 0 #ff6c37; }
.progress-table__group { background: #f3f7f9; color: #284a64; font-weight: 600; }
.progress-table__group:hover { background: #ebf2f6; }
.progress-table__group.is-selected { background: #e7f0f5; box-shadow: inset 3px 0 #ff6c37; }
.progress-table__group.is-drop-target { background: #fff0e9; box-shadow: inset 0 0 0 2px #ff6c37; }
.progress-table__group .progress-table__activity > small { color: #8396a2; }
.progress-table__activity-row[draggable="true"] { cursor: grab; }
.progress-table__activity-row[draggable="true"]:active { cursor: grabbing; }
.progress-table__activity-row { position: relative; }
.progress-table__activity-drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 1rem; min-width: 1rem; height: 1.35rem; border-radius: .25rem; color: #b5c3cc; cursor: grab; opacity: 0; transition: opacity .12s ease; }
.progress-table__row:hover .progress-table__activity-drag-handle,
.progress-table__row.is-selected .progress-table__activity-drag-handle,
.progress-table__activity-drag-handle:focus-visible { opacity: 1; }
.progress-table__activity-drag-handle:hover { background: #eef3f6; color: #ff6c37; }
.progress-table__activity-drag-handle:active { cursor: grabbing; }
.progress-table__activity-drop-zone { position: absolute; left: 0; z-index: 6; width: 100%; height: 50%; pointer-events: none; }
.progress-table__activity-drop-zone.is-before { top: 0; }
.progress-table__activity-drop-zone.is-after { bottom: 0; }
.progress-table.is-reordering .progress-table__activity-drop-zone { pointer-events: auto; }
.progress-table.is-reordering .progress-table__activity-row.is-dragging-source .progress-table__activity-drop-zone { pointer-events: none; }
.progress-table.is-reordering .progress-table__activity-drop-zone:hover::after { position: absolute; right: .4rem; left: .4rem; height: 3px; border-radius: 1rem; background: #ff6c37; box-shadow: 0 0 0 2px rgba(255, 108, 55, .15); content: ""; }
.progress-table.is-reordering .progress-table__activity-drop-zone.is-before:hover::after { top: -2px; }
.progress-table.is-reordering .progress-table__activity-drop-zone.is-after:hover::after { bottom: -2px; }
.progress-table.is-reordering .progress-table__activity-drop-zone:hover::before { position: absolute; right: .55rem; z-index: 1; padding: .18rem .38rem; border-radius: .3rem; background: #d65325; color: #fff; content: attr(title); font-size: .58rem; font-weight: 700; }
.progress-table.is-reordering .progress-table__activity-drop-zone.is-before:hover::before { top: .2rem; }
.progress-table.is-reordering .progress-table__activity-drop-zone.is-after:hover::before { bottom: .2rem; }
.progress-tree-depth-1 .progress-table__activity { padding-left: 1rem; }
.progress-tree-depth-2 .progress-table__activity { padding-left: 2rem; }
.progress-tree-depth-3 .progress-table__activity { padding-left: 3rem; }
.progress-tree-depth-4 .progress-table__activity { padding-left: 4rem; }
.progress-tree-depth-5 .progress-table__activity,
.progress-tree-depth-6 .progress-table__activity { padding-left: 5rem; }
.progress-table__baseline {
    cursor: default;
    border-bottom-color: #ded5ec;
    background: #f4f0fa;
    color: #62498d;
}
.progress-table__baseline:hover { background: #f4f0fa; }
.progress-table__baseline .progress-table__activity i,
.progress-table__baseline .progress-table__activity strong { color: #7357a6; }
.progress-table__baseline-label {
    padding: .12rem .45rem;
    border-radius: 999px;
    background: #e9e2f5;
    color: #62498d;
    font-size: .68rem;
    font-style: normal;
    font-weight: 600;
}
.progress-table__baseline .progress-table__activity { grid-template-columns: 1rem minmax(0, 1fr); }
.progress-table__row > span { min-width: 0; }
.progress-table__activity { display: grid; grid-template-columns: 1rem minmax(2.5rem, auto) minmax(0, 1fr) auto auto; align-items: center; gap: .35rem; min-width: 0; }
.progress-table__activity > small { max-width: 5rem; overflow: hidden; color: #80909b; text-overflow: ellipsis; white-space: nowrap; }
.progress-table__activity > .progress-table__code { padding: .08rem .35rem; border-radius: .3rem; background: #f1f5f8; color: #6b7f8d; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .66rem; }
.progress-table__activity > strong { overflow: hidden; color: #284a64; text-overflow: ellipsis; white-space: nowrap; }
.progress-table__activity > em { color: #d95a2d; font-size: .7rem; font-style: normal; }
.progress-table__activity > .progress-table__constraints { display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .35rem; border-radius: 999px; background: #fff0e5; font-weight: 600; }
.progress-table__activity > .progress-table__count { min-width: 1.4rem; padding: .05rem .4rem; border-radius: 999px; background: #e3ebf0; color: #526a78; font-size: .68rem; font-weight: 600; text-align: center; }
.progress-table__group-activity { grid-template-columns: 1rem 1.2rem minmax(0, 1fr) auto auto; }
.progress-table__group-toggle,
.progress-table__group-name { padding: 0; border: 0; background: transparent; color: inherit; }
.progress-table__group-toggle { display: grid; place-items: center; }
.progress-table__group-name { overflow: hidden; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.progress-table__action-menu { position: relative; z-index: 4; }
.progress-table__action-menu[open] { z-index: 15; }
.progress-table__action-menu summary { display: grid; width: 1.55rem; height: 1.55rem; place-items: center; border-radius: .3rem; color: #526f81; cursor: pointer; font-size: .75rem; list-style: none; opacity: 0; transition: opacity .12s ease; }
.progress-table__row:hover .progress-table__action-menu summary,
.progress-table__row.is-selected .progress-table__action-menu summary,
.progress-table__action-menu[open] summary,
.progress-table__action-menu summary:focus-visible { opacity: 1; }
.progress-table__action-menu summary::-webkit-details-marker { display: none; }
.progress-table__action-menu summary:hover,
.progress-table__action-menu summary:focus-visible,
.progress-table__action-menu[open] summary { background: #fff; color: #d65325; outline: none; }
.progress-table__action-menu > div { position: absolute; top: calc(100% + .2rem); right: 0; display: grid; width: 11.5rem; overflow: hidden; padding: .25rem; border: 1px solid #cbd8e0; border-radius: .45rem; background: #fff; box-shadow: 0 10px 24px rgba(28, 56, 75, .2); }
.progress-table__action-menu button { display: grid; grid-template-columns: 1.1rem 1fr; align-items: center; gap: .45rem; width: 100%; padding: .48rem .55rem; border: 0; border-radius: .3rem; background: transparent; color: #405f72; font-size: .7rem; font-weight: 600; text-align: left; }
.progress-table__action-menu button:hover,
.progress-table__action-menu button:focus-visible { background: #eef4f7; color: #d65325; outline: none; }
.progress-table__action-menu button.is-danger { color: #a83b3b; }
.progress-table__group-rename { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .2rem; min-width: 0; }
.progress-table__group-rename input { min-width: 0; padding: .3rem .4rem; border: 1px solid #9fb4c0; border-radius: .3rem; color: #284a64; font: inherit; }
.progress-table__group-rename button { width: 1.45rem; height: 1.45rem; }
.progress-table__percent { display: inline-flex; align-items: center; justify-content: flex-end; gap: .4rem; color: #284a64; }
.progress-table__percent b { min-width: 2.2rem; font-weight: 600; }
.progress-table__percent.is-empty { color: #8396a2; font-size: .72rem; }
.progress-table__percent progress { width: 2.4rem; height: .35rem; overflow: hidden; border: 0; border-radius: 999px; background: #e7eef2; appearance: none; }
.progress-table__percent progress::-webkit-progress-bar { border-radius: 999px; background: #e7eef2; }
.progress-table__percent progress::-webkit-progress-value { border-radius: 999px; background: #284a64; }
.progress-table__percent progress::-moz-progress-bar { border-radius: 999px; background: #284a64; }
.progress-table__finish { display: inline-flex; align-items: center; justify-content: flex-end; gap: .3rem; white-space: nowrap; }
.progress-table__finish small { padding: .02rem .3rem; border-radius: 999px; font-size: .64rem; font-weight: 700; cursor: help; }
.progress-table__finish small.is-late { background: #fdeaea; color: #c63f3f; }
.progress-table__finish small.is-early { background: #e6f5ed; color: #2f8b62; }
.progress-table__empty { padding: 2rem; color: #71818c; text-align: center; }
.progress-activity-duplicate-inline { position: absolute; top: 3rem; left: .75rem; right: .75rem; z-index: 13; overflow: hidden; border: 1px solid #bfd0da; border-radius: .55rem; background: #fff; box-shadow: 0 12px 32px rgba(28, 56, 75, .23); }
.progress-activity-duplicate-inline > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; padding: .65rem .75rem; border-bottom: 1px solid #e1e8ed; background: #f5f8fa; }
.progress-activity-duplicate-inline > header div { display: grid; min-width: 0; }
.progress-activity-duplicate-inline > header small { color: #ff6c37; font-size: .58rem; font-weight: 800; letter-spacing: .07em; }
.progress-activity-duplicate-inline > header strong { overflow: hidden; color: #284a64; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.progress-activity-duplicate-inline > header button { border: 0; background: transparent; color: #607785; }
.progress-activity-duplicate-inline form { display: grid; gap: .6rem; padding: .75rem; }
.progress-activity-duplicate-inline form > label { display: grid; gap: .25rem; color: #405866; font-size: .7rem; font-weight: 700; }
.progress-activity-duplicate-inline select { width: 100%; padding: .42rem .5rem; border: 1px solid #cbd8e0; border-radius: .35rem; background: #fff; color: #284a64; }
.progress-activity-duplicate-inline fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; max-height: 12rem; overflow: auto; margin: 0; padding: .5rem; border: 1px solid #d8e3e9; border-radius: .4rem; }
.progress-activity-duplicate-inline legend { float: none; width: auto; margin: 0; padding: 0 .25rem; color: #526a79; font-size: .68rem; font-weight: 700; }
.progress-activity-duplicate-inline fieldset > label { display: flex; align-items: center; gap: .4rem; padding: .35rem; border-radius: .3rem; background: #f6f9fa; }
.progress-activity-duplicate-inline fieldset > label span { display: grid; min-width: 0; }
.progress-activity-duplicate-inline fieldset strong { overflow: hidden; color: #284a64; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.progress-activity-duplicate-inline fieldset small,
.progress-activity-duplicate-inline footer small { color: #71838e; font-size: .6rem; }
.progress-activity-duplicate-inline fieldset p { grid-column: 1 / -1; margin: .3rem; color: #71838e; font-size: .68rem; }
.progress-activity-duplicate-inline footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.progress-activity-duplicate-inline footer small { max-width: 60%; line-height: 1.35; }
.progress-activity-duplicate-inline .validation-message,
.progress-activity-duplicate-inline .validation-errors { margin: 0; color: #ad3636; font-size: .65rem; }

.progress-gantt { min-width: 0; height: 100%; background: #fbfcfd; }
.progress-gantt__canvas { width: 100%; height: 100%; min-height: 32rem; }
.is-gantt-view .progress-gantt,
.is-gantt-view .progress-gantt__canvas { min-height: 0; }
.progress-legend { position: relative; z-index: 4; display: flex; flex: 0 0 auto; gap: .8rem; padding: .32rem .65rem; border-top: 1px solid #e1e8ed; background: #fff; color: #677b88; font-size: .62rem; }
.progress-legend span { display: flex; align-items: center; gap: .35rem; }
.progress-legend i { width: 1rem; height: .4rem; border-radius: 1rem; background: #284a64; }
.progress-legend .is-critical { background: #d84949; }
.progress-legend .is-near { background: #f1a13b; }
.progress-legend .is-baseline { height: .22rem; background: #7357a6; }
.progress-legend .is-today { width: .15rem; height: .9rem; border-radius: 0; background: #128373; }
.progress-legend .is-target { width: .15rem; height: .9rem; border-radius: 0; background: #7357a6; }
.progress-legend__dependency { margin-left: auto; }
.progress-legend__drag i,
.progress-legend__dependency i { width: auto; height: auto; background: transparent; color: #ff6c37; font-size: .95rem; }

.progress-empty-state {
    max-width: 42rem;
    margin: 4rem auto;
    padding: 2.25rem;
    border: 1px solid #dce6ec;
    border-radius: .8rem;
    background: #fff;
    text-align: center;
    box-shadow: 0 8px 26px rgba(40, 74, 100, .09);
}

.progress-empty-state > i { color: #ff6c37; font-size: 2.2rem; }
.progress-empty-state h2 { margin: .75rem 0 .4rem; color: #284a64; }
.progress-empty-state p { color: #6e818e; }
.progress-empty-state form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: .75rem; margin-top: 1.4rem; text-align: left; }

.progress-empty-state label,
.progress-dialog label,
.progress-update-form label { display: grid; gap: .3rem; color: #405866; font-size: .78rem; font-weight: 600; }
.progress-empty-state input,
.progress-dialog input,
.progress-dialog select,
.progress-dialog textarea,
.progress-update-form input,
.progress-update-form textarea { width: 100%; padding: .55rem .65rem; border: 1px solid #cbd8e0; border-radius: .42rem; background: #fff; color: #2e4656; font: inherit; }

.progress-import-button { position: relative; overflow: hidden; cursor: pointer; }
.progress-import-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.progress-import-button,
.progress-primary-action { min-height: 2rem; padding: .32rem .6rem; font-size: .72rem; }
.progress-dialog-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgba(18, 37, 50, .48); backdrop-filter: blur(2px); }
.progress-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1050;
    width: min(54rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    transform: translate(-50%, -50%);
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 24px 70px rgba(13, 35, 50, .28);
}

.progress-dialog > header,
.progress-detail > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid #e2e9ed; }
.progress-dialog h2,
.progress-detail h2 { margin: .15rem 0 0; color: #284a64; font-size: 1.15rem; }
.progress-dialog header button,
.progress-detail header button { border: 0; background: transparent; color: #607785; }
.progress-dialog form { padding: 1rem 1.2rem; }
.progress-dialog__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.progress-activity-editor__pull-hint { grid-column: 1 / -1; display: flex; align-items: center; gap: .4rem; margin: -.2rem 0 0; padding: .55rem .65rem; border-radius: .42rem; background: #f4f0fa; color: #62498d; font-size: .7rem; }
.progress-dialog__description { margin-top: .8rem; }
.progress-dialog__hint { display: flex; align-items: flex-start; gap: .4rem; margin: .8rem 0 0; padding: .55rem .65rem; border-radius: .42rem; background: #eef4f8; color: #3c5866; font-size: .72rem; line-height: 1.5; }
.progress-dialog__hint i { flex: 0 0 auto; margin-top: .1rem; }
.progress-dialog textarea { min-height: 4.5rem; resize: vertical; }
.progress-dialog footer { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.progress-activity-editor__actions { position: sticky; bottom: -1rem; z-index: 2; margin: 1rem -1.2rem -1rem !important; padding: .8rem 1.2rem; border-top: 1px solid #e2e9ed; background: #fff; box-shadow: 0 -8px 18px rgba(40, 74, 100, .06); }
.progress-gantt-reschedule-dialog { width: min(35rem, calc(100vw - 2rem)); }
.progress-gantt-reschedule-dialog__dates { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .75rem; margin-bottom: .8rem; padding: .75rem; border: 1px solid #dce6eb; border-radius: .55rem; background: #f8fafb; }
.progress-gantt-reschedule-dialog__dates span { display: grid; gap: .15rem; }
.progress-gantt-reschedule-dialog__dates small { color: #71838e; font-size: .68rem; }
.progress-gantt-reschedule-dialog__dates strong { color: #284a64; font-size: .78rem; }
.progress-gantt-reschedule-dialog__dates > i { color: #ff6c37; }
.progress-button-secondary { border: 1px solid #bfcdd6; background: #fff; color: #405866; }
.progress-location-picker { margin-top: 1rem; padding: .75rem; border: 1px solid #d7e1e7; border-radius: .5rem; }
.progress-location-picker legend { float: none; width: auto; margin: 0; padding: 0 .3rem; color: #284a64; font-size: .8rem; font-weight: 700; }
.progress-location-picker__toolbar { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.progress-location-picker__toolbar label { position: relative; display: block; flex: 1; min-width: 0; }
.progress-location-picker__toolbar label i { position: absolute; top: 50%; left: .65rem; color: #81919b; transform: translateY(-50%); }
.progress-location-picker__toolbar input { width: 100%; padding-left: 2rem; }
.progress-location-picker__count { color: #71838e; font-size: .7rem; white-space: nowrap; }
.progress-location-picker__count b { color: #284a64; }
.progress-location-picker__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; max-height: 14rem; overflow: auto; }
.progress-location-picker__list label { display: flex; align-items: center; gap: .45rem; padding: .45rem; border-radius: .35rem; background: #f6f9fa; }
.progress-location-picker__list input { width: auto; }
.progress-location-picker__list span { display: grid; }
.progress-location-picker__list small { color: #798b96; font-weight: 400; }
.progress-location-picker__empty { margin: .2rem 0; color: #71838e; font-size: .72rem; }
.progress-location-picker__note { display: flex; align-items: center; gap: .3rem; margin: .55rem 0 0; color: #96650f; font-size: .7rem; }

.progress-detail {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    width: min(27rem, 100%);
    height: 100%;
    overflow: hidden;
    border-left: 1px solid #d8e2e8;
    background: #fff;
    box-shadow: -12px 0 30px rgba(40, 74, 100, .13);
}

.progress-detail > header { position: relative; z-index: 1; flex: 0 0 auto; background: #fff; box-shadow: 0 3px 10px rgba(40, 74, 100, .06); }
.progress-detail__body { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.progress-detail header p { margin: .2rem 0 0; color: #738691; font-size: .76rem; }
.progress-detail h3 { margin: 1rem 1.2rem .6rem; color: #284a64; font-size: .84rem; font-weight: 600; }
.progress-detail__empty { margin: 1rem 1.2rem; color: #738691; font-size: .8rem; }
.progress-update-form { display: grid; gap: .7rem; margin: 1rem 1.2rem; padding: .85rem; border-radius: .5rem; background: #f5f8fa; }
.progress-update-form small { color: #788b96; font-weight: 400; }
.progress-update-form textarea { min-height: 4rem; resize: vertical; }
.progress-update-form select { width: 100%; padding: .55rem .65rem; border: 1px solid #cbd8e0; border-radius: .42rem; background: #fff; color: #2e4656; }
.progress-update-form__check { display: flex !important; align-items: center; gap: .45rem; }
.progress-update-form__check input { width: auto; }
.progress-update-form fieldset { display: grid; gap: .7rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.progress-rescheduling-history { margin: 1rem 1.2rem; overflow-x: auto; }
.progress-rescheduling-history table { width: 100%; border-collapse: collapse; color: #405866; font-size: .75rem; }
.progress-rescheduling-history th, .progress-rescheduling-history td { padding: .6rem; border-bottom: 1px solid #d8e5eb; text-align: left; vertical-align: top; }
.progress-rescheduling-history th { background: #f5f8fa; }
.progress-rescheduling-history small { display: block; color: #738691; }
.progress-rescheduling-history p { margin: .3rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.progress-constraints { display: grid; gap: .55rem; padding: 0 1.2rem 1.2rem; }
.progress-constraints article { padding: .7rem; border: 1px solid #dce5ea; border-left: 3px solid #8da0ab; border-radius: .45rem; background: #f8fafb; }
.progress-constraints article.is-open { border-left-color: #d95a2d; background: #fff8f4; }
.progress-constraints article > div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.progress-constraints strong { color: #284a64; font-size: .78rem; }
.progress-constraints small { color: #7b8d98; font-size: .65rem; }
.progress-constraints p { margin: .4rem 0; color: #526a78; font-size: .75rem; }
.progress-constraints button { padding: 0; border: 0; background: transparent; color: #2f7b59; font-size: .72rem; font-weight: 700; }
.progress-dependencies { display: grid; gap: .45rem; padding: 0 1.2rem 1rem; }
.progress-dependencies article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: .65rem; border: 1px solid #dce5ea; border-radius: .45rem; background: #f8fafb; }
.progress-dependencies article > i { color: #ff6c37; }
.progress-dependencies article > div { display: grid; min-width: 0; }
.progress-dependencies small { color: #7b8d98; font-size: .65rem; }
.progress-dependencies strong { overflow: hidden; color: #284a64; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.progress-dependencies button { border: 0; background: transparent; color: #b84242; }
.progress-dependencies button:disabled { cursor: wait; opacity: .5; }

.progress-activity-delete__form { margin: 1rem 1.2rem; }

/* Panel de detalle de actividad: encabezado, resumen, pestañas y registro de avance. */
.progress-detail > header { align-items: flex-start; padding: .9rem 1rem .85rem 1.2rem; }
.progress-detail__title { display: grid; gap: .3rem; min-width: 0; }
.progress-detail__title h2 { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.progress-detail__title p { margin: 0; }
.progress-detail__chips { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.progress-detail__code { padding: .08rem .4rem; border-radius: .3rem; background: #f1f5f8; color: #5b7181; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .68rem; }
.progress-detail__chip { padding: .08rem .45rem; border-radius: 999px; background: #edf3f6; color: #486273; font-size: .66rem; font-weight: 600; }
.progress-detail__chip.is-critical { background: #fdeaea; color: #b93434; }
.progress-detail__chip.is-near { background: #fff1e0; color: #b8621d; }
.progress-detail__chip.is-pcp { background: #e6eef4; color: #284a64; }
.progress-detail__chip.is-warning { background: #fff0e5; color: #c94d21; }
.progress-detail__actions { display: flex; gap: .15rem; }
.progress-detail__actions button { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .45rem; }
.progress-detail__actions button:hover { background: #f1f5f8; color: #284a64; }
.progress-detail__actions button[title="Eliminar actividad"]:hover { background: #fdeeee; color: #ad3636; }

.progress-detail-summary { display: grid; gap: .75rem; padding: 1rem 1.2rem .9rem; }
.progress-detail-summary__metrics { display: grid; grid-template-columns: 1.3fr 1fr 1fr; overflow: hidden; border: 1px solid #e2e9ed; border-radius: .6rem; }
.progress-detail-summary__metrics > div { display: grid; align-content: start; gap: .15rem; padding: .6rem .7rem; }
.progress-detail-summary__metrics > div + div { border-left: 1px solid #e2e9ed; }
.progress-detail-summary__metrics span { color: #758893; font-size: .66rem; }
.progress-detail-summary__metrics strong { color: #284a64; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-detail-summary__metrics .is-late strong { color: #c63f3f; }
.progress-detail-summary__metrics .is-ok strong { color: #2f8b62; }
.progress-detail-summary__metrics progress { width: 100%; height: .3rem; overflow: hidden; border: 0; border-radius: 999px; background: #e7eef2; appearance: none; }
.progress-detail-summary__metrics progress::-webkit-progress-bar { border-radius: 999px; background: #e7eef2; }
.progress-detail-summary__metrics progress::-webkit-progress-value { border-radius: 999px; background: #ff6c37; }
.progress-detail-summary__metrics progress::-moz-progress-bar { border-radius: 999px; background: #ff6c37; }
.progress-detail-summary__dates { display: grid; gap: .1rem; margin: 0; }
.progress-detail-summary__dates > div { display: flex; justify-content: space-between; gap: 1rem; padding: .22rem 0; font-size: .74rem; }
.progress-detail-summary__dates dt { color: #758893; font-weight: 400; }
.progress-detail-summary__dates dd { margin: 0; color: #405866; font-variant-numeric: tabular-nums; }
.progress-detail-summary__dates .is-current dd { color: #284a64; font-weight: 600; }
.progress-detail-summary__dates .is-late dd { color: #c63f3f; font-weight: 600; }

.progress-detail__tabs { position: sticky; top: 0; z-index: 1; display: flex; gap: .2rem; padding: 0 1rem; border-bottom: 1px solid #e2e9ed; background: #fff; }
.progress-detail__tabs button { display: inline-flex; align-items: center; gap: .3rem; padding: .6rem .45rem .55rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #6b7f8d; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.progress-detail__tabs button:hover { color: #284a64; }
.progress-detail__tabs button.is-active { border-bottom-color: #ff6c37; color: #284a64; }
.progress-detail__tabs b { min-width: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: #e3ebf0; color: #526a78; font-size: .64rem; font-weight: 600; text-align: center; }
.progress-detail__tabs b.is-alert { background: #ffe3d6; color: #c94d21; }
.progress-detail__panel { padding-bottom: 1.2rem; }
.progress-detail__panel > .progress-update-form:first-of-type,
.progress-detail__panel > h3:first-child { margin-top: 1rem; }
.progress-detail__panel .progress-dependencies,
.progress-detail__panel .progress-constraints { padding-top: 1rem; }

.progress-units { display: grid; gap: .4rem; margin: 0; padding: 1rem 1.2rem 0; list-style: none; }
.progress-unit__row { display: grid; grid-template-columns: minmax(0, 1fr) 2.25rem; align-items: stretch; gap: .4rem; }
.progress-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .3rem .7rem; width: 100%; padding: .55rem .7rem; border: 1px solid #e2e9ed; border-radius: .55rem; background: #fff; color: #344e5e; text-align: left; transition: border-color .12s ease, background .12s ease; }
.progress-unit:hover { border-color: #c8d6de; }
.progress-unit.is-selected { border-color: #ff6c37; background: #fff8f4; box-shadow: 0 0 0 1px #ff6c37; }
.progress-unit__name { display: grid; min-width: 0; }
.progress-unit__name strong { overflow: hidden; color: #284a64; font-size: .8rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.progress-unit__name small { overflow: hidden; color: #7b8d98; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.progress-unit__value { color: #284a64; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-unit progress { grid-column: 1 / -1; width: 100%; height: .3rem; overflow: hidden; border: 0; border-radius: 999px; background: #e7eef2; appearance: none; }
.progress-unit progress::-webkit-progress-bar { border-radius: 999px; background: #e7eef2; }
.progress-unit progress::-webkit-progress-value { border-radius: 999px; background: #ff6c37; }
.progress-unit progress::-moz-progress-bar { border-radius: 999px; background: #ff6c37; }
.progress-unit__tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .3rem; }
.progress-unit__tags em { display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .4rem; border-radius: 999px; background: #e6eef4; color: #284a64; font-size: .64rem; font-style: normal; font-weight: 600; }
.progress-unit__tags em.is-proposed { background: #fff1e0; color: #b8621d; }
.progress-unit__tags em.is-blocked { background: #fdeeee; color: #ad3636; }
.progress-unit__remove { display: grid; place-items: center; min-height: 2.25rem; border: 1px solid #efcccc; border-radius: .5rem; background: #fff7f7; color: #b74444; }
.progress-unit__remove:hover { border-color: #d96a6a; background: #fff0f0; color: #9e2f2f; }
.progress-unit__remove:disabled { cursor: wait; opacity: .55; }
.progress-unit__remove-confirm { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .4rem; padding: .6rem .7rem; border: 1px solid #f0c6c6; border-radius: .5rem; background: #fff7f7; color: #6f4a4a; font-size: .7rem; }
.progress-unit__remove-confirm span { display: grid; gap: .15rem; }
.progress-unit__remove-confirm strong { color: #963838; }
.progress-unit__remove-confirm > div { display: flex; flex: 0 0 auto; gap: .4rem; }
.progress-unit__remove-confirm .btn-custom { min-height: 1.9rem; padding: .3rem .55rem; font-size: .68rem; }
.progress-button-danger { border: 1px solid #c75252; background: #c75252; color: #fff; }

.progress-report { display: grid; gap: .75rem; margin: .9rem 1.2rem 0; padding: .9rem; border: 1px solid #e2e9ed; border-radius: .6rem; background: #f8fafb; }
.progress-report > header { display: grid; gap: .05rem; }
.progress-report > header small { color: #ff6c37; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.progress-report > header strong { color: #284a64; font-size: .9rem; font-weight: 600; }
.progress-report label { display: grid; gap: .3rem; color: #405866; font-size: .76rem; font-weight: 600; }
.progress-report label small { color: #8396a2; font-weight: 400; }
.progress-report input,
.progress-report textarea,
.progress-report select { width: 100%; padding: .5rem .6rem; border: 1px solid #cbd8e0; border-radius: .42rem; background: #fff; color: #2e4656; font: inherit; font-size: .8rem; }
.progress-report textarea { resize: vertical; }
.progress-report .validation-errors { margin: 0; padding: .5rem .7rem .5rem 1.6rem; border-radius: .42rem; background: #fdeeee; color: #ad3636; font-size: .72rem; }
.progress-report .validation-errors:empty { display: none; }
.progress-report__quantity { display: flex; align-items: center; gap: .5rem; }
.progress-report__quantity input { flex: 0 1 7rem; }
.progress-report__quantity span { color: #758893; font-size: .74rem; font-weight: 400; white-space: nowrap; }
.progress-report__commitment { display: grid; gap: .55rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.progress-report__commitment legend { float: none; display: grid; gap: .1rem; width: auto; margin: 0 0 .1rem; padding: 0; color: #284a64; font-size: .78rem; font-weight: 600; }
.progress-report__commitment legend small { color: #758893; font-size: .7rem; font-weight: 400; }
.progress-report__choice { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.progress-report__choice label { position: relative; display: block; cursor: pointer; }
.progress-report__choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.progress-report__choice span { display: block; padding: .5rem; border: 1px solid #cbd8e0; border-radius: .45rem; background: #fff; color: #526a78; font-size: .76rem; text-align: center; }
.progress-report__choice input:focus-visible + span { outline: 2px solid #284a64; outline-offset: 2px; }
.progress-report__choice .is-yes input:checked + span { border-color: #2f8b62; background: #e6f5ed; color: #22704d; }
.progress-report__choice .is-no input:checked + span { border-color: #d95a2d; background: #fff0e5; color: #b8461f; }
.progress-report__note { display: flex; gap: .45rem; margin: 0; padding: .55rem .7rem; border-radius: .45rem; background: #eef3f6; color: #526a79; font-size: .72rem; line-height: 1.4; }
.progress-report__constraint { display: grid; gap: .6rem; border-top: 1px dashed #d5e0e7; padding-top: .65rem; }
.progress-report__constraint summary { display: inline-flex; align-items: center; gap: .4rem; color: #526f81; cursor: pointer; font-size: .74rem; font-weight: 600; list-style: none; }
.progress-report__constraint summary::-webkit-details-marker { display: none; }
.progress-report__constraint summary:hover { color: #d95729; }
.progress-report__constraint[open] summary { margin-bottom: .2rem; color: #284a64; }
.progress-report > button[type="submit"] { width: 100%; }

.progress-constraints article > small { display: block; margin-top: .15rem; }
.progress-constraints__status { padding: .02rem .4rem; border-radius: 999px; background: #e3ebf0; color: #526a78; font-size: .62rem; font-weight: 600; }
.progress-constraints article.is-open .progress-constraints__status { background: #ffe3d6; color: #c94d21; }
.progress-constraints button { display: inline-flex; align-items: center; gap: .3rem; }
.progress-constraints button:disabled { cursor: wait; opacity: .5; }
.progress-activity-delete__form { display: grid; gap: .75rem; padding: .8rem; border: 1px solid #edcaca; border-radius: .5rem; background: #fff8f8; }
.progress-activity-delete__warning { display: grid; grid-template-columns: auto 1fr; gap: .65rem; color: #8f2929; }
.progress-activity-delete__warning > i { margin-top: .12rem; }
.progress-activity-delete__warning strong { font-size: .78rem; }
.progress-activity-delete__warning p { margin: .2rem 0 0; color: #775757; font-size: .69rem; line-height: 1.4; }
.progress-activity-delete__form label { display: grid; gap: .3rem; color: #634848; font-size: .72rem; font-weight: 700; }
.progress-activity-delete__form textarea { min-height: 4.2rem; padding: .55rem .65rem; border: 1px solid #dcbcbc; border-radius: .42rem; background: #fff; color: #3f3434; resize: vertical; }
.progress-activity-delete__form .validation-message { color: #ad3636; font-size: .67rem; }
.progress-activity-delete__form footer { display: flex; justify-content: flex-end; gap: .5rem; }
.progress-activity-delete__form footer button { min-height: 2.15rem; padding: .4rem .65rem; border-radius: .42rem; font-size: .7rem; font-weight: 700; }
.progress-activity-delete__confirm { border: 1px solid #ad3636; background: #ad3636; color: #fff; }
.progress-activity-delete__confirm:disabled { cursor: wait; opacity: .55; }

.progress-lookahead { overflow: hidden; border: 1px solid #dbe5eb; border-radius: .75rem; background: #fff; box-shadow: 0 7px 24px rgba(40, 74, 100, .08); }
.progress-lookahead > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid #e1e8ed; background: #f8fafb; }
.progress-lookahead header small { color: #d95a2d; font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.progress-lookahead h2 { margin: .15rem 0; color: #284a64; font-size: 1.1rem; }
.progress-lookahead header p { margin: 0; color: #71838e; font-size: .76rem; }
.progress-lookahead__period { display: grid; justify-items: end; color: #526a78; font-size: .76rem; }
.progress-lookahead__period strong { color: #284a64; }
.progress-lookahead__create { display: grid; align-items: end; gap: .7rem; padding: 1rem 1.2rem; }
.progress-lookahead__create { grid-template-columns: 1fr 1fr auto; }
.progress-lookahead label { display: grid; gap: .3rem; color: #405866; font-size: .74rem; font-weight: 600; }
.progress-lookahead input,
.progress-lookahead select { width: 100%; height: 2.35rem; padding: 0 .6rem; border: 1px solid #cbd8e0; border-radius: .42rem; background: #fff; color: #2e4656; }
.progress-lookahead__planner-launch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.2rem; border-bottom: 1px solid #e5ebef; background: #fff; }
.progress-lookahead__planner-launch > div { display: flex; align-items: center; gap: .7rem; }
.progress-lookahead__planner-launch > div > i { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .5rem; background: #eaf2f6; color: #284a64; font-size: 1rem; }
.progress-lookahead__planner-launch span { display: grid; }
.progress-lookahead__planner-launch strong { color: #284a64; font-size: .82rem; }
.progress-lookahead__planner-launch small { color: #71838e; font-size: .7rem; }
.progress-lookahead__notice { display: flex; align-items: center; gap: .45rem; margin: 0; padding: .65rem 1.2rem; border-bottom: 1px solid #e5ebef; background: #edf8f2; color: #28724f; font-size: .72rem; }
.progress-lookahead__notice.is-warning { background: #fff7e8; color: #966717; }
.progress-pcp-dialog { width: min(76rem, calc(100vw - 2rem)); overflow: hidden; }
.progress-pcp-dialog form { display: flex; height: min(44rem, calc(100vh - 8rem)); padding: 0; flex-direction: column; }
.progress-pcp-dialog__context { display: grid; grid-template-columns: minmax(14rem, 1.4fr) repeat(2, minmax(10rem, .8fr)); gap: .8rem; padding: 1rem 1.2rem; border-bottom: 1px solid #dfe7ec; background: #f8fafb; }
.progress-pcp-dialog__prompt { display: grid; flex: 1; place-content: center; justify-items: center; gap: .35rem; padding: 2rem; color: #71838e; text-align: center; }
.progress-pcp-dialog__prompt i { color: #ff6c37; font-size: 2rem; }
.progress-pcp-dialog__prompt strong { color: #284a64; }
.progress-pcp-dialog__prompt span { max-width: 30rem; font-size: .78rem; }
.progress-pcp-dialog__activity-toolbar { display: flex; align-items: center; gap: .8rem; padding: .65rem 1.2rem; border-bottom: 1px solid #dfe7ec; }
.progress-pcp-dialog__activity-toolbar label { position: relative; display: block; flex: 1; }
.progress-pcp-dialog__activity-toolbar label i { position: absolute; top: 50%; left: .65rem; color: #81919b; transform: translateY(-50%); }
.progress-pcp-dialog__activity-toolbar input { padding-left: 2rem; }
.progress-pcp-dialog__activity-toolbar > span { color: #71838e; font-size: .7rem; white-space: nowrap; }
.progress-pcp-dialog__activity-toolbar > button { padding: .4rem .65rem; border: 1px solid #b9cad4; border-radius: .4rem; background: #fff; color: #284a64; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.progress-pcp-dialog__activity-list { flex: 1; min-height: 0; overflow: auto; }
.progress-pcp-dialog__activity-row { display: grid; grid-template-columns: 2rem minmax(20rem, 1fr) 8rem 8rem; align-items: center; gap: .7rem; min-width: 46rem; min-height: 3.7rem; padding: .5rem 1.2rem; border-bottom: 1px solid #edf1f3; color: #526773; font-size: .72rem; }
.progress-pcp-dialog__activity-row.is-header { position: sticky; top: 0; z-index: 1; min-height: 2.2rem; background: #eef3f6; color: #526a79; font-size: .66rem; font-weight: 700; text-transform: uppercase; }
.progress-pcp-dialog__activity-row.is-selected { background: #fff7f2; box-shadow: inset 3px 0 #ff6c37; }
.progress-pcp-dialog__activity-row > span:nth-child(2) { display: grid; min-width: 0; }
.progress-pcp-dialog__activity-row strong { overflow: hidden; color: #284a64; text-overflow: ellipsis; white-space: nowrap; }
.progress-pcp-dialog__activity-row small { color: #7a8c97; }
.progress-pcp-dialog__activity-row input[type="checkbox"] { width: 1rem; height: 1rem; padding: 0; accent-color: #ff6c37; }
.progress-pcp-dialog__activity-row input:disabled { background: #edf1f3; color: #8a969e; }
.progress-pcp-dialog__footer { align-items: center; margin: 0 !important; padding: .8rem 1.2rem; border-top: 1px solid #dfe7ec; background: #f8fafb; }
.progress-pcp-dialog__footer > span { margin-right: auto; color: #617682; font-size: .72rem; }
.progress-pcp-dialog__footer > em { color: #b43d32; font-size: .7rem; font-style: normal; }
.progress-lookahead__table { overflow-x: auto; }
.progress-lookahead__row { display: grid; grid-template-columns: minmax(18rem, 2fr) minmax(10rem, 1fr) 10rem 5rem 5rem minmax(8rem, 1fr); align-items: center; gap: .7rem; min-width: 64rem; min-height: 3.3rem; padding: .55rem 1.2rem; border-bottom: 1px solid #edf1f3; color: #526773; font-size: .74rem; }
.progress-lookahead__row.is-header { min-height: 2.35rem; background: #eef3f6; color: #526a79; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.progress-lookahead__row > span:first-child { display: grid; }
.progress-lookahead__row strong { color: #284a64; }
.progress-lookahead__row small { color: #7a8c97; }
.progress-lookahead__group-path { display: flex; align-items: center; gap: .3rem; color: #d95a2d !important; font-weight: 700; }
.progress-lookahead__group-path i { font-size: .68rem; }
.progress-lookahead__result { width: fit-content; padding: .22rem .45rem; border-radius: 1rem; background: #edf3f6; font-size: .68rem; font-weight: 700; }
.progress-lookahead__result.is-done { background: #e6f5ed; color: #28724f; }
.progress-lookahead__result.is-missed { background: #fdeaea; color: #ad3636; }
.progress-lookahead__empty { margin: 0; padding: 1.4rem; color: #71838e; text-align: center; }
.progress-lookahead > footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.2rem; background: #f8fafb; color: #71838e; font-size: .72rem; }

@keyframes progress-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
    .progress-workspace-card__toolbar { align-items: center; flex-wrap: wrap; }
}

@media (max-width: 720px) {
    .construction-progress-page { padding: .75rem; }
    .progress-program-actions { width: 100%; flex-wrap: wrap; }
    .progress-program-actions__selector { min-width: 0; flex: 1 1 12rem; }
    .progress-program-actions__selector select { min-width: 0; flex: 1 1 auto; }
    .progress-workspace-card__heading { align-items: flex-start; flex-direction: column; }
    .progress-workspace-card__tools { width: 100%; justify-content: space-between; }
    .progress-workspace-card.is-fullscreen { inset: 0; height: 100dvh; border: 0; border-radius: 0; }
    .progress-fullscreen-toggle span { display: none; }
    .progress-empty-state form,
    .progress-dialog__grid,
    .progress-program-dialog__fields { grid-template-columns: 1fr; }
    .progress-location-picker__list { grid-template-columns: 1fr 1fr; }
    .progress-location-picker__toolbar { align-items: stretch; flex-direction: column; }
    .progress-activity-editor__actions { align-items: stretch; flex-direction: column-reverse; }
    .progress-activity-editor__actions .btn-custom { width: 100%; }
    .progress-gantt-reschedule-dialog__dates { grid-template-columns: 1fr; }
    .progress-gantt-reschedule-dialog__dates > i { transform: rotate(90deg); }
    .progress-unit__remove-confirm { align-items: stretch; flex-direction: column; }
    .progress-unit__remove-confirm > div { justify-content: flex-end; }
    .progress-legend { flex-wrap: wrap; }
    .progress-lookahead > header,
    .progress-lookahead > footer { flex-direction: column; }
    .progress-lookahead__period { justify-items: start; }
    .progress-lookahead__create { grid-template-columns: 1fr; }
    .progress-lookahead__planner-launch,
    .progress-pcp-dialog__activity-toolbar,
    .progress-pcp-dialog__footer { align-items: stretch; flex-direction: column; }
    .progress-pcp-dialog__context { grid-template-columns: 1fr; }
    .progress-pcp-dialog__footer > span { margin-right: 0; }
}

/* Make-ready en el PCP y fecha de liberación de restricciones */
.progress-pcp-dialog__activity-row.is-not-ready { background: #fafbfc; color: #8a9aa4; }
.progress-pcp-dialog__not-ready { display: inline-flex; align-items: center; gap: .3rem; color: #b06a12; font-weight: 600; }

/* Historial Last Planner: PPC y Pareto de causas */
.progress-pcp-history { margin-top: 1rem; overflow: hidden; border: 1px solid #dbe5eb; border-radius: .75rem; background: #fff; box-shadow: 0 7px 24px rgba(40, 74, 100, .08); }
.progress-pcp-history > header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid #e5ebef; }
.progress-pcp-history > header small { color: #ff6c37; font-size: .64rem; font-weight: 700; letter-spacing: .06em; }
.progress-pcp-history > header h2 { margin: .15rem 0; color: #284a64; font-size: 1.05rem; }
.progress-pcp-history > header p { margin: 0; color: #71838e; font-size: .74rem; }
.progress-pcp-history__average { display: grid; justify-items: end; color: #526a79; font-size: .7rem; }
.progress-pcp-history__average strong { color: #284a64; font-size: 1.5rem; }
.progress-pcp-history__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; padding: 1rem 1.2rem; }
.progress-pcp-history__grid h3 { margin: 0 0 .6rem; color: #284a64; font-size: .8rem; }
.progress-pcp-history__periods, .progress-pcp-history__causes { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.progress-pcp-history__periods li, .progress-pcp-history__causes li { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(4rem, 1fr) 3.2rem 3rem; align-items: center; gap: .6rem; color: #526773; font-size: .72rem; }
.progress-pcp-history__periods strong, .progress-pcp-history__causes strong { color: #284a64; text-align: right; }
.progress-pcp-history__bar { --bar-color: #ff6c37; width: 100%; height: .55rem; overflow: hidden; border: 0; border-radius: 999px; background: #eef3f6; appearance: none; }
.progress-pcp-history__bar::-webkit-progress-bar { border-radius: 999px; background: #eef3f6; }
.progress-pcp-history__bar::-webkit-progress-value { border-radius: 999px; background: var(--bar-color); }
.progress-pcp-history__bar::-moz-progress-bar { border-radius: 999px; background: var(--bar-color); }
.progress-pcp-history__bar.is-good { --bar-color: #2f9e6a; }
.progress-pcp-history__bar.is-warning { --bar-color: #e3a21a; }
.progress-pcp-history__bar.is-danger { --bar-color: #d95a2d; }
.progress-pcp-history__causes li.is-undeclared span:first-child { color: #b06a12; font-style: italic; }
.progress-workspace-warning { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; padding: .65rem 1rem; border: 1px solid #f3d38b; border-radius: .6rem; background: #fff7e8; color: #966717; font-size: .74rem; }
@media (max-width: 640px) {
    .progress-pcp-history__periods li, .progress-pcp-history__causes li { grid-template-columns: minmax(6rem, 1fr) 4rem 2.6rem; }
    .progress-pcp-history__periods small, .progress-pcp-history__causes small { display: none; }
}

/* Plan intermedio (lookahead) y estados del compromiso semanal */
.progress-lookahead-window { margin-bottom: 1rem; }
.progress-lookahead__create small { flex-basis: 100%; color: #71838e; font-size: .7rem; }
.progress-lookahead-window__filters { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 1.2rem; border-bottom: 1px solid #e5ebef; }
.progress-lookahead-window__filters button { padding: .3rem .75rem; border: 1px solid #dbe5eb; border-radius: 999px; background: #fff; color: #526a79; font-size: .72rem; font-weight: 600; }
.progress-lookahead-window__filters button.is-active { border-color: #ff6c37; background: #fff7f2; color: #d95a2d; }
.progress-lookahead-window__open { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border: 1px solid #f3d38b; border-radius: .45rem; background: #fff7e8; color: #966717; font-size: .68rem; font-weight: 600; }
.progress-lookahead__result.is-pending { background: #fff7e8; color: #966717; }

/* ==========================================================================
   Rediseño visual (18-10-2026): jerarquía más clara, menos densidad.
   Paleta Appers: azul #284a64, naranja #ff6c37 y los semánticos existentes
   (verde #2f8b62, rojo #c63f3f, ámbar #d95a2d, violeta línea base #7357a6).
   ========================================================================== */
.construction-progress-page { gap: .85rem; padding: .75rem 1.25rem 1.25rem; }
.progress-view-panel { display: grid; gap: .85rem; }

/* Vista Gantt: columna flexible; la carta ocupa toda la altura restante. */
.construction-progress-page.is-gantt-view { display: flex; flex-direction: column; }
.construction-progress-page.is-gantt-view > .progress-view-panel { flex: 1 1 auto; min-height: 0; }

/* Pulso compacto en la Gantt para priorizar la carta */
.is-gantt-view .progress-pulse { gap: .6rem; }
.is-gantt-view .progress-pulse > article,
.is-gantt-view .progress-pulse__signals { padding: .55rem .85rem; }
.is-gantt-view .progress-pulse article > strong { margin: .1rem 0 .2rem; font-size: 1.2rem; }
.is-gantt-view .progress-pulse .progress-pulse__finish > strong { font-size: 1.05rem; }
.is-gantt-view .progress-pulse__progress progress { margin-bottom: .25rem; }
.is-gantt-view .progress-pulse__signals { gap: .15rem; }

/* Pulso del programa */
.progress-pulse {
    display: grid;
    grid-template-columns: minmax(16rem, 1.4fr) minmax(14rem, 1fr) minmax(14rem, 1fr);
    gap: .85rem;
}

.progress-pulse > article,
.progress-pulse__signals {
    margin: 0;
    padding: .9rem 1.1rem;
    border: 1px solid #e1e8ed;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(40, 74, 100, .05);
}

.progress-pulse header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.progress-pulse header span { color: #6b7f8d; font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.progress-pulse article > strong { display: block; margin: .25rem 0 .35rem; color: #284a64; font-size: 1.75rem; font-weight: 700; line-height: 1; }
.progress-pulse article > strong small { margin-left: .1rem; font-size: 1rem; font-weight: 600; }
.progress-pulse article > small { color: #71838e; font-size: .74rem; }
.progress-pulse header em { padding: .15rem .5rem; border-radius: 999px; font-size: .72rem; font-style: normal; font-weight: 700; }
.progress-pulse header em.is-danger { background: #fdeaea; color: #c63f3f; }
.progress-pulse header em.is-success { background: #e6f5ed; color: #2f8b62; }

.progress-pulse__progress progress {
    display: block;
    width: 100%;
    height: .45rem;
    margin-bottom: .45rem;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #edf2f5;
    appearance: none;
}
.progress-pulse__progress progress::-webkit-progress-bar { border-radius: 999px; background: #edf2f5; }
.progress-pulse__progress progress::-webkit-progress-value { border-radius: 999px; background: #284a64; }
.progress-pulse__progress progress::-moz-progress-bar { border-radius: 999px; background: #284a64; }

.progress-pulse > .progress-pulse__finish { border-left: 4px solid #2f8b62; }
.progress-pulse > .progress-pulse__finish.is-danger { border-left-color: #c63f3f; }
.progress-pulse .progress-pulse__finish > strong { font-size: 1.35rem; }
.progress-pulse .progress-pulse__finish.is-danger > strong { color: #c63f3f; }

.progress-pulse__signals { display: grid; align-content: center; gap: .4rem; list-style: none; }
.progress-pulse__signals li { display: grid; grid-template-columns: 1.5rem auto 1fr; align-items: center; gap: .5rem; color: #71838e; font-size: .78rem; }
.progress-pulse__signals i { color: #94a6b2; font-size: .95rem; }
.progress-pulse__signals strong { min-width: 1.6rem; color: #284a64; font-size: .95rem; text-align: right; }
.progress-pulse__signals li.is-attention i,
.progress-pulse__signals li.is-attention strong { color: #d95a2d; }

/* Pestañas por etapa del ciclo */
.progress-tabs {
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    border-bottom: 1px solid #dfe7ec;
    scrollbar-width: none;
}

.progress-tabs__tab {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem .7rem;
    border: 0;
    background: transparent;
    color: #6b7f8d;
    font-size: .86rem;
    font-weight: 600;
    white-space: nowrap;
}

.progress-tabs__tab i { font-size: 1rem; }
.progress-tabs__tab:hover { color: #284a64; }
.progress-tabs__tab:focus-visible { border-radius: .4rem; outline: 2px solid #ff6c37; outline-offset: -2px; }
.progress-tabs__tab.is-active { color: #284a64; }
.progress-tabs__tab.is-active::after {
    position: absolute;
    right: .6rem;
    bottom: -1px;
    left: .6rem;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #ff6c37;
    content: "";
}
.progress-tabs__tab em { min-width: 1.45rem; padding: .08rem .4rem; border-radius: 999px; background: #edf2f5; color: #526a78; font-size: .7rem; font-style: normal; font-weight: 700; text-align: center; }
.progress-tabs__tab.is-active em { background: #284a64; color: #fff; }
.progress-tabs__tab em.is-warning { background: #fff0e5; color: #d95a2d; }

/* Ciclo semanal Last Planner */
.progress-cycle {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e1e8ed;
    border-radius: .85rem;
    background: #fff;
    list-style: none;
}

.progress-cycle__step + .progress-cycle__step { border-left: 1px solid #edf1f4; }
.progress-cycle__step button {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    gap: .7rem;
    padding: .8rem 1rem;
    border: 0;
    background: transparent;
    text-align: left;
}
.progress-cycle__step button:hover { background: #f8fafb; }
.progress-cycle__step button:focus-visible { outline: 2px solid #ff6c37; outline-offset: -2px; }
.progress-cycle__marker {
    display: grid;
    width: 1.9rem;
    height: 1.9rem;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid #cfdbe2;
    border-radius: 50%;
    color: #8396a2;
    font-size: .8rem;
    font-weight: 700;
}
.progress-cycle__copy { display: grid; min-width: 0; }
.progress-cycle__copy strong { color: #526a78; font-size: .82rem; }
.progress-cycle__copy small { overflow: hidden; color: #8396a2; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.progress-cycle__step.is-done .progress-cycle__marker { border-color: #2f8b62; background: #2f8b62; color: #fff; }
.progress-cycle__step.is-done .progress-cycle__copy strong { color: #284a64; }
.progress-cycle__step.is-current { background: #fff8f4; box-shadow: inset 0 -3px 0 #ff6c37; }
.progress-cycle__step.is-current .progress-cycle__marker { border-color: #ff6c37; background: #ff6c37; color: #fff; }
.progress-cycle__step.is-current .progress-cycle__copy strong { color: #284a64; }
.progress-cycle__step.is-current .progress-cycle__copy small { color: #d95a2d; }

/* Barra de herramientas de la Gantt */
.progress-workspace-card__toolbar { gap: .6rem; padding: .55rem .75rem; }
.progress-workspace-card__count { margin-right: auto; font-size: .72rem; font-weight: 600; }
.progress-workspace-card__tools { gap: .4rem; }

.progress-filters { position: relative; display: flex; align-items: center; gap: .45rem; }
.progress-filters__search {
    display: flex;
    width: clamp(12rem, 24vw, 20rem);
    height: 2.15rem;
    align-items: center;
    gap: .5rem;
    padding: 0 .75rem;
    border: 1px solid #d5e0e7;
    border-radius: .55rem;
    background: #fff;
    color: #405767;
    font-size: .8rem;
}
.progress-filters__search:focus-within { border-color: #284a64; box-shadow: 0 0 0 3px rgba(40, 74, 100, .1); }
.progress-filters__search i { color: #7b8d98; }
.progress-filters__search input { width: 100%; border: 0; outline: 0; background: transparent; }

.progress-filters__more { position: relative; }
.progress-filters__more summary {
    display: inline-flex;
    height: 2.15rem;
    align-items: center;
    gap: .4rem;
    padding: 0 .75rem;
    border: 1px solid #d5e0e7;
    border-radius: .55rem;
    background: #fff;
    color: #405f72;
    font-size: .8rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.progress-filters__more summary::-webkit-details-marker { display: none; }
.progress-filters__more[open] summary,
.progress-filters__more summary:hover { border-color: #284a64; }
.progress-filters__more summary em { padding: 0 .4rem; border-radius: 999px; background: #ff6c37; color: #fff; font-size: .68rem; font-style: normal; }
.progress-filters__panel {
    position: absolute;
    top: calc(100% + .4rem);
    left: 0;
    z-index: 70;
    display: grid;
    width: 17rem;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid #dce6eb;
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 .8rem 1.8rem rgba(35, 55, 70, .16);
}
.progress-filters__panel label { display: grid; gap: .25rem; color: #6b7f8d; font-size: .72rem; font-weight: 600; }
.progress-filters__panel select { height: 2.1rem; padding: 0 .6rem; border: 1px solid #d5e0e7; border-radius: .5rem; background: #fff; color: #284a64; font-size: .8rem; }
.progress-filters__panel button { display: inline-flex; height: 2rem; align-items: center; justify-content: center; gap: .35rem; border: 0; border-radius: .5rem; background: #f2f5f7; color: #526a78; font-size: .76rem; font-weight: 600; }

.progress-tool-button {
    position: relative;
    display: inline-flex;
    height: 2.15rem;
    align-items: center;
    gap: .4rem;
    margin: 0;
    padding: 0 .75rem;
    overflow: hidden;
    border: 1px solid #d5e0e7;
    border-radius: .55rem;
    background: #fff;
    color: #405f72;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.progress-tool-button:hover { border-color: #284a64; color: #284a64; }
.progress-tool-button:focus-within,
.progress-tool-button:focus-visible { outline: 2px solid #ff6c37; outline-offset: 1px; }
.progress-tool-button.is-on { border-color: #ffc4ad; background: #fff4ef; color: #d95729; }
.progress-tool-button.is-primary { border-color: #284a64; background: #284a64; color: #fff; }
.progress-tool-button.is-primary:hover { background: #1f3b50; color: #fff; }
.progress-tool-button input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Leyenda compacta */
.progress-legend { flex-wrap: wrap; gap: .35rem 1rem; padding: .45rem .85rem; font-size: .72rem; }
.progress-legend .progress-legend__hint { margin-left: auto; color: #8396a2; cursor: help; }
.progress-legend .progress-legend__hint i { width: auto; height: auto; background: transparent; color: #8396a2; font-size: .85rem; }

/* Paneles del ciclo: tipografía más legible y descripciones breves */
.progress-lookahead > header { padding: 1rem 1.25rem; background: #fff; }
.progress-lookahead > header small { font-size: .68rem; }
.progress-lookahead > header h2 { font-size: 1.1rem; }
.progress-lookahead > header p { font-size: .8rem; }
.progress-lookahead__row { font-size: .78rem; }
.progress-lookahead__create small,
.progress-lookahead__create .validation-errors { grid-column: 1 / -1; margin: 0; }
.progress-lookahead-window { margin-bottom: 0; }
.progress-pcp-history { margin-top: 0; }

@media (max-width: 1100px) {
    .progress-pulse { grid-template-columns: 1fr 1fr; }
    .progress-pulse__signals { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .progress-cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .progress-cycle__step:nth-child(3) { border-left: 0; }
    .progress-cycle__step:nth-child(n + 3) { border-top: 1px solid #edf1f4; }
}

@media (max-width: 720px) {
    .construction-progress-page { padding: .75rem; }
    .progress-pulse { grid-template-columns: 1fr; }
    .progress-pulse__signals { grid-template-columns: 1fr; }
    .progress-cycle { grid-template-columns: 1fr; }
    .progress-cycle__step + .progress-cycle__step { border-top: 1px solid #edf1f4; border-left: 0; }
    .progress-filters { width: 100%; }
    .progress-filters__search { flex: 1 1 auto; width: auto; }
    .progress-workspace-card__count { display: none; }
    .progress-tool-button span { display: none; }
    .progress-legend .progress-legend__hint { display: none; }
}

/* Lista de actividades adaptable a su propio ancho (el divisor con la Gantt lo cambia):
   en anchos reducidos se prioriza el nombre y se ocultan la columna Inicio y la mini barra. */
@container progress-table (max-width: 36rem) {
    .progress-table > header,
    .progress-table__row { grid-template-columns: minmax(0, 1fr) 5.6rem 3.2rem; column-gap: .4rem; }
    .progress-table__start { display: none; }
    .progress-table__percent progress { display: none; }
    .progress-table__percent b { min-width: 0; }
}
.progress-detail__panel .progress-update-form fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.progress-detail__panel .progress-update-form fieldset > label:nth-child(n + 3) { grid-column: 1 / -1; }

.progress-window-close-confirm { display: grid; grid-template-columns: auto 1fr; gap: .7rem; margin-top: 1rem; padding: .9rem 1rem; border: 1px solid #ffd2bf; border-radius: .6rem; background: #fff7f2; color: #405866; font-size: .8rem; }
.progress-window-close-confirm > i { margin-top: .1rem; color: #d95a2d; }
.progress-window-close-confirm strong { color: #284a64; font-size: .88rem; }
.progress-window-close-confirm p { margin: .35rem 0 0; line-height: 1.45; }
.progress-window-close-confirm ul { margin: .25rem 0 0; padding-left: 1.1rem; line-height: 1.45; }
.progress-window-close-confirm footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }

/* Revisión make-ready del plan intermedio */
.progress-review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .75rem 1.2rem; border-bottom: 1px solid #e5ebef; color: #526a79; font-size: .78rem; }
.progress-review-summary > span { display: inline-flex; align-items: center; gap: .3rem; }
.progress-review-summary strong { color: #284a64; font-size: .95rem; font-variant-numeric: tabular-nums; }
.progress-review-summary .is-pendingreview strong { color: #6b7f8d; }
.progress-review-summary .is-constrained strong { color: #d95a2d; }
.progress-review-summary .is-ready strong { color: #2f8b62; }
.progress-review-summary__constraints { margin-left: auto; }
.progress-review-summary__constraints b { color: #c63f3f; font-weight: 600; }
.progress-review-bulk__open { display: inline-flex; align-items: center; gap: .3rem; margin-left: auto; padding: .3rem .75rem; border: 1px solid #b9dcc9; border-radius: 999px; background: #f1faf5; color: #22704d; font-size: .72rem; font-weight: 600; }
.progress-review-bulk { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-left: auto; color: #405866; font-size: .74rem; }
.progress-review-bulk .btn-custom { min-height: 1.9rem; padding: .25rem .6rem; font-size: .72rem; }
.progress-review-list { display: grid; }
.progress-review-row { display: grid; gap: .45rem; padding: .7rem 1.2rem; border-bottom: 1px solid #edf1f3; border-left: 3px solid transparent; color: #526773; font-size: .78rem; }
.progress-review-row.is-pendingreview { border-left-color: #c8d6de; }
.progress-review-row.is-constrained { border-left-color: #ff6c37; background: #fffaf7; }
.progress-review-row.is-ready { border-left-color: #2f8b62; }
.progress-review-row__main { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(8rem, 1fr) minmax(7rem, auto) auto; align-items: center; gap: .8rem; }
.progress-review-row__work { display: grid; min-width: 0; }
.progress-review-row__work strong { overflow: hidden; color: #284a64; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.progress-review-row__work small { display: inline-flex; align-items: center; gap: .3rem; overflow: hidden; color: #7a8c97; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.progress-review-row__dates { display: grid; color: #405866; font-variant-numeric: tabular-nums; }
.progress-review-row__dates small { color: #7a8c97; font-size: .68rem; }
.progress-review-row__state { display: grid; justify-items: start; gap: .15rem; }
.progress-review-row__state small { color: #62498d; font-size: .66rem; }
.progress-review-state { padding: .14rem .5rem; border-radius: 999px; background: #edf3f6; color: #526a79; font-size: .68rem; font-style: normal; font-weight: 600; white-space: nowrap; }
.progress-review-state.is-constrained { background: #fff0e5; color: #c94d21; }
.progress-review-state.is-ready { background: #e6f5ed; color: #22704d; }
.progress-review-row__actions { display: flex; justify-content: flex-end; gap: .35rem; }
.progress-review-action { display: inline-flex; align-items: center; gap: .25rem; padding: .3rem .6rem; border: 1px solid #d5e0e7; border-radius: .45rem; background: #fff; color: #526f81; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.progress-review-action:hover { border-color: #ff6c37; color: #d95729; }
.progress-review-action.is-ready { border-color: #b9dcc9; background: #f1faf5; color: #22704d; }
.progress-review-action.is-ready:hover { border-color: #2f8b62; color: #1d5f41; }
.progress-review-action:disabled { cursor: wait; opacity: .55; }
.progress-review-row__constraints { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.progress-review-row__constraints li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .45rem .65rem; border: 1px solid #ffd9c8; border-radius: .45rem; background: #fff; }
.progress-review-row__constraints li.is-overdue { border-color: #f1b9b9; background: #fff6f6; }
.progress-review-row__constraints li > span { display: grid; gap: .1rem; min-width: 0; }
.progress-review-row__constraints strong { color: #284a64; font-weight: 600; }
.progress-review-row__constraints small { color: #7a8c97; font-size: .68rem; }
.progress-review-row__constraints b { margin-left: .3rem; color: #c63f3f; font-weight: 600; }
.progress-review-row__constraints button { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .55rem; border: 1px solid #b9dcc9; border-radius: .45rem; background: #f1faf5; color: #22704d; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.progress-review-row__form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; padding: .75rem; border: 1px solid #e2e9ed; border-radius: .55rem; background: #f8fafb; }
.progress-review-row__form label { display: grid; gap: .25rem; color: #405866; font-size: .74rem; font-weight: 600; }
.progress-review-row__form .is-wide,
.progress-review-row__form footer,
.progress-review-row__form .validation-errors { grid-column: 1 / -1; }
.progress-review-row__form select,
.progress-review-row__form input,
.progress-review-row__form textarea { width: 100%; padding: .45rem .55rem; border: 1px solid #cbd8e0; border-radius: .42rem; background: #fff; color: #2e4656; font: inherit; font-size: .78rem; }
.progress-review-row__form .validation-errors { margin: 0; padding: .45rem .7rem .45rem 1.5rem; border-radius: .42rem; background: #fdeeee; color: #ad3636; font-size: .72rem; }
.progress-review-row__form .validation-errors:empty { display: none; }
.progress-review-row__form footer { display: flex; justify-content: flex-end; gap: .5rem; }
.progress-lookahead__coverage-warning { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: .65rem; padding: .75rem .9rem; border: 1px solid #f3d38b; border-radius: .55rem; background: #fff9ec; color: #6d5413; font-size: .76rem; }
.progress-lookahead__coverage-warning > i { margin-top: .1rem; color: #b8861d; }
.progress-lookahead__coverage-warning > div { display: grid; justify-items: start; gap: .35rem; }
.progress-lookahead__coverage-warning strong { color: #5b4510; }
.progress-lookahead__empty strong { display: block; color: #284a64; }
.progress-lookahead__empty p { margin: .35rem 0 .8rem; }
@container (max-width: 48rem) {
    .progress-review-row__main { grid-template-columns: minmax(0, 1fr) auto; }
    .progress-review-row__dates { grid-column: 1; }
    .progress-review-row__form { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .progress-review-row__main { grid-template-columns: minmax(0, 1fr) auto; }
    .progress-review-row__form { grid-template-columns: 1fr; }
    .progress-review-summary__constraints { margin-left: 0; }
}

/* Etiquetas QR de terreno: el codigo abre la actividad de la unidad de control desde ProgressClient. */
.progress-units__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .4rem .6rem;
    margin-bottom: .5rem;
    padding: 0 1.2rem;
    font-size: .74rem;
    color: #5b7383;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.progress-units__head > span { min-width: 0; }
.progress-units__head-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.progress-units__head-actions .btn-custom { min-height: 2rem; padding: .3rem .65rem; font-size: .7rem; white-space: nowrap; }

/* El dialogo no desplaza su propio contenido: el encabezado, la leyenda y el pie quedan fijos
   y solo la hoja de etiquetas se desplaza. Asi ninguna opcion queda fuera del borde redondeado. */
.progress-qr-dialog {
    display: flex;
    flex-direction: column;
    width: min(72rem, calc(100vw - 2rem));
    overflow: hidden;
}
.progress-qr-dialog > header,
.progress-qr__intro,
.progress-qr__empty,
.progress-qr-dialog > footer { flex: 0 0 auto; }
.progress-qr__intro { margin: 0 1.2rem .9rem; color: #5b7383; font-size: .85rem; line-height: 1.55; }
.progress-qr__empty { margin: 0 1.2rem 1.2rem; color: #5b7383; font-size: .85rem; }

.progress-qr-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
    gap: .8rem;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 1.2rem 1rem;
    overflow: auto;
}

/* La tarjeta reproduce la etiqueta que se descarga, en blanco y negro y sin marco: QR, actividad y
   unidad de control con su bloque. El contraste se logra con tamaño y peso de letra. */
.progress-qr-label {
    display: grid;
    justify-items: center;
    gap: .45rem;
    min-width: 0;
    overflow: hidden;
    padding: .55rem;
    background: #fff;
    color: #000;
}

/* El QR ocupa un cuadrado fijo y el SVG se estira a el, como en MaterialFlow: asi no se recorta
   ni empuja el texto aunque el SVG generado no declare proporcion propia. */
.progress-qr-label__code { width: 7rem; aspect-ratio: 1; }
.progress-qr-label__code svg { display: block; width: 100%; height: 100%; }
.progress-qr-label__copy { display: grid; justify-items: center; gap: .1rem; min-width: 0; text-align: center; }
.progress-qr-label__copy small { font-size: .62rem; color: #000; letter-spacing: .05em; }
.progress-qr-label__copy strong { font-size: .78rem; line-height: 1.25; color: #000; overflow-wrap: anywhere; }
.progress-qr-label__unit {
    display: grid;
    gap: .05rem;
    width: 100%;
    min-width: 0;
    padding: .4rem .55rem;
    border: 1px solid #000;
    border-left: 3px solid #000;
    border-radius: .4rem;
    background: #fff;
}
.progress-qr-label__unit span { color: #000; font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; }
.progress-qr-label__unit b { color: #000; font-size: .78rem; overflow-wrap: anywhere; }
.progress-qr-label__text { color: #000; font-size: .6rem; text-align: center; word-break: break-all; }

.progress-qr-dialog > footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: 0;
    padding: .9rem 1.2rem;
    border-top: 1px solid #e2e9ed;
    background: #fff;
}
.progress-qr-dialog > footer .btn-custom { min-height: 2.2rem; padding: .45rem .85rem; font-size: .74rem; }
.progress-qr-dialog > footer .progress-button-secondary { border: 1px solid #bfcdd6; box-shadow: none; }
.progress-qr-dialog > footer .progress-button-secondary:hover { background: #f2f6f9; color: #284a64; box-shadow: none; }

@media (max-width: 720px) {
    .progress-qr-dialog { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); }
    .progress-qr__intro { margin: 0 .9rem .75rem; font-size: .78rem; }
    .progress-qr__empty { margin: 0 .9rem 1rem; font-size: .78rem; }
    .progress-qr-sheet { grid-template-columns: 1fr; gap: .6rem; padding: 0 .9rem .8rem; }
    .progress-qr-label__code { width: 4.4rem; }
    .progress-qr-dialog > footer { padding: .75rem .9rem; }
    .progress-qr-dialog > footer .btn-custom { flex: 1 1 auto; justify-content: center; }
}

/* La impresion deja solo la hoja de etiquetas: cada una se corta y se pega en obra. */
@media print {
    /* Las etiquetas QR ya no se imprimen desde el navegador: se descargan como PNG. El bloque de
       impresión anterior ocultaba toda la página (body *) y dejaba el diálogo dentro del contenedor
       recortado de la aplicación, así que la impresión salía en blanco. */
    .progress-dialog-backdrop { display: none !important; }
}
