/* monitor section: Overview, Attention, Users, Explore, Queues. */
:root { --s1: #2f5bea; --s2: #e0892f; --s3: #1f8a53; --s4: #8b5cf6; --s5: #0e9bb0; --s6: #cfcdc6; }
:root[data-theme="dark"] { --s1: #6d8ff5; --s2: #e8a050; --s3: #3fb27a; --s4: #a78bfa; --s5: #38bdd0; --s6: #4a4d55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #6d8ff5; --s2: #e8a050; --s3: #3fb27a; --s4: #a78bfa; --s5: #38bdd0; --s6: #4a4d55; } }

.mc { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; background: var(--panel); overflow: hidden; }
.mc-row { display: flex; flex: 1 1 0; min-height: 0; }
.mc-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

/* tabs inside a page body or a panel keep the list's inset */
.mc-tabs { padding: 0 10px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.mc-tabs .tabs { border-bottom: 0; }

/* KPI band: one row of numbers over the page */
.mc-kb { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.mc-k { display: flex; flex-direction: column; gap: 3px; padding: 9px 16px 10px; border-left: 1px solid var(--line-2); min-width: 0; }
.mc-k:first-child { border-left: 0; }
.mc-k .l { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mc-k .v { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; min-width: 0; }
.mc-k .v .big { font-size: 20px; line-height: 1.1; }
.mc-k .v .d { font-size: 12px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.mc-k .f { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-up { color: var(--ok-fg); }
.mc-dn { color: var(--bad-fg); }

/* section head and the columns of the Overview */
.mc-sh { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border-bottom: 1px solid var(--line-2); flex-shrink: 0; }
.mc-sh h3 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.mc-sh .n { color: var(--muted); font-size: 11.5px; }
.mc-sh .lk { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; }
.mc-sh .mc-leg { margin-left: auto; }
.mc-cols { display: grid; flex: 1 1 0; min-height: 0; border-top: 1px solid var(--line); }
.mc-col { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); overflow: hidden; }
.mc-col:first-child { border-left: 0; }
.mc-r { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 10px; height: 34px; padding: 0 16px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--text); flex-shrink: 0; transition: background-color 80ms; }
a.mc-r:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.mc-r > * { min-width: 0; }
.mc-r .r { text-align: right; font-variant-numeric: tabular-nums; }
.mc-empty { padding: 14px 16px; color: var(--muted); font-size: 12.5px; }

/* attention rows */
.mc-a { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 46px; padding: 4px 16px; border-bottom: 1px solid var(--line-2); flex-shrink: 0; color: var(--text); transition: background-color 80ms; }
a.mc-a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.mc-a .t { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-a .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mc-a .imp { font-size: 12.5px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; }
.mc-a .imp .sub { font-size: 11.5px; }
.mc-a.cur { background: var(--cur-bg); box-shadow: inset 2px 0 0 var(--accent); }
.mc-ico { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.mc-ico .i { width: 11px; height: 11px; stroke-width: 2.2; }
.mc-ico.site { background: var(--warn-bg); color: var(--warn-fg); }
.mc-ico.platform { background: var(--bad-bg); color: var(--bad-fg); }
.mc-ico.request, .mc-ico.spend { background: var(--info-bg); color: var(--info-fg); }
.mc-ico.other { background: var(--neu-bg); color: var(--neu-fg); }
.mc-grp { display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 16px; font-size: 12px; color: var(--text-2); background: var(--panel-2); border-bottom: 1px solid var(--line-2); flex-shrink: 0; }
.mc-grp .n { color: var(--muted); }
.mc-list { width: 430px; flex-shrink: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }

/* toolbar row: the query of Explore, the segments of a list */
.mc-tb { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; flex-wrap: wrap; }
.mc-q { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.mc-sel { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 9px; border: 1px solid var(--btn-line); border-radius: 2px; background: var(--btn-bg); font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; cursor: pointer; }
.mc-sel .i { width: 13px; height: 13px; color: var(--muted); }
.mc-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 4px 0 8px; border-radius: 3px; background: var(--pill-on-bg); border: 1px solid var(--pill-on-line); color: var(--pill-on-fg); font-size: 12.5px; white-space: nowrap; max-width: 360px; }
.mc-chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.mc-chip .op { color: var(--muted); }
.mc-chip.ex { background: var(--bad-fade); border-color: var(--bad-line); color: var(--bad-fg); }
.mc-chip a { display: inline-flex; color: inherit; opacity: .7; }
.mc-chip a:hover { opacity: 1; color: inherit; }
.mc-chip .i { width: 12px; height: 12px; }

/* footer of a list */
.mc-foot { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); flex-shrink: 0; margin-top: auto; }

/* charts */
.mc-chart { padding: 0 12px 4px; flex-shrink: 0; }
.mc-svg { display: block; overflow: visible; }
.mc-svg text { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.mc-svg text.r { fill: var(--c3); }
.mc-svg .g { stroke: var(--line-2); }
.mc-svg rect.ok { fill: var(--c1); }
.mc-svg rect.bad { fill: var(--c-bad); }
.mc-svg polyline { fill: none; stroke-width: 2; stroke-linejoin: round; }
.mc-svg polyline.spend { stroke: var(--c3); stroke-width: 1.75; }
.mc-svg rect.s1 { fill: var(--s1); } .mc-svg rect.s2 { fill: var(--s2); } .mc-svg rect.s3 { fill: var(--s3); }
.mc-svg rect.s4 { fill: var(--s4); } .mc-svg rect.s5 { fill: var(--s5); } .mc-svg rect.s6 { fill: var(--s6); }
.mc-svg polyline.s1 { stroke: var(--s1); } .mc-svg polyline.s2 { stroke: var(--s2); } .mc-svg polyline.s3 { stroke: var(--s3); }
.mc-svg polyline.s4 { stroke: var(--s4); } .mc-svg polyline.s5 { stroke: var(--s5); }
.mc-svg circle.s1 { fill: var(--s1); } .mc-svg circle.s2 { fill: var(--s2); } .mc-svg circle.s3 { fill: var(--s3); }
.mc-svg circle.s4 { fill: var(--s4); } .mc-svg circle.s5 { fill: var(--s5); }
.mc-spark { display: block; }
.mc-spark rect.on { fill: var(--c1); }
.mc-spark rect.off { fill: var(--track); }
.mc-leg { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.mc-leg span { display: inline-flex; align-items: center; gap: 5px; }
.mc-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 1px; }
.mc-leg i.ln { height: 2px; width: 12px; }
i.ok, .mc-sw.ok { background: var(--c1); } i.bad { background: var(--c-bad); } i.spend { background: var(--c3); }
i.s1, .mc-sw.s1 { background: var(--s1); } i.s2, .mc-sw.s2 { background: var(--s2); } i.s3, .mc-sw.s3 { background: var(--s3); }
i.s4, .mc-sw.s4 { background: var(--s4); } i.s5, .mc-sw.s5 { background: var(--s5); } i.s6, .mc-sw.s6 { background: var(--s6); }
.mc-sw { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; display: inline-block; }

/* faults: who failed a job */
.mc-tag { justify-self: start; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px; font-size: 11px; font-weight: 500; white-space: nowrap; line-height: 1; flex-shrink: 0; }
.mc-tag.site { background: var(--warn-bg); color: var(--warn-fg); }
.mc-tag.plat { background: var(--bad-bg); color: var(--bad-fg); }
.mc-tag.req { background: var(--info-bg); color: var(--info-fg); }
.mc-tag.oth { background: var(--neu-bg); color: var(--neu-fg); }
.mc-tag.ok { background: var(--ok-bg); color: var(--ok-fg); }
.mc-faults { display: flex; height: 6px; border-radius: 1px; overflow: hidden; background: var(--track); min-width: 0; }
.mc-faults i { display: block; height: 6px; }
.mc-faults .site { background: var(--warn-dot); }
.mc-faults .plat { background: var(--bad-dot); }
.mc-faults .req { background: var(--accent); }
.mc-faults .oth { background: var(--c-muted); }
.mc-err { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mc-err .mono { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

/* meters */
.mc-mt { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 8px; }
.mc-mt > span { text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.mc-bar { height: 6px; border-radius: 1px; background: var(--track); overflow: hidden; display: flex; }
.mc-bar i { display: block; height: 6px; background: var(--c1); }
.mc-vs { position: relative; height: 6px; border-radius: 1px; background: var(--track); }
.mc-vs i { position: absolute; left: 0; top: 0; height: 6px; border-radius: 1px; }
.mc-vs b { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--text); border-radius: 1px; }
.mc-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mc-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-name .sub { font-size: 12px; }
.mc-av { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 600; background: var(--info-bg); color: var(--info-fg); }

/* side panels and their sections */
.mc-pnl { width: 430px; flex-shrink: 0; border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.mc-pnl.ins { width: 330px; background: var(--panel-2); }
.mc-ps { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 7px; }
.mc-ps h4 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mc-dist { display: grid; grid-template-columns: minmax(0, 1fr) 110px 40px; gap: 8px; align-items: center; font-size: 12.5px; min-height: 22px; }
.mc-dist > span:first-child { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mc-dist .r { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.mc-kv { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 5px 12px; font-size: 12.5px; }
.mc-kv > span:nth-child(odd) { color: var(--muted); }
.mc-st3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: var(--radius); }
.mc-st3 > div { padding: 8px 12px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-st3 > div:first-child { border-left: 0; }
.mc-st3 > div.on { box-shadow: inset 0 2px 0 var(--warn-dot); }
.mc-st3 > div.on.plat { box-shadow: inset 0 2px 0 var(--bad-dot); }
.mc-st3 .big { font-size: 18px; }
.mc-cap { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mc-why { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line-2); font-size: 13px; line-height: 1.4; }
.mc-why .i { margin-top: 2px; color: var(--muted); }
.mc-ins { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-bg); }
.mc-ins .t { font-size: 13px; font-weight: 500; line-height: 1.35; }
.mc-ins .s { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* lists on the kit: rows keep a hover action strip */
.mc .tr.cur { background: var(--cur-bg); box-shadow: inset 2px 0 0 var(--accent); }
.mc .tr .mc-rf { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: none; gap: 4px; padding-left: 16px; background: linear-gradient(90deg, transparent, var(--hover) 16px); }
.mc .tr:hover .mc-rf { display: flex; }
.mc-rf .btn { height: 22px; font-size: 12px; padding: 0 7px; }
.mc-tw { display: inline-flex; width: 14px; justify-content: center; color: var(--muted); }
.mc-tw .i { width: 13px; height: 13px; }
.mc .tr.sub-row { height: 32px; background: var(--panel-2); }

/* pivot: success as a heat table */
.mc-pv { border-collapse: collapse; width: 100%; }
.mc-pv th { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 0 10px; height: 34px; white-space: nowrap; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.mc-pv td { height: 33px; text-align: right; padding: 0 10px; font-variant-numeric: tabular-nums; font-size: 12.5px; border-bottom: 1px solid var(--panel); border-right: 1px solid var(--panel); }
.mc-pv th:first-child, .mc-pv td:first-child { text-align: left; }
.mc-pv td .s { color: var(--muted); font-size: 11px; margin-left: 6px; }
.mc-pv .h-ok { background: var(--ok-bg); color: var(--ok-fg); }
.mc-pv .h-warn { background: var(--warn-bg); color: var(--warn-fg); }
.mc-pv .h-bad { background: var(--bad-bg); color: var(--bad-fg); }

/* facets of the Jobs view */
.mc-fac { width: 216px; flex-shrink: 0; border-right: 1px solid var(--line); background: var(--panel-2); overflow-y: auto; padding-bottom: 8px; }
.mc-fh { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }
.mc-fr { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; height: 24px; padding: 0 12px; font-size: 12.5px; color: var(--text); }
.mc-fr:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.mc-fr .cb { width: 14px; height: 14px; pointer-events: none; }
.mc-fr.on { background: var(--facet-fill); }
.mc-fr .n { color: var(--muted); font-variant-numeric: tabular-nums; }

@container content (width < 900px) {
	.mc-kb { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.mc-k:nth-child(4) { border-left: 0; }
	.mc-k:nth-child(n+4) { border-top: 1px solid var(--line-2); }
	.mc-cols { grid-template-columns: minmax(0, 1fr) !important; overflow-y: auto; }
	.mc-col { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
	.mc-pnl, .mc-pnl.ins, .mc-fac { display: none; }
	.mc-list { width: 100%; border-right: 0; }
}
.mc-tbl { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
.mc .list-body > .tr { border-bottom: 1px solid var(--line-2); }
