/* Demo dashboards: shared KPI tiles, workload bars, rings and sparklines. */
.ml-dash { margin-block: 22px; padding: 18px; border: 1px solid #ffffff1f; border-radius: 14px; background: linear-gradient(160deg, #101b26, #0c1520 70%); }
.ml-dash__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid #ffffff14; }
.ml-dash__head p { margin: 0; }
.ml-dash__head span { color: #8aa6b8; font: 700 .58rem/1.5 var(--ml-font); letter-spacing: .04em; }
.ml-dash__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.ml-dash__kpi { display: flex; min-width: 0; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid #ffffff22; border-radius: 10px; background: #ffffff05; color: #e6f3fa; text-align: left; font: inherit; cursor: pointer; }
.ml-dash__kpi:hover, .ml-dash__kpi:focus-visible { border-color: #38bdf877; background: #14354a; }
.ml-dash__kpi > span:first-child { color: #9db6c7; font: 700 .6rem/1.4 var(--ml-font); letter-spacing: .04em; text-transform: uppercase; }
.ml-dash__kpi strong { color: #f2fbff; font: 700 1.7rem/1 var(--ml-font); letter-spacing: -.04em; }
.ml-dash__kpi small { color: #90aabb; font-size: .62rem; line-height: 1.45; }
.ml-dash__bar { display: block; overflow: hidden; height: 4px; border-radius: 3px; background: #ffffff14; }
.ml-dash__bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #38bdf8, #4ade80); transition: width .3s ease; }
.ml-dash__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ml-dash__links button, .ml-dash__links a { min-height: 34px; padding: 7px 11px; border: 1px solid #38bdf855; border-radius: 8px; background: #14334a; color: #bfeaff; font: 700 .64rem/1.4 var(--ml-font); cursor: pointer; }
.ml-dash__links button:hover { border-color: #7dd9f5; background: #1a4763; }

.ml-dash__split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; margin-top: 16px; }
.ml-dash__chart { display: grid; gap: 8px; min-width: 0; }
.ml-dash__row { display: grid; gap: 6px; min-width: 0; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: #ffffff05; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.ml-dash__row:hover, .ml-dash__row:focus-visible { border-color: #38bdf866; background: #102c3d; }
.ml-dash__row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ml-dash__row-head strong { color: #e3f2fa; font-size: .78rem; }
.ml-dash__row-head span { color: #8fa9ba; font: 700 .6rem var(--ml-font); }
.ml-dash__track { display: flex; overflow: hidden; height: 9px; border-radius: 5px; background: #ffffff10; }
.ml-dash__seg { display: block; height: 100%; }
.ml-dash__seg--ready { background: #38bdf8; }
.ml-dash__seg--active { background: #6ee7b7; }
.ml-dash__seg--review { background: #facc15; }
.ml-dash__seg--done { background: #475569; }
.ml-dash__seg--empty { width: 100%; background: #ffffff08; }
.ml-dash__legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 0; color: #9db4c4; font: 700 .58rem var(--ml-font); }
.ml-dash__legend span { display: inline-flex; align-items: center; gap: 6px; }
.ml-dash__legend i { width: 10px; height: 10px; border-radius: 3px; }
.ml-dash__gauge { display: grid; justify-items: center; gap: 4px; min-width: 108px; text-align: center; }
.ml-dash__ring { width: 86px; height: 86px; transform: rotate(-90deg); }
.ml-dash__ring-track, .ml-dash__ring-value { fill: none; stroke-width: 4; }
.ml-dash__ring-track { stroke: #ffffff1f; }
.ml-dash__ring-value { stroke: #4ade80; stroke-linecap: round; transition: stroke-dasharray .35s ease; }
.ml-dash__ring-value--shift { stroke: #38bdf8; }
.ml-dash__gauge strong { color: #f2fbff; font: 700 .9rem var(--ml-font); }
.ml-dash__gauge small { color: #8fa9ba; font-size: .6rem; line-height: 1.4; }
.ml-dash__spark { display: grid; gap: 6px; min-width: 0; }
.ml-dash__spark svg { display: block; width: 100%; height: 64px; }
.ml-dash__spark-line { fill: none; stroke: #7dd9f5; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.ml-dash__spark-fill { fill: #38bdf81f; stroke: none; }
.ml-dash--shift { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.ml-dash--shift .ml-dash__gauge { grid-column: 1; }
.ml-dash--shift .ml-dash__spark { grid-column: 2; }

.ml-dash__load { display: inline-block; overflow: hidden; width: 54px; height: 5px; margin-right: 6px; border-radius: 3px; background: #ffffff1a; vertical-align: middle; }
.ml-dash__load i { display: block; height: 100%; border-radius: 3px; background: #38bdf8; }
.ml-work-roster dd button { display: inline-flex; align-items: center; min-height: 30px; margin-left: 6px; padding: 5px 9px; border: 1px solid #38bdf855; border-radius: 6px; background: #14334a; color: #bfeaff; font: 700 .58rem var(--ml-font); cursor: pointer; touch-action: manipulation; }
.ml-work-roster dd button:hover { border-color: #7dd9f5; }

@container (max-width: 760px) {
  .ml-dash__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The gauge only drops below the bars when there is genuinely no room for both. */
@container (max-width: 520px) {
  .ml-dash__split { grid-template-columns: 1fr; }
  .ml-dash__gauge { justify-self: start; }
}
@container (max-width: 420px) {
  .ml-dash { padding: 14px; }
  .ml-dash__head { gap: 6px; padding-bottom: 11px; }
  .ml-dash__kpis { grid-template-columns: 1fr; gap: 8px; }
  .ml-dash__kpi { padding: 11px 12px; gap: 5px; }
  .ml-dash__kpi strong { font-size: 1.5rem; }
  .ml-dash__kpi small { font-size: .6rem; }
  .ml-dash__links { gap: 7px; }
  .ml-dash__links button, .ml-dash__links a { min-height: 40px; padding: 9px 12px; }
  .ml-dash__row { padding: 8px 9px; }
  .ml-dash__row-head strong { font-size: .74rem; }
  .ml-dash__legend { gap: 9px; font-size: .54rem; }
  .ml-dash__ring { width: 74px; height: 74px; }
  .ml-dash--shift { grid-template-columns: 1fr; }
  .ml-dash--shift .ml-dash__spark { grid-column: 1; }
  .ml-work-roster dd button { min-height: 34px; margin-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ml-dash__bar i, .ml-dash__ring-value { transition: none; }
}
