/* Dashboard transversal: capa aditiva sobre el sistema visual existente. */
.mx-dash-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}
.mx-dash-eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--text-3,#7f91a8);font-weight:700;margin-bottom:6px}
.mx-dash-top h1{margin:0;font-size:27px;letter-spacing:-.03em;color:var(--text)}
.mx-dash-top p{margin:6px 0 0;color:var(--text-2);font-size:13px}
.mx-dash-grid{display:grid;gap:12px;margin-bottom:16px}.mx-dash-grid-3{grid-template-columns:repeat(3,1fr)}.mx-dash-grid-4{grid-template-columns:repeat(4,1fr)}
/* Las tarjetas KPI de "Inicio" reusan el .kpi-card compartido (ver styles.css) en vez de
   un estilo propio: fondo, barra de acento arriba y tipo mono deben ser iguales en toda
   la app. No se define aquí nada de .kpi-card/.kpi-label/.kpi-value; sólo el grid que las
   contiene. */
.mx-dash-card{border:1px solid var(--border);background:var(--navy-2);border-radius:12px;margin-bottom:16px;overflow:hidden}.mx-dash-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--border)}.mx-dash-card-head h2{margin:0;font-size:14px;color:var(--text);font-weight:700}.mx-dash-card-head .btn{font-size:11px;padding:7px 10px}
.mx-dash-list{padding:4px 18px}.mx-dash-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-bottom:1px solid color-mix(in srgb,var(--border) 65%,transparent)}.mx-dash-row:last-child{border-bottom:0}.mx-dash-row strong{display:block;font-size:13px;color:var(--text)}.mx-dash-row span{display:block;margin-top:3px;font-size:12px;color:var(--text-3)}
/* `.mx-dash-row .mx-dash-status` (0,2,0) le gana a `.mx-dash-row span` (0,1,1), que antes se vencía con !important. */
.mx-dash-status,.mx-dash-priority,.mx-dash-row .mx-dash-status,.mx-dash-row .mx-dash-priority{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:700;white-space:nowrap}.mx-dash-status.active{background:var(--green-bg);color:var(--green)}.mx-dash-status.danger{background:var(--red-bg);color:var(--red-txt,var(--red))}.mx-dash-priority.alta{background:var(--red-bg);color:var(--red-txt,var(--red))}.mx-dash-priority.media{background:var(--amber-bg);color:var(--amber)}.mx-dash-priority.baja{background:var(--blue-glow);color:var(--blue-light-txt,var(--blue-light))}
.mx-dash-empty{padding:28px 18px;color:var(--text-3);font-size:13px;text-align:center}.mx-dash-actions{display:flex;flex-wrap:wrap;gap:8px;padding:16px 18px}.mx-dash-action{font-size:12px}.mx-dash-priority-panel{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--border)}.mx-dash-priority-panel>div{padding:20px;background:var(--navy-2);display:flex;align-items:center;gap:9px}.mx-dash-priority-panel strong{font-size:21px}.mx-dash-priority-panel span:not(.dot){font-size:12px;color:var(--text-2)}.dot{width:8px;height:8px;border-radius:50%;flex:none}.dot.warn{background:var(--amber)}.dot.blue{background:var(--blue-light)}.dot.purple{background:var(--purple)}
.mx-dash-alert-grid,.mx-dash-activity{display:grid;grid-template-columns:repeat(3,1fr);gap:0}.mx-dash-alert-grid>div,.mx-dash-activity>div{padding:20px 18px;border-right:1px solid var(--border)}.mx-dash-alert-grid>div:last-child,.mx-dash-activity>div:last-child{border-right:0}.mx-dash-alert-grid strong,.mx-dash-activity strong{display:block;font-size:24px}.mx-dash-alert-grid span,.mx-dash-activity span{display:block;color:var(--text-3);font-size:11px;margin-top:4px}
.mx-dash-loading,.mx-dash-error{min-height:300px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;color:var(--text-2);text-align:center}.mx-dash-spinner{width:25px;height:25px;border:2px solid var(--border);border-top-color:var(--blue);border-radius:50%;animation:mxdashspin .8s linear infinite}@keyframes mxdashspin{to{transform:rotate(360deg)}}.mx-dash-error p{max-width:460px;margin:0 0 8px;font-size:13px}
@media(max-width:800px){.mx-dash-grid-4,.mx-dash-grid-3{grid-template-columns:repeat(2,1fr)}.mx-dash-priority-panel,.mx-dash-alert-grid,.mx-dash-activity{grid-template-columns:1fr}.mx-dash-priority-panel>div,.mx-dash-alert-grid>div,.mx-dash-activity>div{border-right:0;border-bottom:1px solid var(--border)}.mx-dash-priority-panel>div:last-child,.mx-dash-alert-grid>div:last-child,.mx-dash-activity>div:last-child{border-bottom:0}}
@media(max-width:520px){.mx-dash-top{align-items:stretch;flex-direction:column}.mx-dash-top .btn{align-self:flex-start}.mx-dash-grid-4,.mx-dash-grid-3{grid-template-columns:1fr 1fr}.mx-dash-row{align-items:flex-start}.mx-dash-status,.mx-dash-priority{margin-top:2px}}

/* filas del modal de detalle de un KPI que abren la solicitud */
.mx-dash-row-link{cursor:pointer;border-radius:6px}
.mx-dash-row-link:hover,.mx-dash-row-link:focus-visible{background:color-mix(in srgb,var(--accent, var(--blue-light)) 6%,transparent);outline:none}

/* ── tarjeta del reporte diario (Inicio del Mecánico) ──
   La tarea fija de cada jornada. El acento va en la LÍNEA izquierda; el fondo es la superficie neutra. */
.mx-dash-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;padding:16px 18px;border:1px solid var(--border);border-left:4px solid var(--blue-light-txt,var(--blue-light));border-radius:12px;background:var(--navy-2)}
.mx-dash-hero-ok{border-left-color:var(--green)}
.mx-dash-hero-tit{font-size:15px;font-weight:700;color:var(--text)}
.mx-dash-hero-sub{margin-top:3px;font-size:13.5px;color:var(--text-2)}
.mx-dash-hero-btn{min-height:44px;padding:0 18px;font-size:14.5px;font-weight:600;white-space:nowrap}
@media(max-width:680px){
  .mx-dash-hero{flex-direction:column;align-items:stretch}
  .mx-dash-hero-btn{width:100%;min-height:56px;font-size:16px}
  .mx-dash-row{min-height:64px}
  .mx-dash-row strong{font-size:15px}
  .mx-dash-row span{font-size:13px}
  .mx-dash-action{min-height:48px;font-size:13px}
}

/* ── Inicio de Gestión: tendencias y gráficos ──
   Solo tokens. Series con UN tono por gráfico (azul = tiempo, ámbar = consumo, verde = reportes al día);
   lo que dice «mejor» o «peor» lo dice el texto de la tendencia, no el color solo. */
.mx-dash-grid-6{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.mx-dash-status.warn{background:var(--amber-bg);color:var(--amber)}
.mx-dash-tend{margin-top:2px;font-size:12.5px;font-weight:600;color:var(--text-2)}
.mx-dash-tend-bien{color:var(--green)}
.mx-dash-tend-mal{color:var(--red-txt,var(--red))}

.mx-dash-grid-graficos{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr));gap:16px;margin-bottom:16px}
.mx-dash-grid-graficos>.mx-dash-card{margin-bottom:0;padding-bottom:16px}
.mx-dash-grid-graficos>.mx-dash-card>:not(.mx-dash-card-head){margin-left:18px;margin-right:18px}
.mx-dash-grid-graficos>.mx-dash-card>.mx-dash-card-head{margin-bottom:14px}
.mx-dash-nota{margin:10px 0 0;font-size:12.5px;color:var(--text-2)}

.mx-dash-linea{display:grid;grid-template-columns:32px minmax(0,1fr);gap:8px}
.mx-dash-eje-y{display:flex;flex-direction:column;justify-content:space-between;height:170px;text-align:right;font-size:12px;color:var(--text-2)}
.mx-dash-lienzo{position:relative;height:170px;border-left:1px solid var(--border-2,var(--border));border-bottom:1px solid var(--border-2,var(--border));
  background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(33.33% - 1px),var(--border) calc(33.33% - 1px),var(--border) 33.33%)}
.mx-dash-lienzo svg{position:absolute;inset:0;width:100%;height:100%}
.mx-dash-lienzo polyline{fill:none;stroke:var(--blue-light-txt,var(--blue-light));stroke-width:3;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.mx-dash-pt{position:absolute;width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;background:var(--navy-2);border:2px solid var(--blue-light-txt,var(--blue-light))}
.mx-dash-pt-ult{width:14px;height:14px;margin:-7px 0 0 -7px;background:var(--blue-light)}
.mx-dash-solo-lector{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.mx-dash-pt:focus-visible{outline:2px solid var(--text);outline-offset:2px}
.mx-dash-eje-x{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));margin-top:6px;font-size:11px;color:var(--text-2);text-align:center}

.mx-dash-barras{display:flex;flex-direction:column;gap:10px}
.mx-dash-barra-fila{display:grid;grid-template-columns:minmax(80px,130px) minmax(0,1fr) 32px;gap:10px;align-items:center;font-size:13.5px;color:var(--text)}
.mx-dash-barra-nom{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mx-dash-barra-pista{height:14px;border-radius:7px;background:var(--navy-4);overflow:hidden}
.mx-dash-barra-llena{height:100%;border-radius:7px;background:var(--blue-light)}
.mx-dash-barra-ambar{background:var(--amber)}
.mx-dash-barra-verde{background:var(--green)}
.mx-dash-barra-fila b{text-align:right}

.mx-dash-rep-n{display:flex;align-items:baseline;gap:8px;margin-bottom:10px}
.mx-dash-rep-n b{font-size:32px;line-height:1.1;color:var(--text)}
.mx-dash-rep-n span{font-size:15px;color:var(--text-2)}
.mx-dash-faltan{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}

@media(max-width:520px){
  .mx-dash-barra-fila{grid-template-columns:minmax(70px,100px) minmax(0,1fr) 28px}
  .mx-dash-eje-x{font-size:10px}
}
