/* ============================================================================
   MVTaskSchedule — shared scheduling indicators.

   Deliberately one small vocabulary, used identically on the task list, the
   kanban, the calendar, the dashboards and the task sheet: red means the
   critical path or a broken promise, amber means a promise about to break,
   grey means slack. A surface that invents its own colour here is a bug.
   ============================================================================ */

.mv-ts-chip {
	display: inline-block;
	padding: 1px 6px;
	margin-right: 4px;
	border-radius: 10px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	vertical-align: middle;
}

.mv-ts-critical { background: #fee2e2; color: #b91c1c; }
.mv-ts-danger   { background: #fde7ea; color: #dc2626; }
.mv-ts-warning  { background: #fef3c7; color: #b45309; }
.mv-ts-good     { background: #e3f8ec; color: #19a35a; }
.mv-ts-muted    { background: #eef1f5; color: #64748b; }
.mv-ts-pinned   { background: #ede9fe; color: #6d28d9; }

/* Text-only variants, for table cells where a chip would be noisy. */
.mv-ts-critical-text { color: #ef4444; font-weight: 600; }
.mv-ts-danger-text   { color: #dc2626; font-weight: 600; }
.mv-ts-none          { color: #cbd5e1; }

/* Row and card tinting. Kept to a left border plus a very light wash so a
   table with many flagged rows stays readable. */
.mv-ts-row-critical > td:first-child,
.mv-ts-row-danger   > td:first-child,
.mv-ts-row-warning  > td:first-child { position: relative; }

.mv-ts-row-critical > td:first-child::before,
.mv-ts-row-danger   > td:first-child::before,
.mv-ts-row-warning  > td:first-child::before {
	content: '';
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 3px;
}

.mv-ts-row-critical > td:first-child::before { background: #ef4444; }
.mv-ts-row-danger   > td:first-child::before { background: #dc2626; }
.mv-ts-row-warning  > td:first-child::before { background: #f59e0b; }

.mv-ts-row-danger  { background-color: #fffafa !important; }
.mv-ts-row-warning { background-color: #fffdf5 !important; }

/* A decision left this branch behind: still on screen for the record, but
   visibly not work anybody has to do. */
.mv-ts-row-skipped { background-color: #f8fafc !important; opacity: .55; }
.mv-ts-row-skipped .task-id, .mv-ts-row-skipped td { text-decoration: line-through; }
.mv-ts-row-skipped .mv-ts-chip { text-decoration: none; }

/* Waiting on an option nobody has chosen yet. */
.mv-ts-row-alternative { background-color: #fbfbfd !important; opacity: .8; }
.mv-ts-row-alternative > td:first-child { position: relative; }
.mv-ts-row-alternative > td:first-child::before {
	content: '';
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 3px;
	background: repeating-linear-gradient(180deg, #cbd5e1 0 4px, transparent 4px 8px);
}

/* Legend */
.mv-ts-legend {
	display: inline-flex;
	gap: 14px;
	align-items: center;
	font-size: 11px;
	color: #64748b;
}
.mv-ts-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mv-ts-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.mv-ts-dot-critical { background: #ef4444; }
.mv-ts-dot-warning  { background: #f59e0b; }
.mv-ts-dot-danger   { background: #dc2626; }

/* Compact KPI strip, shared by the process dashboard and any other roll-up. */
.mv-ts-kpis { display: flex; flex-wrap: wrap; gap: 10px; }
.mv-ts-kpi {
	flex: 1 1 120px;
	border: 1px solid #e2e8f0;
	border-left: 4px solid #cbd5e1;
	border-radius: 8px;
	padding: 8px 12px;
	background: #fff;
}
.mv-ts-kpi.k-critical { border-left-color: #ef4444; }
.mv-ts-kpi.k-danger   { border-left-color: #dc2626; }
.mv-ts-kpi.k-warning  { border-left-color: #f59e0b; }
.mv-ts-kpi.k-ok       { border-left-color: #19a35a; }
.mv-ts-kpi-label { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: #8a97a8; }
.mv-ts-kpi-value { font-size: 18px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.mv-ts-kpi-sub   { font-size: 11px; color: #94a3b8; }
