
/* Sección independiente de horas máquina: escala y controles propios. */
#view-production .ins-machine-nav-heading,#view-production .ins-work-machines,#view-production .ins-production-donuts>section:first-child{display:none!important}
#view-production .ins-scope-note{max-width:100%}
.mh-view{--mh-border:rgba(156,190,200,.2);--mh-muted:#abc0c6;--mh-panel:#152a34}
.mh-view .page-title{align-items:center}
.mh-toolbar{display:grid;grid-template-columns:minmax(280px,1fr);gap:16px;align-items:end;margin:14px 0}
.mh-toolbar label,.mh-period>span{display:grid;gap:7px;color:var(--ui-muted,#abc0c6);font-size:13px}
.mh-toolbar select{min-height:42px}
.mh-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0}
.mh-kpis article{display:grid;gap:5px;min-height:93px;padding:14px;border:1px solid var(--mh-border);border-radius:8px;background:var(--mh-panel)}
.mh-kpis small,.mh-kpis span{color:var(--mh-muted);font-size:13px}
.mh-kpis strong{font-size:24px;line-height:1.1;font-variant-numeric:tabular-nums}
.mh-main-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.8fr);gap:14px;align-items:stretch}
.mh-chart-card,.mh-equipment-card,.mh-weekly-analysis,.mh-operators-card,.mh-records-card{min-width:0;margin-bottom:14px;padding:16px}
.mh-chart-card .ins-card-title,.mh-operators-card .ins-card-title,.mh-records-card .ins-card-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mh-chart-heading{min-height:54px}
.mh-chart-period{display:grid;justify-items:end;gap:4px;text-align:right}
.mh-chart-period strong{font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.mh-total-label{color:var(--mh-muted);font-size:13px;white-space:nowrap}
.mh-week-chart{overflow-x:auto;padding:8px 2px 0;outline:none;touch-action:pan-y;cursor:ew-resize}
.mh-week-chart:focus-visible{outline:2px solid #53bdd5;outline-offset:3px;border-radius:4px}
.mh-week-svg{display:block;width:100%;min-width:600px;height:340px;overflow:visible;font-family:inherit}
.mh-gridline{stroke:rgba(158,188,196,.16);stroke-width:1;stroke-dasharray:4 5}
.mh-baseline{stroke:rgba(158,188,196,.34);stroke-width:1}
.mh-axis-label{fill:var(--mh-muted);font-size:12px}
.mh-day-label{fill:#edf5f7;font-size:13px;font-weight:700}
.mh-peak-band{fill:rgba(244,190,83,.075);stroke:rgba(244,190,83,.16);stroke-width:1}
.mh-day-total{fill:#edf5f7;font-size:11px;font-weight:650;font-variant-numeric:tabular-nums;paint-order:stroke;stroke:#16262e;stroke-width:3px;stroke-linejoin:round}
.mh-machine-line{stroke:var(--machine-color);stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;opacity:.92;transition:stroke-width .16s ease,opacity .16s ease}
.mh-machine-series:hover .mh-machine-line,.mh-machine-series:focus-within .mh-machine-line{stroke-width:4;opacity:1}
.mh-machine-point{cursor:pointer;outline:none}
.mh-point-hit{fill:transparent}
.mh-point-halo{fill:#152a34;stroke:var(--machine-color);stroke-width:2}
.mh-point-dot{fill:var(--machine-color);stroke:#d6f1f7;stroke-width:1.4}
.mh-machine-point:hover .mh-point-halo,.mh-machine-point:focus-visible .mh-point-halo{stroke-width:3;filter:drop-shadow(0 0 4px var(--machine-color))}
.mh-machine-point.is-peak .mh-point-halo{stroke:#ffd166;stroke-width:3.2;r:9}
.mh-machine-point.is-peak .mh-point-dot{fill:#ffd166;stroke:#fff2ca}
.mh-chart-hint{display:flex;flex-wrap:wrap;gap:4px 7px;min-height:21px;margin:7px 2px 0;color:var(--mh-muted);font-size:12px}
.mh-chart-hint strong{color:#ffe09a;font-variant-numeric:tabular-nums}
.mh-legend i{position:relative;width:16px;height:3px;border-radius:3px}
.mh-legend i::after{content:"";position:absolute;left:50%;top:50%;width:7px;height:7px;border:2px solid var(--mh-panel);border-radius:50%;background:var(--machine-color);transform:translate(-50%,-50%)}
.mh-legend{display:flex;flex-wrap:wrap;gap:9px 15px;margin-top:14px;padding-top:11px;border-top:1px solid var(--mh-border)}
.mh-legend>span{display:flex;align-items:center;gap:7px;color:var(--mh-muted);font-size:12px}
.mh-legend i{width:10px;height:10px;border-radius:2px;background:var(--machine-color);flex:none}
.mh-empty-week{margin:10px 0 0;color:var(--mh-muted);font-size:13px}
.mh-equipment-card{display:grid;grid-template-rows:190px 1fr;overflow:hidden;padding:0}
.mh-photo-wrap{position:relative;min-height:150px;background:#0c171d}
.mh-photo-wrap img{width:100%;height:100%;object-fit:cover;display:block}
.mh-photo-wrap>span{position:absolute;right:10px;bottom:10px;padding:5px 8px;border-radius:3px;background:rgba(8,18,23,.78);color:#edf5f7;font-size:10px;letter-spacing:.08em}
.mh-equipment-info{padding:15px}
.mh-equipment-info h2{margin:3px 0 5px;font-size:19px;line-height:1.3}
.mh-equipment-info .eyebrow{margin:0;color:#68c8df;font-size:11px}
.mh-code{margin:0;color:var(--mh-muted);font-size:13px;overflow-wrap:anywhere}
.mh-equipment-info>.muted{margin-top:5px;font-size:13px}
.mh-profile-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.mh-profile-stats>div{display:grid;gap:4px;padding:9px;border-top:1px solid var(--mh-border)}
.mh-profile-stats span{color:var(--mh-muted);font-size:12px}
.mh-profile-stats strong{font-size:17px}
.mh-weekly-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.mh-weekly-heading h2{margin:0 0 4px;font-size:16px}
.mh-weekly-heading small{color:var(--mh-muted);font-size:12px}
.mh-weekly-highlights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 16px}
.mh-weekly-highlight{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 12px;padding:12px 14px;border:1px solid var(--mh-border);border-left:3px solid #e2a943;border-radius:6px;background:var(--mh-panel)}
.mh-weekly-highlight.is-low{border-left-color:#55aeb1}
.mh-weekly-highlight>span{grid-column:1/-1;color:var(--mh-muted);font-size:12px}
.mh-weekly-highlight>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.mh-weekly-highlight>b{color:#f0c36a;font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}
.mh-weekly-highlight.is-low>b{color:#79cfca}
.mh-weekly-highlight>small{grid-column:1/-1;color:var(--mh-muted);font-size:11px;line-height:1.4}
.mh-weekly-ranking{border-top:1px solid var(--mh-border)}
.mh-ranking-head,.mh-ranking-row{display:grid;grid-template-columns:36px minmax(160px,1.15fr) minmax(120px,1.6fr) 92px 92px 58px;align-items:center;gap:12px}
.mh-ranking-head{padding:10px 8px 8px;color:var(--mh-muted);font-size:11px}
.mh-ranking-head>strong{grid-column:1/4;color:var(--ui-text,#edf5f7);font-size:13px}
.mh-ranking-head>span{text-align:right}
.mh-ranking-row{min-height:40px;padding:7px 8px;border-top:1px solid rgba(156,190,200,.12)}
.mh-rank-number{color:var(--mh-muted);font-size:11px;font-variant-numeric:tabular-nums}
.mh-rank-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600}
.mh-rank-track{height:9px;overflow:hidden;border-radius:8px;background:rgba(156,190,200,.12)}
.mh-rank-track i{display:block;height:100%;min-width:3px;border-radius:inherit;background:var(--machine-color);transition:width .22s ease}
.mh-rank-average,.mh-rank-daily{text-align:right;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.mh-rank-daily{color:#79cfca}
.mh-ranking-row>small{color:var(--mh-muted);text-align:right;font-size:11px;white-space:nowrap}
.mh-ranking-note{margin:10px 8px 0;color:var(--mh-muted);font-size:11px;line-height:1.5}
.mh-operator-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.mh-operator-grid article{display:flex;align-items:center;gap:10px;min-width:0;padding:10px;border:1px solid var(--mh-border);border-radius:6px;background:var(--mh-panel)}
.mh-avatar{display:grid;width:34px;height:34px;flex:none;place-items:center;border-radius:50%;background:rgba(75,179,207,.17);color:#7bd4e5;font-size:12px;font-weight:700}
.mh-operator-grid article>div{display:grid;gap:3px;min-width:0}
.mh-operator-grid article strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.mh-operator-grid article small{color:var(--mh-muted);font-size:12px}
.mh-operator-grid article>b{margin-left:auto;font-size:13px;white-space:nowrap}
.mh-records-table{max-height:560px;overflow:auto}
.mh-records-table table{min-width:1000px}
.mh-records-table th{position:sticky;top:0;z-index:1;white-space:nowrap}
.mh-records-table td{vertical-align:middle}
.mh-record-details summary{color:#68c8df;cursor:pointer;white-space:nowrap}
.mh-record-details p{margin:5px 0;color:var(--mh-muted);font-size:12px;line-height:1.5}
.mh-record-details b{color:var(--ui-text,#edf5f7)}
@media(max-width:1000px){.mh-toolbar{grid-template-columns:1fr}.mh-main-grid{grid-template-columns:1fr}.mh-equipment-card{grid-template-columns:minmax(200px,.7fr) minmax(0,1fr);grid-template-rows:1fr}.mh-photo-wrap{height:100%;min-height:190px}}
@media(max-width:760px){.mh-ranking-head,.mh-ranking-row{grid-template-columns:28px minmax(100px,1fr) 74px 82px 48px;gap:8px}.mh-ranking-head>strong{grid-column:1/3}.mh-ranking-head>span:nth-child(2){grid-column:3}.mh-ranking-head>span:nth-child(3){grid-column:4}.mh-ranking-head>span:nth-child(4){grid-column:5}.mh-ranking-row{grid-template-columns:28px minmax(100px,1fr) 74px 82px 48px}.mh-rank-track{display:none}.mh-rank-name{font-size:11px}.mh-ranking-note{margin-left:0;margin-right:0}}
@media(max-width:640px){.mh-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.mh-kpis strong{font-size:21px}.mh-chart-heading{align-items:flex-start!important}.mh-chart-period{max-width:48%}.mh-chart-period strong{white-space:normal;font-size:12px}.mh-total-label{font-size:12px}.mh-week-svg{min-width:600px;height:310px}.mh-equipment-card{grid-template-columns:1fr;grid-template-rows:175px 1fr}.mh-photo-wrap{min-height:0}.mh-operator-grid{grid-template-columns:1fr}.mh-chart-card,.mh-equipment-card,.mh-weekly-analysis,.mh-operators-card,.mh-records-card{padding:12px}.mh-equipment-card{padding:0}.mh-weekly-highlights{grid-template-columns:1fr}.mh-weekly-highlight{padding:10px}.mh-weekly-heading{align-items:flex-start}.mh-weekly-heading>.mh-total-label{white-space:normal;text-align:right}.mh-ranking-head,.mh-ranking-row{grid-template-columns:20px minmax(68px,1fr) 52px 58px 40px;gap:4px;padding-left:2px;padding-right:2px}.mh-ranking-head{font-size:9px;line-height:1.25}.mh-ranking-head>strong{grid-column:1/3;font-size:0}.mh-ranking-head>strong:after{content:'Equipo';font-size:11px}.mh-ranking-head>span:nth-child(2){display:block;grid-column:3}.mh-ranking-head>span:nth-child(3){grid-column:4}.mh-ranking-head>span:nth-child(4){grid-column:5}.mh-ranking-row>small{display:block;font-size:10px}.mh-rank-average,.mh-rank-daily{font-size:10px}}
