/* BECO Unidad 4 · v1.6.3 · Etapa 1: Resumen ejecutivo + frentes
   Diseñado sobre el DOM y los componentes reales de la instalación recibida.
   NO reestructura el Gantt ni modifica los modelos financieros o datos.
*/
:root {
 --u4x-bg:#f4f8fc; --u4x-side:#fbfdff; --u4x-surface:#fff; --u4x-raised:#f7fbfe;
 --u4x-text:#14283e; --u4x-muted:#62758b; --u4x-faint:#899bac;
 --u4x-line:#dce7f0; --u4x-line-soft:#eaf0f5;
 --u4x-accent:#008978; --u4x-accent-2:#0aa88b; --u4x-track:#e2eaf1;
 --u4x-sky:#2579bb; --u4x-negative:#c84e59;
 --u4x-shadow:0 5px 19px rgba(30,72,110,.045),0 1px 2px rgba(17,60,93,.055);
 --u4x-cardglow:linear-gradient(155deg,rgba(39,128,165,.045),transparent 64%);
 --u4x-side-active:linear-gradient(105deg,#def7ef,#e4f4f6);
 --u4x-input:#f8fbfd; --u4x-input-border:#d6e3ec;
}
:root[data-u4-theme="dark"] {
 --u4x-bg:#091525; --u4x-side:#0d1c2d; --u4x-surface:#15293e; --u4x-raised:#192f45;
 --u4x-text:#f0f7ff; --u4x-muted:#b2c5d5; --u4x-faint:#8ba5b9;
 --u4x-line:#2b465e; --u4x-line-soft:#233c50;
 --u4x-accent:#50ddc0; --u4x-accent-2:#21c9a8; --u4x-track:#425a71;
 --u4x-sky:#77b5ed; --u4x-negative:#ff8a9c;
 --u4x-shadow:0 8px 26px rgba(0,7,17,.21),inset 0 1px rgba(255,255,255,.038);
 --u4x-cardglow:linear-gradient(148deg,rgba(72,137,185,.10),rgba(27,76,110,.02) 45%,transparent 82%);
 --u4x-side-active:linear-gradient(100deg,rgba(25,143,133,.30),rgba(42,102,126,.32));
 --u4x-input:#152a40; --u4x-input-border:#35516a;
}

/* Contenedor y navegación: conserva las dimensiones conocidas de la app. */
html body {background:var(--u4x-bg)!important;color:var(--u4x-text)!important; font-family:Inter,"Segoe UI Variable","Segoe UI",Arial,sans-serif!important;}
html .app-frame {background:var(--u4x-bg)!important;}
html .sidebar {background:var(--u4x-side)!important;border-right:1px solid var(--u4x-line)!important;box-shadow:2px 0 20px rgba(9,30,45,.03)!important;}
html .sidebar .side-brand {display:flex!important;gap:10px!important;align-items:center!important;margin:0 7px 20px!important;padding:7px 1px 14px!important;border-bottom:1px solid var(--u4x-line-soft)!important;}
html .sidebar .side-brand strong,html .sidebar .u4-brand-label {font-weight:840!important;font-size:17px!important;letter-spacing:.045em!important;color:var(--u4x-text)!important;}
html .sidebar .side-brand small {color:var(--u4x-faint)!important;font-weight:650!important;letter-spacing:.08em!important;font-size:9px!important;}
html .sidebar .side-caption {color:var(--u4x-accent)!important;letter-spacing:1.25px!important;font-size:10px!important;}
html .sidebar .side-link {min-height:34px!important;display:flex!important;align-items:center!important;gap:9px!important;padding:8px 10px!important;border-radius:9px!important;color:var(--u4x-muted)!important;transition:background .18s ease,color .18s ease!important;}
html .sidebar a.side-link.side-budget,html .sidebar a.side-link.side-analytics {min-height:34px!important;padding:8px 10px!important;border-radius:9px!important;color:var(--u4x-muted)!important;}
html .sidebar .side-link:hover {background:var(--u4x-raised)!important;color:var(--u4x-text)!important;}
html .sidebar .side-link.active,html .sidebar a.side-link.active {background:var(--u4x-side-active)!important;color:var(--u4x-text)!important;box-shadow:inset 3px 0 var(--u4x-accent)!important;font-weight:750!important;}
html .sidebar .side-footer {color:var(--u4x-faint)!important;border-color:var(--u4x-line)!important;}
html .sidebar .side-create {border:1px dashed var(--u4x-input-border)!important;color:var(--u4x-text)!important;background:transparent!important;}
html .sidebar .side-create:hover {background:var(--u4x-raised)!important;}
html .shell {padding:7px 12px 18px!important;max-width:none!important;}
html .top {background:var(--u4x-surface)!important;border:1px solid var(--u4x-line)!important;border-radius:12px!important;box-shadow:var(--u4x-shadow)!important;}
html .toolbar-title strong {font-size:13px!important;color:var(--u4x-text)!important;font-weight:780!important;}
html .toolbar-title small {color:var(--u4x-muted)!important;}
html .toolbar-summary {color:var(--u4x-muted)!important;}
html .toolbar-summary strong {color:var(--u4x-text)!important;}
html .top-right label {color:var(--u4x-muted)!important;}
html .top-right select, html .top-right input {background:var(--u4x-input)!important;color:var(--u4x-text)!important;border-color:var(--u4x-input-border)!important;}
html .top .sidebar-toggle,html .top .toolbar-back,html .top .baseline-manage {border-radius:8px!important;color:var(--u4x-text)!important;}
html .u4-theme-switch {border-radius:9px!important;background:var(--u4x-raised)!important;color:var(--u4x-text)!important;border-color:var(--u4x-input-border)!important;}
html .sidebar a:focus-visible,html .sidebar button:focus-visible,html .top button:focus-visible {outline:2px solid var(--u4x-accent)!important;outline-offset:2px!important;}

/* Home: hero reconstruido, sin fotografía ni imagen de la planta. */
html #home .hero.u4-v163-hero {
 position:relative!important;display:block!important;overflow:hidden!important;
 margin:7px 0 10px!important;padding:16px 24px!important;min-height:94px!important;
 border:1px solid var(--u4x-line)!important;border-left:1px solid var(--u4x-line)!important;
 border-radius:14px!important;box-shadow:var(--u4x-shadow)!important;
 background:linear-gradient(115deg,var(--u4x-surface),var(--u4x-raised))!important;
}
html #home .u4-v163-hero:before {content:"";position:absolute;inset:-120% -18% -180% 45%;pointer-events:none;border-radius:50%;border:1px solid rgba(39,177,155,.13);transform:rotate(-22deg);background:radial-gradient(ellipse at 50% 40%,rgba(54,182,160,.075),transparent 55%);}
html #home .u4-v163-hero:after {content:"";position:absolute;inset:-135% -12% -170% 66%;pointer-events:none;border-radius:50%;border:1px solid rgba(40,143,194,.14);transform:rotate(-25deg);}
html #home .u4-hero-content {position:relative;z-index:1;display:grid;gap:7px;}
html #home .u4-hero-content .eyebrow {font-size:10px!important;letter-spacing:1.65px!important;color:var(--u4x-accent)!important;font-weight:850!important;}
html #home .hero-line {gap:16px!important;display:flex!important;align-items:center!important;flex-wrap:wrap!important;}
html #home .hero-line strong {font-size:21px!important;line-height:1.26!important;font-weight:800!important;color:var(--u4x-text)!important;letter-spacing:-.035em!important;}
html #home .u4-hero-power {color:var(--u4x-accent)!important;}
html #home .hero-duration {border-left:1px solid var(--u4x-input-border)!important;padding-left:16px!important;color:var(--u4x-muted)!important;font-size:12px!important;white-space:nowrap;}
html #home .hero-dates {font-size:11px!important;color:var(--u4x-muted)!important;display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
html #home .hero-dates b {color:var(--u4x-text)!important;}
html #home .hero-dates .baseline-home {margin-left:auto;color:var(--u4x-muted)!important;}

/* Clock reales: estructura de icono y contenido creada por renderHome. */
html #home .project-clock {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;margin:8px 0 10px!important;}
html #home .project-clock .clock-cell {display:flex!important;align-items:center!important;gap:13px!important;min-height:77px!important;padding:12px 17px!important;background:var(--u4x-cardglow),var(--u4x-surface)!important;border:1px solid var(--u4x-line)!important;border-radius:13px!important;box-shadow:var(--u4x-shadow)!important;color:var(--u4x-text)!important;}
html #home .project-clock .clock-cell.u4-clock-day {background:linear-gradient(122deg,rgba(30,175,145,.13),rgba(65,178,166,.055)),var(--u4x-surface)!important;}
html #home .project-clock .clock-cell.u4-clock-week {background:linear-gradient(122deg,rgba(41,124,213,.12),rgba(65,178,214,.045)),var(--u4x-surface)!important;}
html #home .project-clock .clock-cell.u4-clock-month {background:linear-gradient(122deg,rgba(127,96,202,.14),rgba(120,116,214,.04)),var(--u4x-surface)!important;}
html #home .u4-clock-symbol {width:43px;height:43px;min-width:43px;display:grid;place-items:center;border-radius:11px;color:var(--u4x-accent)!important;background:rgba(38,181,155,.12);}
html #home .u4-clock-week .u4-clock-symbol {color:var(--u4x-sky)!important;background:rgba(51,137,217,.12);}
html #home .u4-clock-month .u4-clock-symbol {color:#9c87e3!important;background:rgba(145,117,215,.13);}
html #home .u4-clock-text {min-width:0;flex:1;display:grid;gap:3px;}
html #home .u4-clock-text small {font-weight:790!important;font-size:10px!important;letter-spacing:.65px!important;color:var(--u4x-muted)!important;}
html #home .u4-clock-value {display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;}
html #home .u4-clock-value b {font-size:25px!important;line-height:1.1!important;font-weight:830!important;color:var(--u4x-text)!important;font-variant-numeric:tabular-nums;}
html #home .u4-clock-value span {font-size:11px!important;color:var(--u4x-muted)!important;}

/* Cinco indicadores reales con icono + datos. */
html #home .summary.u4-summary-5 {display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important;margin:0 0 12px!important;}
html #home .summary.u4-summary-5 .metric.u4-kpi {display:flex!important;flex-direction:row!important;align-items:center!important;gap:11px!important;padding:13px 13px!important;min-height:74px!important;border:1px solid var(--u4x-line)!important;border-radius:12px!important;background:var(--u4x-surface)!important;box-shadow:var(--u4x-shadow)!important;}
html #home .u4-kpi-icon {flex:none;width:37px;height:37px;border-radius:10px;display:grid;place-items:center;background:rgba(46,131,191,.11);color:var(--u4x-sky);font-size:19px;line-height:1;font-weight:800;}
html #home .u4-kpi[data-kpi="completed"] .u4-kpi-icon {background:rgba(20,175,129,.10);color:var(--u4x-accent);}
html #home .u4-kpi[data-kpi="late"] .u4-kpi-icon {background:rgba(229,141,57,.12);color:#d78b34;}
html #home .u4-kpi[data-kpi="milestone"] .u4-kpi-icon {background:rgba(141,100,209,.13);color:#a68adf;}
html #home .u4-kpi-content {display:grid;gap:3px;min-width:0;}
html #home .u4-kpi-content small {color:var(--u4x-muted)!important;font-size:11px!important;font-weight:760!important;}
html #home .u4-kpi-content strong {color:var(--u4x-text)!important;font-size:22px!important;line-height:1.12!important;font-weight:820!important;font-variant-numeric:tabular-nums;}
html #home .u4-kpi-content span {color:var(--u4x-faint)!important;font-size:10px!important;line-height:1.25!important;}
html #home .section-heading {margin:6px 0 10px!important;align-items:center!important;}
html #home .section-heading h2 {color:var(--u4x-text)!important;font-size:19px!important;font-weight:820!important;margin:0 0 3px!important;}
html #home .section-heading p {color:var(--u4x-muted)!important;margin:0!important;font-size:11px!important;}
html #home .u4-front-count {display:inline-flex;vertical-align:middle;border-radius:20px;padding:2px 7px;background:var(--u4x-raised);font-size:10px!important;font-weight:780;color:var(--u4x-muted)!important;}
html #home .front-actions button {border-radius:9px!important;min-height:33px!important;}

/* Tarjetas de los frentes: HTML específico nuevo, sin alterar datos. */
html #home .cards {gap:11px!important;}
html #home .v10-card.u4-front-card {
 min-height:162px!important;padding:14px 16px 12px!important;gap:9px!important;
 border:1px solid var(--u4x-line)!important;border-left:1px solid var(--u4x-line)!important;
 background:var(--u4x-cardglow),var(--u4x-surface)!important;
 border-radius:13px!important;box-shadow:var(--u4x-shadow)!important;
 transition:transform .19s ease,box-shadow .19s ease,border-color .19s ease!important;
}
html #home .v10-card.u4-front-card:hover {transform:translateY(-2px)!important;border-color:var(--u4x-input-border)!important;box-shadow:0 12px 26px rgba(17,59,90,.11)!important;}
html[data-u4-theme="dark"] #home .v10-card.u4-front-card:hover {box-shadow:0 12px 28px rgba(0,4,15,.37)!important;}
html #home .v10-card.u4-front-card:focus-visible {outline:2px solid var(--u4x-accent)!important;outline-offset:2px!important;}
html #home .u4-front-card .circle {width:39px!important;height:39px!important;min-width:39px!important;border-radius:11px!important;color:#fff!important;background:var(--front-color)!important;box-shadow:inset 0 1px rgba(255,255,255,.22),0 3px 9px rgba(5,19,32,.12)!important;}
html #home .u4-front-card .card-top {gap:11px!important;align-items:center!important;}
html #home .u4-front-card .card-title-wrap h3 {font-size:13px!important;font-weight:820!important;color:var(--u4x-text)!important;}
html #home .u4-front-card .card-title-wrap p {color:var(--u4x-muted)!important;font-size:10px!important;line-height:1.35!important;}
html #home .u4-front-card .card-edit {border-radius:9px!important;color:var(--u4x-muted)!important;background:var(--u4x-raised)!important;border:1px solid var(--u4x-line-soft)!important;}
html #home .u4-front-card .u4-front-progress {gap:10px!important;margin:4px 0 0!important;justify-content:normal!important;align-items:center!important;}
html #home .u4-front-progress-number {color:var(--front-color)!important;font-size:20px!important;line-height:1.25!important;font-weight:840!important;max-width:52%;overflow:hidden;text-overflow:ellipsis;}
html #home .u4-front-progress .bar {height:8px!important;min-width:25px!important;background:var(--u4x-track)!important;border-radius:100px!important;overflow:hidden!important;}
html #home .u4-front-progress .bar>div {border-radius:100px!important;}
html #home .u4-front-progress .u4-front-time {color:var(--u4x-muted)!important;font-size:11px!important;}
html #home .u4-front-card .imported-card-detail {color:var(--u4x-muted)!important;font-size:10px!important;}
html #home .u4-front-card .v10-card-stats {display:flex!important;gap:4px 9px!important;padding-top:7px!important;color:var(--u4x-muted)!important;border-top:1px solid var(--u4x-line-soft)!important;font-size:10px!important;}
html #home .u4-front-card .v10-card-stats span:not(:last-child) {border-right:1px solid var(--u4x-line)!important;}
html #home .u4-front-card .warn-text {color:var(--u4x-negative)!important;}
html #home .u4-front-card .v10-card-baseline {color:var(--u4x-muted)!important;gap:8px!important;font-size:10px!important;}
html #home .u4-front-card .v10-card-baseline span:last-child {color:var(--u4x-muted)!important;}
html #home .footnote {color:var(--u4x-faint)!important;margin:9px 1px!important;}

/* Frentes: nuevo layout de KPI real, conservando el detalle editable y los IDs. */
html #detail:not(.schedule-mode) .detail-head {margin:7px 0 9px!important;padding:13px 16px!important;min-height:74px!important;display:flex!important;align-items:center!important;gap:16px!important;border:1px solid var(--u4x-line)!important;border-radius:13px!important;background:linear-gradient(110deg,var(--u4x-raised),var(--u4x-surface))!important;box-shadow:var(--u4x-shadow)!important;}
html #detail:not(.schedule-mode) .detail-head h1 {font-size:22px!important;font-weight:850!important;color:var(--u4x-text)!important;line-height:1.1!important;}
html #detail:not(.schedule-mode) .detail-head .eyebrow {color:var(--u4x-accent)!important;font-size:10px!important;}
html #detail:not(.schedule-mode) .detail-head p {color:var(--u4x-muted)!important;}
html #detail:not(.schedule-mode) #detailMetrics {display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:9px!important;margin:6px 0 11px!important;}
html #detail:not(.schedule-mode) #detailMetrics .metric.u4-detail-kpi {display:flex!important;flex-direction:row!important;align-items:center!important;gap:10px!important;padding:12px 13px!important;min-height:72px!important;border-radius:12px!important;background:var(--u4x-surface)!important;border:1px solid var(--u4x-line)!important;box-shadow:var(--u4x-shadow)!important;}
html #detail:not(.schedule-mode) .u4-detail-kpi-icon {width:36px;height:36px;min-width:36px;border-radius:10px;display:grid;place-items:center;background:rgba(42,149,184,.10);color:var(--u4x-sky)!important;}
html #detail:not(.schedule-mode) .u4-detail-kpi[data-index="0"] .u4-detail-kpi-icon {background:rgba(23,173,144,.13);color:var(--u4x-accent)!important;}
html #detail:not(.schedule-mode) .u4-detail-kpi[data-index="3"] .u4-detail-kpi-icon {background:rgba(225,143,62,.11);color:#dc974d!important;}
html #detail:not(.schedule-mode) .u4-detail-kpi[data-index="4"] .u4-detail-kpi-icon {background:rgba(143,105,203,.13);color:#a58be3!important;}
html #detail:not(.schedule-mode) .u4-detail-kpi-body {min-width:0;display:grid;gap:4px;}
html #detail:not(.schedule-mode) .u4-detail-kpi-body small {color:var(--u4x-muted)!important;font-size:10px!important;font-weight:760!important;}
html #detail:not(.schedule-mode) .u4-detail-kpi-body strong {font-size:18px!important;font-weight:830!important;line-height:1.12!important;color:var(--u4x-text)!important;font-variant-numeric:tabular-nums;}
html #detail:not(.schedule-mode) .u4-detail-kpi-body span {color:var(--u4x-faint)!important;font-size:10px!important;}

/* Panel frontal y tabla: menos cuadrícula, edición directa sigue intacta. */
html #detail:not(.schedule-mode) #activityPanel {border:1px solid var(--u4x-line)!important;border-radius:14px!important;background:var(--u4x-surface)!important;box-shadow:var(--u4x-shadow)!important;overflow:visible;}
html #detail:not(.schedule-mode) #activityPanel .work-toolbar {background:transparent!important;border-color:var(--u4x-line-soft)!important;}
html #detail:not(.schedule-mode) #activityPanel .work-toolbar h3 {color:var(--u4x-text)!important;font-size:15px!important;font-weight:800!important;}
html #detail:not(.schedule-mode) #activityPanel .hint {color:var(--u4x-muted)!important;}
html #detail:not(.schedule-mode) #activityPanel .list-tools {background:transparent!important;border-color:var(--u4x-line-soft)!important;}
html #detail:not(.schedule-mode) #activityPanel .toolbar-controls input,
html #detail:not(.schedule-mode) #activityPanel .toolbar-controls select,
html #detail:not(.schedule-mode) #activityPanel .list-tools button,
html #detail:not(.schedule-mode) #activityPanel .view-toggle button {border:1px solid var(--u4x-input-border)!important;border-radius:8px!important;background:var(--u4x-input)!important;color:var(--u4x-text)!important;min-height:29px!important;box-shadow:none!important;}
html #detail:not(.schedule-mode) #activityPanel .toolbar-controls button.active,
html #detail:not(.schedule-mode) #activityPanel .list-tools button.mode-active {background:var(--u4x-side-active)!important;color:var(--u4x-text)!important;border-color:var(--u4x-accent)!important;}
html #detail:not(.schedule-mode) #activityPanel .toolbar-controls input:focus,
html #detail:not(.schedule-mode) #activityPanel .toolbar-controls select:focus,
html #detail:not(.schedule-mode) #activityPanel input:focus-visible,
html #detail:not(.schedule-mode) #activityPanel textarea:focus-visible {outline:2px solid rgba(45,176,160,.33)!important;outline-offset:0!important;border-color:var(--u4x-accent)!important;}
html #detail:not(.schedule-mode) #activityTable {background:var(--u4x-surface)!important;border-collapse:collapse!important;}
html #detail:not(.schedule-mode) #activityTable thead th {background:var(--u4x-raised)!important;color:var(--u4x-muted)!important;font-size:10px!important;letter-spacing:.45px!important;border-bottom:1px solid var(--u4x-line)!important;border-right:1px solid transparent!important;padding:10px 10px!important;}
html #detail:not(.schedule-mode) #activityTable tbody tr.task-row {background:var(--u4x-surface)!important;border-bottom:1px solid var(--u4x-line-soft)!important;}
html #detail:not(.schedule-mode) #activityTable tbody tr.task-row:hover {background:var(--u4x-raised)!important;}
html #detail:not(.schedule-mode) #activityTable tbody tr.task-row td {border-right:1px solid transparent!important;border-bottom:1px solid var(--u4x-line-soft)!important;padding:5px 8px!important;color:var(--u4x-text)!important;}
html #detail:not(.schedule-mode) #activityTable .section-row td {background:transparent!important;border-right:0!important;padding:7px 4px 3px!important;}
html #detail:not(.schedule-mode) #activityTable .section-row .section-content {display:flex!important;align-items:center!important;gap:9px!important;padding:7px 10px!important;border-radius:9px!important;background:linear-gradient(110deg,rgba(40,153,153,.12),var(--u4x-raised))!important;border:1px solid var(--u4x-line-soft)!important;min-height:34px!important;}
html #detail:not(.schedule-mode) #activityTable .u4-section-symbol {width:24px;height:24px;min-width:24px;border-radius:7px;display:grid;place-items:center;background:rgba(29,159,141,.13);color:var(--u4x-accent)!important;}
html #detail:not(.schedule-mode) #activityTable .u4-section-symbol .u4-v163-icon {height:16px;width:16px;}
html #detail:not(.schedule-mode) #activityTable .section-row .section-name {font-size:11px!important;font-weight:820!important;color:var(--u4x-text)!important;background:transparent!important;border:1px solid transparent!important;}
html #detail:not(.schedule-mode) #activityTable .section-row .section-count,
html #detail:not(.schedule-mode) #activityTable .section-row .section-weight-indicator {color:var(--u4x-muted)!important;}
html #detail:not(.schedule-mode) #activityTable .section-row .section-rate {background:rgba(41,182,146,.14)!important;color:var(--u4x-accent)!important;border-radius:8px!important;padding:4px 8px!important;}
html #detail:not(.schedule-mode) #activityTable .task-row .code-link {border-radius:7px!important;background:var(--u4x-raised)!important;color:var(--u4x-text)!important;border-color:var(--u4x-line-soft)!important;}
html #detail:not(.schedule-mode) #activityTable .task-row .grid-title {color:var(--u4x-text)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;}
html #detail:not(.schedule-mode) #activityTable .task-row .grid-title:hover {background:var(--u4x-raised)!important;border-color:var(--u4x-line-soft)!important;}
html #detail:not(.schedule-mode) #activityTable .task-row .grid-title:focus {background:var(--u4x-input)!important;border-color:var(--u4x-accent)!important;}
html #detail:not(.schedule-mode) #activityTable .task-row select,
html #detail:not(.schedule-mode) #activityTable .task-row input[type="number"],
html #detail:not(.schedule-mode) #activityTable .task-row input[type="date"] {background:var(--u4x-input)!important;color:var(--u4x-text)!important;border:1px solid transparent!important;border-radius:7px!important;box-shadow:none!important;}
html #detail:not(.schedule-mode) #activityTable .task-row select:hover,
html #detail:not(.schedule-mode) #activityTable .task-row input:hover {border-color:var(--u4x-input-border)!important;}
html #detail:not(.schedule-mode) #activityTable .task-row .real-status {min-height:26px!important;}
html #detail:not(.schedule-mode) #activityTable .row-more {background:var(--u4x-raised)!important;border:1px solid var(--u4x-line-soft)!important;color:var(--u4x-muted)!important;border-radius:7px!important;}
html #detail:not(.schedule-mode) #activityTable .schedule-chip {border-radius:7px!important;font-size:10px!important;font-weight:760!important;}
html #detail:not(.schedule-mode) #activityTable .inline-add td {background:var(--u4x-surface)!important;border:0!important;}
html #detail:not(.schedule-mode) #activityTable .inline-add button {color:var(--u4x-muted)!important;border:0!important;background:transparent!important;}
html #detail:not(.schedule-mode) #activityTable .inline-add button:hover {color:var(--u4x-accent)!important;background:var(--u4x-raised)!important;}
html #detail:not(.schedule-mode) #activityTable .delay-badge {border-radius:8px!important;}

/* Contraste explícito de los estados cuando están sobre el tema oscuro. */
html[data-u4-theme="dark"] #detail:not(.schedule-mode) #activityTable .schedule-chip.current {background:#174c47!important;color:#a9f9df!important;}
html[data-u4-theme="dark"] #detail:not(.schedule-mode) #activityTable .schedule-chip.future {background:#263f54!important;color:#d4e5f7!important;}
html[data-u4-theme="dark"] #detail:not(.schedule-mode) #activityTable .schedule-chip.late {background:#603640!important;color:#ffcad3!important;}
html[data-u4-theme="dark"] #detail:not(.schedule-mode) #activityTable .schedule-chip.undated {background:#334253!important;color:#d0dbe7!important;}
html[data-u4-theme="dark"] #detail:not(.schedule-mode) #activityTable .delay-badge.delay-late {background:#5b3038!important;color:#ffe6ea!important;}
html[data-u4-theme="dark"] #detail:not(.schedule-mode) #activityTable .delay-badge.delay-on {background:#30495a!important;color:#f1f6ff!important;}
html[data-u4-theme="dark"] #detail:not(.schedule-mode) #activityTable .delay-badge.delay-early {background:#145b4f!important;color:#d5fff0!important;}

/* Evitar animación si el sistema operativo la desactiva. */
@media(prefers-reduced-motion:reduce){html #home .v10-card.u4-front-card{transition:none!important;transform:none!important;}}
@media(max-width:1350px){
 html #home .summary.u4-summary-5 {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
 html #detail:not(.schedule-mode) #detailMetrics{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:850px){
 html #home .summary.u4-summary-5{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 html #detail:not(.schedule-mode) #detailMetrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 html #home .project-clock {grid-template-columns:1fr!important;}
 html #home .hero-dates .baseline-home {margin-left:0;}
 html #home .hero-duration {padding-left:0!important;border:0!important;}
}

/* Ajustes finales de la Etapa 1 */
html .sidebar .side-brand .u4-brand-mark img {width:30px!important;height:30px!important;object-fit:contain!important;}
html #home .u4-front-card .circle .u4-v163-icon{stroke-width:1.8;width:22px;height:22px;}
html #home .u4-front-card[data-open="0"] .u4-front-progress-number {font-size:16px!important;max-width:none!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.3!important;}
html #home .u4-front-card[data-open="0"] .u4-front-progress {justify-content:space-between!important;gap:6px!important;}
html #home .u4-front-card[data-open="0"] .u4-front-time {text-align:right;flex:none;max-width:42%;}
