/* Overview (js/pages/dashboard.js) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.b { font-weight: 600; }
button.linkish { background: none; border: 0; padding: 0; color: var(--accent-text); font-size: inherit; font-weight: 500; cursor: pointer; }
button.linkish:hover { background: none; text-decoration: underline; }
.dot.pulse { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.dot.warn.pulse { box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 25%, transparent); }

.ov-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.ov-head .sub { color: var(--text-secondary); margin-top: 4px; }
.ov-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.ov-grid > * { min-width: 0; }
.ov-r1 { grid-template-columns: 1.7fr 1fr; }
.ov-r3 { grid-template-columns: 1.5fr 1fr; }
.ov-r3:empty { display: none; }
.ov-r4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ov-card { padding: 0; overflow: hidden; }
.ov-card + .ov-card { margin-top: 0; }
.ov-card[hidden] { display: none; }
.ov-instances { margin-bottom: 14px; }
.ov-ch { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; row-gap: 8px; }
.ov-ch h2 { margin: 0; font-size: 13.5px; font-weight: 600; }
.ov-meta { color: var(--text-muted); font-size: 12.5px; }
.ov-more { margin-left: auto; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.ov-cb { padding: 14px 16px; }
.lbl { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.ov-empty { display: flex; align-items: center; gap: 12px; padding: 16px; color: var(--text-secondary); }
.ov-empty.pad { padding: 16px; display: block; }
.ov-empty .tt { font-weight: 550; color: var(--text-primary); }
.ov-empty .dd { color: var(--text-muted); font-size: 12.5px; }

/* needs attention */
.ov-att { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); }
.ov-att:last-of-type { border-bottom: 0; }
.ov-sev { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.ov-sev .ico { width: 15px; height: 15px; }
.ov-sev.bad { background: var(--bad-bg); color: var(--critical-text); }
.ov-sev.warn { background: var(--warn-bg); color: var(--warning-text); }
.ov-sev.info { background: var(--accent-wash); color: var(--accent); }
.ov-sev.ok { background: var(--ok-bg); color: var(--good-text); }
.ov-att-text { flex: 1; min-width: 0; color: inherit; }
.ov-att-text:hover { text-decoration: none; }
.ov-att-text:hover .tt { text-decoration: underline; }
.ov-att .tt { font-weight: 550; }
.ov-att .dd { color: var(--text-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-go { flex: none; }
.ov-x { flex: none; width: 26px; height: 26px; padding: 0; justify-content: center; border: 0; background: none; color: var(--text-muted); font-size: 11px; border-radius: 6px; }
.ov-x:hover { color: var(--text-primary); }
.ov-undismiss { margin: 6px 16px 10px; padding: 0; border: 0; background: none; color: var(--text-muted); font-size: 12px; }
.ov-undismiss:hover { background: none; color: var(--text-primary); text-decoration: underline; }

/* at a glance */
.ov-kpis { display: grid; grid-template-columns: 1fr 1fr; }
.ov-kpi { padding: 13px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: inherit; display: block; min-width: 0; }
a.ov-kpi:hover { background: var(--hover); text-decoration: none; }
.ov-kpi:nth-child(2n) { border-right: 0; }
.ov-kpi:nth-last-child(-n+2):nth-child(odd), .ov-kpi:last-child { border-bottom: 0; }
.ov-kpi .v { font-size: 23px; font-weight: 650; letter-spacing: -.02em; margin: 2px 0 1px; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.ov-kpi .v small { font-size: 12.5px; color: var(--text-muted); font-weight: 500; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
.ov-kpi .d { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-kpi .spark { display: block; width: 100%; max-width: 160px; height: 16px; }

/* instances */
.ov-mchips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 6px; }
.ov-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-secondary); white-space: nowrap; cursor: pointer; }
.ov-chip:hover { background: var(--hover); color: var(--text-primary); text-decoration: none; }
.ov-chip b { color: var(--text-primary); font-weight: 600; }
.ov-chip.on { background: var(--accent-wash); border-color: var(--accent); color: var(--text-primary); }
.ov-seg { margin-left: auto; }
.ov-seg button { padding: 2px 10px; font-size: 12.5px; }
.ov-seg + .ov-more { margin-left: 4px; }
.ov-table-wrap { overflow-x: auto; }
.ov-rows { width: 100%; border-collapse: collapse; }
.ov-rows th { text-align: left; font-size: 11.5px; font-weight: 500; color: var(--text-muted); padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ov-rows td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.ov-rows tr:last-child td { border-bottom: 0; }
.ov-rows tbody tr:hover td { background: var(--hover); }
.ov-rows th:first-child, .ov-rows td:first-child { padding-left: 16px; }
.ov-rows tr.stopped td { color: var(--text-muted); }
.ov-rows td:first-child { width: 40%; max-width: 0; }
.ov-name { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ov-name-t { min-width: 0; }
.iname { font: 600 13px var(--mono); color: var(--text-primary); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.idesc { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font: 500 11.5px var(--font); background: var(--surface-2);
  border: 1px solid var(--border-strong); color: var(--text-secondary); white-space: nowrap; }
.ov-tag.ok { background: var(--ok-bg); border-color: transparent; color: var(--good-text); }
.ov-tag.warn { background: var(--warn-bg); border-color: transparent; color: var(--warning-text); }
.ov-tag.bad { background: var(--bad-bg); border-color: transparent; color: var(--critical-text); }
.ov-tag.info { background: var(--accent-wash); border-color: transparent; color: var(--accent-text); }
.ov-lease { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ov-lease .bar { width: 56px; height: 4px; border-radius: 2px; background: var(--border-strong); overflow: hidden; display: inline-block; }
.ov-lease .bar i { display: block; height: 100%; background: var(--text-muted); }
.ov-lease.soon { color: var(--warning-text); font-weight: 600; }
.ov-lease.soon .bar i { background: var(--warning); }
.ov-traffic { display: flex; align-items: center; gap: 8px; }
.ov-traffic .spark { width: 90px; height: 20px; }
.ov-traffic .muted { font-size: 12px; }
.ov-acts { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.ov-ib, .tmenu-btn.ov-ib { width: 28px; height: 28px; padding: 0; display: inline-grid; place-items: center; border-radius: 7px; color: var(--text-secondary);
  border: 1px solid transparent; background: none; }
.ov-ib:hover, .tmenu-btn.ov-ib:hover { background: var(--surface-3); border-color: var(--border-strong); color: var(--text-primary); text-decoration: none; }
.ov-ib .ico { width: 15px; height: 15px; }
.tmenu-btn.ov-dots > span[aria-hidden] { display: none; }
.ov-more-row td { text-align: center; font-size: 12.5px; color: var(--text-muted); }
.ov-icards { display: none; }

/* test health */
.ov-health { padding: 14px 16px; display: grid; gap: 14px; }
.ov-stats { display: flex; gap: 12px 28px; flex-wrap: wrap; }
.ov-stats .v { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.ov-stats .v > span { font-size: 12.5px; font-weight: 500; }
.ov-strip { display: flex; gap: 3px; align-items: stretch; height: 64px; }
.ov-strip a { flex: 1; min-width: 0; border-radius: 2px; display: flex; flex-direction: column-reverse; overflow: hidden; background: var(--surface-2); }
.ov-strip a:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.ov-strip a.live { background: repeating-linear-gradient(135deg, var(--accent-wash) 0 3px, transparent 3px 6px); }
.ov-strip b { display: block; flex: none; }
.ov-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.ov-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ov-legend .sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.ov-runrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); color: inherit; }
.ov-runrow:hover { background: var(--hover); text-decoration: none; }
.ov-runrow-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; min-width: 0; }
.ov-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ov-runrow .secondary { font-size: 12.5px; }

/* open issues */
.ov-heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12.5px; margin: -3px; width: calc(100% + 6px); }
.ov-heat th { font-weight: 500; color: var(--text-muted); font-size: 11.5px; text-align: center; padding: 2px; }
.ov-heat th:first-child { text-align: left; }
.ov-heat td { text-align: center; border-radius: 5px; height: 28px; font-weight: 600; background: var(--surface-2); }
.ov-heat td.zero { color: var(--text-muted); font-weight: 400; }
.ov-heat td a { color: var(--text-primary); display: block; line-height: 28px; }
.ov-heat td:first-child { text-align: left; font: 500 12.5px var(--mono); background: none; padding-right: 8px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-heat td:first-child a { color: var(--text-secondary); display: inline; }
.ov-heat td.tot { background: none; color: var(--text-secondary); }
.ov-heat tr.all td { background: none; border-top: 1px solid var(--border); }
.ov-heat tr.all td:first-child { color: var(--text-primary); }
.ov-heat tr.all td.bad-text a { color: var(--critical-text); }
.ov-causes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.ov-causes .lbl { margin-right: 2px; }
.ov-foot { color: var(--text-muted); font-size: 12px; margin-top: 10px; }

/* compute */
.ov-env { display: grid; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--border); color: inherit; }
.ov-env:last-child { border-bottom: 0; }
.ov-env:hover { background: var(--hover); text-decoration: none; }
.ov-env.off { opacity: .7; }
.ov-env-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ov-env-top .muted { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-env-r { margin-left: auto; font-size: 12.5px; white-space: nowrap; }
.ov-nodes { display: flex; gap: 4px; margin-left: auto; }
.ov-nodes i { width: 16px; height: 16px; border-radius: 4px; background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); }
.ov-nodes i.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warning) 50%, transparent); }
.ov-env-meter { display: flex; align-items: center; gap: 10px; }
.ov-env-meter .secondary { font-size: 12.5px; white-space: nowrap; }
.ov-meter { flex: 1; height: 6px; border-radius: 3px; background: var(--border-strong); overflow: hidden; }
.ov-meter i { display: block; height: 100%; background: var(--accent); }
.ov-devs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* requests */
.ov-sub-h { font-size: 11px; color: var(--text-muted); font-weight: 600; margin: 12px 0 2px; letter-spacing: .04em; text-transform: uppercase; }
.ov-sub-h:first-child { margin-top: 0; }
.ov-req { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: inherit; }
.ov-req:hover { text-decoration: none; }
.ov-req:hover .ti { text-decoration: underline; }
.ov-req .k { font: 600 12px var(--mono); color: var(--text-secondary); }
.ov-req .ti { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-none { font-size: 12.5px; padding: 4px 0; }

/* activity */
.ov-feed { padding: 6px 16px 10px; }
.ov-ev { display: grid; grid-template-columns: 44px 8px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 0; font-size: 12.5px; line-height: 1.4; }
.ov-ev .tm { color: var(--text-muted); font: 11.5px var(--mono); padding-top: 1px; }
.ov-ev .dot { margin-top: 5px; }
.ov-ev .ev-t { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ov-ev .ev-t a.b { color: var(--text-primary); }

/* trends */
.ov-trends { margin-top: 0; }
.ov-trends .ov-grid { margin: 4px 0 0; }

@media (max-width: 1280px) {
  .ov-r4 { grid-template-columns: 1fr 1fr; }
  .ov-r4 > :last-child { grid-column: 1 / -1; }
  .ov-rows .col-clients { display: none; }
}
@media (max-width: 1100px) {
  .ov-r1, .ov-r3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .ov-table-wrap { display: none; }
  .ov-icards { display: block; }
  .ov-icard { display: grid; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); width: 100%; text-align: left; }
  .ov-icard:last-child { border-bottom: 0; }
  .ov-icard.stopped { opacity: .75; }
  .ov-icard-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .ov-icard-chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .ov-icard .idesc { white-space: normal; }
  .ov-icard-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; flex-wrap: wrap; }
  .ov-icard-acts { display: flex; gap: 8px; align-items: center; }
  .ov-icard-acts > :last-child { margin-left: auto; }
  .ov-icard-acts .ico { width: 14px; height: 14px; }
  .ov-icards.clip > .ov-icard:nth-child(n+6):not(.ov-more-row) { display: none; }
  .ov-icards.clip > .ov-more-row:not(.ov-cards-more) { display: none; }
  .ov-icard .idesc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ov-icard.ov-more-row { justify-content: center; color: var(--accent-text); background: none; border: 0; border-radius: 0; }
}
@media (max-width: 700px) {
  .ov-r4 { grid-template-columns: 1fr; }
  .ov-head h1 { font-size: 20px; }
  .ov-meta { display: none; }
  .ov-mchips { display: none; }
  .ov-att .ov-go { display: none; }
  .ov-att { padding: 10px 8px 10px 14px; }
  .ov-kpi .v { font-size: 20px; }
  .ov-stats { gap: 10px 18px; }
  .ov-stats .v { font-size: 16px; }
  .ov-stats .v > span { display: none; }
  .ov-x { width: 40px; height: 40px; }
  .ov-heat { font-size: 12px; border-spacing: 2px; }
  .ov-heat td:first-child { max-width: 92px; font-size: 11.5px; }
  .ov-heat th { font-size: 10.5px; }
  .ov-cb { padding: 12px; }
}
