/* Edge Bot dashboard. Follows the computer's light or dark setting. Calm layered surfaces, Edge purple as the one
   accent, and a colour for each measurement; status is always a word and a shape as well as a colour. */

:root {
    color-scheme: light dark;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

    /* Type scale: tight leading and negative tracking as text grows, open tracking for the smallest sizes. */
    --t-large: 1.75rem;   --t-title: 1.375rem;  --t-title3: 1.125rem; --t-headline: 0.9375rem;
    --t-body: 0.875rem;   --t-callout: 0.8125rem; --t-footnote: 0.75rem; --t-caption: 0.6875rem;

    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
    --r-xs: 8px; --r-sm: 10px; --r-md: 16px; --r-lg: 22px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Light. Edge purple fills keep white text at 5.7:1; the darker tone is for purple text. */
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-soft: rgb(124 58 237 / 0.1);
    --accent-text: #6d28d9;
    --on-accent: #ffffff;
    --chart: #7c3aed;

    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --surface-3: #ffffff;
    --card: var(--surface);
    --label: #1d1d1f;
    --label-2: #5f5f66;
    --label-3: #74747b;
    --separator: rgb(0 0 0 / 0.1);
    --fill: rgb(120 120 128 / 0.14);
    --fill-2: rgb(120 120 128 / 0.07);
    --fill-3: rgb(120 120 128 / 0.24);

    --good: #15803d;  --good-soft: rgb(22 163 74 / 0.12);
    --warn: #c2410c;  --warn-soft: rgb(234 88 12 / 0.12);
    --bad: #dc2626;   --bad-soft: rgb(220 38 38 / 0.1);
    --idle: #6b7280;  --idle-soft: rgb(107 114 128 / 0.12);
    --info: #0369a1;  --info-soft: rgb(2 132 199 / 0.11);
    --demo-text: #92400e;

    /* Solid status fills that carry white text (small squares, destructive buttons). */
    --good-fill: #15803d; --warn-fill: #c2410c; --bad-fill: #dc2626;

    /* One colour per measurement, used by its meters, gauges, charts and icons. */
    --cpu: #7c3aed;   --cpu-soft: rgb(124 58 237 / 0.11);
    --mem: #0284c7;   --mem-soft: rgb(2 132 199 / 0.11);
    --disk: #b45309;  --disk-soft: rgb(217 119 6 / 0.12);
    --temp: #e11d48;  --temp-soft: rgb(225 29 72 / 0.1);
    --batt: #16a34a;  --batt-soft: rgb(22 163 74 / 0.12);

    --material: rgb(255 255 255 / 0.78);
    --material-strong: rgb(255 255 255 / 0.92);
    --blur: blur(20px) saturate(180%);
    --scrim: rgb(0 0 0 / 0.3);
    --shadow-color: rgb(15 23 42 / 0.22);

    --shadow-1: 0 0 0 1px rgb(0 0 0 / 0.05), 0 1px 3px rgb(0 0 0 / 0.05);
    --shadow-2: 0 0 0 1px rgb(0 0 0 / 0.06), 0 16px 40px -12px rgb(0 0 0 / 0.2), 0 2px 8px rgb(0 0 0 / 0.06);
    --ring: 0 0 0 3px rgb(124 58 237 / 0.35);

    --sidebar: 248px;
}

/* Dark: deep navy layers. Purples are onedge.co's: Amethyst #7C3AED fills, Mauve #C6AAFC text, #A78BFA lines. */
@media (prefers-color-scheme: dark) {
    :root {
        --accent: #7c3aed;
        --accent-hover: #6d28d9;
        --accent-soft: rgb(124 58 237 / 0.18);
        --accent-text: #c6aafc;
        --chart: #a78bfa;

        --bg: #0b1020;
        --surface: #121a2e;
        --surface-2: #18223a;
        --surface-3: #1f2b48;
        --label: #e8ebf4;
        --label-2: #9aa6bf;
        --label-3: #7d89a3;
        --separator: rgb(148 163 184 / 0.12);
        --fill: rgb(148 163 184 / 0.14);
        --fill-2: rgb(148 163 184 / 0.07);
        --fill-3: rgb(148 163 184 / 0.22);

        --good: #34d399;  --good-soft: rgb(52 211 153 / 0.14);
        --warn: #fb923c;  --warn-soft: rgb(251 146 60 / 0.15);
        --bad: #fb7185;   --bad-soft: rgb(251 113 133 / 0.15);
        --idle: #94a3b8;  --idle-soft: rgb(148 163 184 / 0.14);
        --info: #38bdf8;  --info-soft: rgb(56 189 248 / 0.14);
        --demo-text: #fde68a;

        --good-fill: #047857; --warn-fill: #c2410c; --bad-fill: #e11d48;

        --cpu: #a78bfa;   --cpu-soft: rgb(167 139 250 / 0.16);
        --mem: #38bdf8;   --mem-soft: rgb(56 189 248 / 0.15);
        --disk: #f59e0b;  --disk-soft: rgb(245 158 11 / 0.15);
        --temp: #fb7185;  --temp-soft: rgb(251 113 133 / 0.15);
        --batt: #34d399;  --batt-soft: rgb(52 211 153 / 0.15);

        --material: rgb(14 21 40 / 0.8);
        --material-strong: rgb(22 31 54 / 0.94);
        --scrim: rgb(2 6 23 / 0.65);
        --shadow-color: rgb(2 6 23 / 0.7);

        --shadow-1: 0 0 0 1px rgb(148 163 184 / 0.09), inset 0 1px 0 rgb(255 255 255 / 0.04), 0 10px 30px -12px rgb(2 6 23 / 0.6);
        --shadow-2: 0 0 0 1px rgb(148 163 184 / 0.14), 0 24px 60px -12px rgb(2 6 23 / 0.75), 0 4px 12px rgb(2 6 23 / 0.4);
        --ring: 0 0 0 3px rgb(124 58 237 / 0.5);
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 400 var(--t-body)/1.45 var(--font);
    color: var(--label);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-optical-sizing: auto;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
.icon { flex: none; }
.muted { color: var(--label-2); }
.mono { font-family: var(--mono); font-size: 0.95em; }
.pad { padding: var(--s4); }
.spacer { flex: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── Shell ──────────────────────────────────────────────────────────────────────────────────────────── */

.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }

.sidebar {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: var(--s5);
    padding: var(--s5) var(--s3);
    background: var(--material);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border-right: 0.5px solid var(--separator);
    z-index: 5;
}
.brand { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); color: var(--label); }
.brand:hover { text-decoration: none; }
.brand .logo { height: 17px; width: auto; color: var(--label); }
.brand .product { font: 600 var(--t-headline)/1 var(--font-display); color: var(--accent-text); letter-spacing: -0.01em; }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a, .sidebar-foot button {
    display: flex; align-items: center; gap: var(--s3);
    min-height: 34px; padding: 0 var(--s3);
    border: 0; border-radius: var(--r-sm);
    background: transparent; color: var(--label);
    font: 500 var(--t-body)/1 var(--font); cursor: pointer;
    transition: background-color 120ms ease, transform 100ms ease-out;
}
.sidebar nav a:hover, .sidebar-foot button:hover { background: var(--fill-2); text-decoration: none; }
.sidebar nav a:active, .sidebar-foot button:active { transform: scale(0.98); }
.sidebar nav a svg, .sidebar-foot svg { color: var(--label-2); }
.sidebar nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.sidebar nav a[aria-current="page"] svg { color: var(--accent-text); }
.count {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
    display: inline-grid; place-items: center;
    border-radius: 10px; background: var(--accent); color: var(--on-accent);
    font: 600 var(--t-caption)/1 var(--font); font-variant-numeric: tabular-nums;
}
.sidebar-foot { margin-top: auto; }

.content { position: relative; min-width: 0; }
main#page { padding: var(--s6) 5% var(--s10); outline: none; }
main#page.entering { animation: page-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Page bar ───────────────────────────────────────────────────────────────────────────────────────── */

.pagebar { display: flex; align-items: flex-end; gap: var(--s4); padding-right: 52px; margin-bottom: var(--s6); }
.pagebar-title { flex: 1; min-width: 0; }
.pagebar h1, .computer-title h1 {
    font: 700 var(--t-large)/1.15 var(--font-display); letter-spacing: -0.022em;
}
.pagebar .sub, .computer-title .sub { margin-top: var(--s1); color: var(--label-2); font-size: var(--t-callout); }
.sub-text + .freshness:not(:empty)::before { content: " · "; }
.freshness { color: var(--label-3); }
.freshness.failed { color: var(--warn); }
.pagebar-actions { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }

/* ── Buttons: filled, tinted, plain, destructive. Feedback on press, not on release. ───────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 14px;
    border: 0; border-radius: var(--r-sm);
    font: 590 var(--t-body)/1 var(--font); letter-spacing: -0.005em;
    cursor: pointer; white-space: nowrap; user-select: none;
    transition: background-color 120ms ease, color 120ms ease, transform 100ms ease-out, opacity 120ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.small { height: 28px; padding: 0 10px; font-size: var(--t-callout); border-radius: 8px; }
.btn.icon-only { width: 34px; padding: 0; }
.btn.small.icon-only { width: 28px; }
.btn.filled { background: var(--accent); color: var(--on-accent); }
.btn.filled:hover:not(:disabled) { background: var(--accent-hover); }
.btn.tinted { background: var(--accent-soft); color: var(--accent-text); }
.btn.tinted:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.btn.plain { background: transparent; color: var(--accent-text); }
.btn.plain:hover:not(:disabled) { background: var(--fill-2); }
.btn.destructive { background: var(--bad-soft); color: var(--bad); }
.btn.destructive:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.btn.destructive.filled { background: var(--bad-fill); color: #fff; }
.btn.destructive.filled:hover:not(:disabled) { filter: brightness(1.06); }
.btn[aria-busy="true"] { position: relative; color: transparent !important; }
.btn[aria-busy="true"]::after {
    content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid currentColor; border-color: var(--accent-text) transparent var(--accent-text) transparent;
    animation: spin 0.7s linear infinite;
}
.btn.filled[aria-busy="true"]::after, .btn.destructive.filled[aria-busy="true"]::after { border-color: #fff transparent #fff transparent; }

/* ── Segmented control ──────────────────────────────────────────────────────────────────────────────── */

.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px; background: var(--fill); }
.seg button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 34px; height: 28px; padding: 0 12px;
    border: 0; border-radius: 7px; background: transparent; color: var(--label);
    font: 500 var(--t-callout)/1 var(--font); cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 100ms ease-out;
}
.seg button:active { transform: scale(0.97); }
.seg button[aria-checked="true"] { background: var(--surface-3); box-shadow: 0 1px 3px var(--shadow-color); font-weight: 600; color: var(--label); }
.seg button .tally { margin-left: 2px; padding: 0 6px; min-width: 18px; height: 17px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--fill); color: var(--label-2); font-size: var(--t-caption); font-weight: 600; font-variant-numeric: tabular-nums; }
.seg button[aria-checked="true"] .tally { background: var(--accent-soft); color: var(--accent-text); }
.seg.tabs { display: flex; width: fit-content; margin: var(--s5) 0 var(--s5); }
.seg.tabs button { height: 32px; padding: 0 18px; font-size: var(--t-body); }

/* ── Fields ─────────────────────────────────────────────────────────────────────────────────────────── */

input[type="text"], input[type="search"], input[type="password"], textarea, select {
    width: 100%; min-height: 36px; padding: 8px 12px;
    border: 1px solid transparent; border-radius: var(--r-sm);
    background: var(--fill-2); color: var(--label);
    font: 400 var(--t-body)/1.4 var(--font);
    transition: background-color 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
input::placeholder, textarea::placeholder { color: var(--label-3); }
input:hover, textarea:hover, select:hover { background: var(--fill); }
input:focus, textarea:focus, select:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: var(--ring); }
textarea { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field label { font: 600 var(--t-callout)/1.3 var(--font); color: var(--label); }
.field-note { min-height: 1em; color: var(--label-2); font-size: var(--t-footnote); }
.field.invalid input, .field.invalid textarea { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.field.invalid .field-note { color: var(--bad); }

.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; }
.select .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--label-2); pointer-events: none; }

input[type="file"].file { font: 400 var(--t-callout)/1.3 var(--font); color: var(--label-2); padding: 6px 0; }
input[type="file"].file::file-selector-button {
    margin-right: 10px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px;
    background: var(--fill); color: var(--label); font: 590 var(--t-callout)/1 var(--font); cursor: pointer;
}
progress { width: 100%; height: 4px; appearance: none; border: 0; border-radius: 2px; background: var(--fill); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--fill); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }

.form-row { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s4); }
.form-row > .btn { margin-top: 23px; }
.divider { height: 0.5px; margin: 0 var(--s4); background: var(--separator); }

/* ── Cards, sections, rows ──────────────────────────────────────────────────────────────────────────── */

.card { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.card.flush { overflow: hidden; }
.section { margin-bottom: var(--s6); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin: 0 var(--s1) var(--s2); }
.section-head h2 { font: 600 var(--t-title3)/1.25 var(--font-display); letter-spacing: -0.012em; }
.section-head .sub { color: var(--label-2); font-size: var(--t-callout); margin-top: 2px; }
.section.danger .card { box-shadow: 0 0 0 1px var(--bad-soft), var(--shadow-1); }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.columns > .section { margin-bottom: var(--s6); }

.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 10px var(--s4); position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 52px; height: 0.5px; background: var(--separator); }
.rows > .row:first-child + .row::before { left: var(--s4); }
.row-icon {
    width: 28px; height: 28px; flex: none; display: grid; place-items: center;
    border-radius: 8px; background: var(--fill-2); color: var(--label-2);
}
.row-icon.bad { background: var(--bad-soft); color: var(--bad); }
.row-icon.warn { background: var(--warn-soft); color: var(--warn); }
.row-icon.idle { background: var(--idle-soft); color: var(--idle); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 500; overflow-wrap: anywhere; }
.row-sub { color: var(--label-2); font-size: var(--t-callout); }
.row-end { display: flex; align-items: center; gap: var(--s3); flex: none; }
.row-time { color: var(--label-3); font-size: var(--t-footnote); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row.closed .row-title { color: var(--label-2); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px var(--s5); margin: 0; padding: var(--s4); }
.facts dt { color: var(--label-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts.list { gap: 0; padding: 0; }
.facts.list dt, .facts.list dd { padding: 11px var(--s4); border-top: 0.5px solid var(--separator); }
.facts.list dt:first-of-type, .facts.list dd:first-of-type { border-top: 0; }
.facts.list dd { text-align: right; padding-left: 0; }

.banner {
    display: flex; align-items: flex-start; gap: var(--s2);
    margin-bottom: var(--s5); padding: var(--s3) var(--s4);
    border-radius: var(--r-sm); background: var(--fill-2); color: var(--label);
    font-size: var(--t-callout);
}
.banner .icon { margin-top: 1px; color: var(--label-2); }
.banner.good { background: var(--good-soft); } .banner.good .icon { color: var(--good); }
.banner.warn { background: var(--warn-soft); } .banner.warn .icon { color: var(--warn); }
.note { font-size: var(--t-callout); padding: 0 var(--s4) var(--s3); }
.note.warn { color: var(--warn); }
.footnote { color: var(--label-3); font-size: var(--t-footnote); padding: var(--s3) var(--s4) var(--s4); border-top: 0.5px solid var(--separator); }

/* ── Status: always a word and a shape, never colour alone ──────────────────────────────────────────── */

.badge {
    display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
    border-radius: 11px; font: 590 var(--t-footnote)/1 var(--font); white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.bad .dot { border-radius: 2px; transform: rotate(45deg); width: 6px; height: 6px; }
.badge.idle { background: var(--idle-soft); color: var(--idle); }
.badge.idle .dot { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

.chip {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
    border-radius: 11px; background: var(--fill-2); color: var(--label-2);
    font: 500 var(--t-footnote)/1 var(--font); white-space: nowrap;
}
.chip.presence.active { color: var(--good); background: var(--good-soft); }
.chip.presence.locked { color: var(--label-2); }
.chip.presence.stale { opacity: 0.6; }
.pill {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 6px;
    border-radius: 10px; background: var(--accent-soft); color: var(--accent-text);
    font: 590 var(--t-caption)/1 var(--font);
}
.pill:hover { text-decoration: none; }

.meter { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.meter > span { display: block; width: 100%; height: 100%; border-radius: 2px; background: var(--accent); transform-origin: left center; transition: transform 400ms var(--ease); }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }
.meter.none > span { background: transparent; }

.machine {
    width: 36px; height: 36px; flex: none; display: grid; place-items: center;
    border-radius: 10px; background: var(--accent-soft); color: var(--accent-text);
}
.machine.offline { background: var(--fill-2); color: var(--label-3); }

/* ── Computers ──────────────────────────────────────────────────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-bottom: var(--s6); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--label-2); font: 500 var(--t-callout)/1.2 var(--font); }
.stat-value { font: 600 1.625rem/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--label-2); font-size: var(--t-footnote); }
.stat.compact .stat-value { font-size: 1.375rem; }
.stat.compact .meter { margin: 4px 0 2px; }
.stat.good .stat-value { color: var(--good); }
.stat.warn .stat-value { color: var(--warn); }
.stat.bad .stat-value { color: var(--bad); }

.controls { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.searchbox { position: relative; flex: 0 1 320px; display: flex; align-items: center; }
.searchbox .icon { position: absolute; left: 11px; color: var(--label-3); pointer-events: none; }
.searchbox input { padding-left: 34px; }

.list-table { width: 100%; border-collapse: collapse; }
.list-table th {
    text-align: left; padding: 10px var(--s4); color: var(--label-2);
    font: 500 var(--t-footnote)/1.2 var(--font); border-bottom: 0.5px solid var(--separator);
}
.list-table td { padding: 10px var(--s4); border-bottom: 0.5px solid var(--separator); vertical-align: middle; }
.list-table tbody tr { cursor: pointer; transition: background-color 120ms ease; }
.list-table tbody tr:last-child td { border-bottom: 0; }
.list-table tbody tr:hover { background: var(--fill-2); }
.list-table tbody tr:active { background: var(--fill); }
.list-table tr.offline .who-name { color: var(--label-2); }
.list-table tr.none td { text-align: center; color: var(--label-2); padding: var(--s8); cursor: default; }
.list-table td.end { text-align: right; white-space: nowrap; }
.list-table td.end .btn { opacity: 0; transition: opacity 120ms ease; }
.list-table tr:hover td.end .btn, .list-table td.end .btn:focus-visible { opacity: 1; }
.row-chevron { display: inline-flex; vertical-align: middle; margin-left: 4px; color: var(--label-3); }
.who { display: flex; align-items: center; gap: var(--s3); min-width: 220px; }
.who-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.who-name { font-weight: 600; color: var(--label); }
.who-model { color: var(--label-2); font-size: var(--t-callout); }
.problem-line { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: var(--t-footnote); font-weight: 500; }
.problem-line.bad { color: var(--bad); } .problem-line.warn { color: var(--warn); } .problem-line.good { color: var(--good); }
.usage { display: flex; flex-direction: column; gap: 5px; min-width: 76px; }
.usage-num { font-size: var(--t-callout); font-variant-numeric: tabular-nums; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--s3); }
.tile {
    display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); color: var(--label);
    transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 160ms ease;
}
.tile:hover { text-decoration: none; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.tile:active { transform: scale(0.99); }
.tile.offline { opacity: 0.78; }
.tile-head { display: flex; align-items: center; gap: var(--s3); }
.tile-head .who-text { flex: 1; }
.tile-facts { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--t-callout); }
.tile-usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); padding: var(--s3) 0; border-top: 0.5px solid var(--separator); border-bottom: 0.5px solid var(--separator); }
.cap { display: block; color: var(--label-2); font-size: var(--t-footnote); margin-bottom: 3px; }

/* ── One computer ───────────────────────────────────────────────────────────────────────────────────── */

.back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 var(--s3) -4px; font-weight: 500; color: var(--accent-text); }
.computer-bar { display: flex; align-items: flex-start; gap: var(--s4); padding-right: 52px; }
.computer-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s2); }
.computer-head-live { display: flex; flex-direction: column; gap: var(--s3); }
.computer-head > .sub { color: var(--label-3); font-size: var(--t-footnote); }
.computer-title { display: flex; align-items: center; gap: var(--s3); }
.computer-title .machine { width: 48px; height: 48px; border-radius: 13px; }
.chips { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--t-callout); }
.btn[aria-haspopup] .icon:last-child { margin-left: -2px; opacity: 0.8; }

.all-clear { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); }
.all-clear > div { display: flex; flex-direction: column; gap: 2px; }
.all-clear-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--good-soft); color: var(--good); }
.stats.four { margin-bottom: var(--s6); }

.activity-state { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s4) var(--s2); }
.activity-state > div { display: flex; flex-direction: column; gap: 2px; }
.activity-state strong { font: 600 var(--t-title3)/1.2 var(--font-display); letter-spacing: -0.01em; }
.activity-state .muted { font-size: var(--t-callout); }
.activity-ring { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--fill-2); color: var(--label-2); }
.activity-state.active .activity-ring { background: var(--good-soft); color: var(--good); }
.activity .facts { padding-top: var(--s2); font-size: var(--t-callout); }

.app-glyph {
    width: 28px; height: 28px; flex: none; display: grid; place-items: center;
    border-radius: 8px; background: var(--fill); color: var(--label-2); font: 600 var(--t-callout)/1 var(--font);
}
.app-mem { width: 110px; display: flex; flex-direction: column; gap: 5px; text-align: right; font-size: var(--t-callout); font-variant-numeric: tabular-nums; }

.feed { list-style: none; margin: 0; padding: var(--s2) 0; }
.feed-item { display: grid; grid-template-columns: 28px 1fr auto; gap: var(--s3); align-items: start; padding: 10px var(--s4); }
.feed-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--fill-2); color: var(--label-2); }
.feed-item.bad .feed-icon { background: var(--bad-soft); color: var(--bad); }
.feed-item.warn .feed-icon { background: var(--warn-soft); color: var(--warn); }
.feed-item.good .feed-icon { background: var(--good-soft); color: var(--good); }
.feed-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feed-label { font-weight: 600; }
.feed-item.bad .feed-label { color: var(--bad); }
.feed-item.warn .feed-label { color: var(--warn); }
.feed-text { color: var(--label-2); overflow-wrap: anywhere; }
.feed-time { color: var(--label-3); font-size: var(--t-footnote); white-space: nowrap; padding-top: 2px; }

.danger-body { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); }
.danger-body > div { flex: 1; }
.danger-body p { margin-top: 2px; font-size: var(--t-callout); }

/* ── Charts ─────────────────────────────────────────────────────────────────────────────────────────── */

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; }
.chart { margin: 0; padding: var(--s4); }
.chart-grid .chart:nth-child(odd) { border-right: 0.5px solid var(--separator); }
.chart-grid .chart:nth-child(n+3) { border-top: 0.5px solid var(--separator); }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s2); }
.chart-title { font-weight: 600; }
.chart-now { font: 600 var(--t-title3)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.chart-plot { display: block; width: 100%; height: auto; border-radius: var(--r-xs); }
.chart-plot .gridline { stroke: var(--separator); stroke-width: 1; }
.chart-plot .axis { fill: var(--label-3); font: 400 11px var(--font); }
.chart-plot .series { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-plot .lone { fill: var(--accent); }
.chart-plot .crosshair { stroke: var(--label-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-plot .marker { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart-empty { display: grid; place-items: center; height: 140px; color: var(--label-3); background: var(--fill-2); border-radius: var(--r-sm); }

/* ── Empty states, skeletons ────────────────────────────────────────────────────────────────────────── */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); padding: var(--s10) var(--s6); }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--fill-2); color: var(--label-3); margin-bottom: var(--s2); }
.empty h3 { font: 600 var(--t-title3)/1.25 var(--font-display); }
.empty p { max-width: 420px; color: var(--label-2); }
.empty-actions { margin-top: var(--s3); }
.section .card .empty { padding: var(--s8) var(--s6); }

.skeleton { display: flex; flex-direction: column; gap: var(--s3); }
.bone { border-radius: var(--r-md); background: linear-gradient(90deg, var(--fill-2) 0%, var(--fill) 50%, var(--fill-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ── Popovers, menus, confirmation sheets ───────────────────────────────────────────────────────────── */

.popover {
    position: fixed; z-index: 40; padding: var(--s2);
    border-radius: var(--r-md); background: var(--material-strong);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-2);
}
.menu { display: flex; flex-direction: column; }
.menu button {
    display: flex; align-items: center; gap: var(--s3); height: 34px; padding: 0 var(--s3);
    border: 0; border-radius: 8px; background: transparent; color: var(--label);
    font: 500 var(--t-body)/1 var(--font); text-align: left; cursor: pointer;
}
.menu button .icon { color: var(--label-2); }
.menu button:hover, .menu button:focus-visible { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.menu button:hover .icon, .menu button:focus-visible .icon { color: var(--on-accent); }
.menu button.destructive { color: var(--bad); }
.alert-form { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s2); }
.alert-form h3 { font: 600 var(--t-headline)/1.3 var(--font-display); }
.alert-form .muted { font-size: var(--t-callout); }
.alert-form .seg { width: 100%; }
.alert-form .seg button { flex: 1; }
.popover-actions, .sheet-actions { display: flex; justify-content: flex-end; gap: var(--s2); }

dialog.sheet {
    width: min(440px, calc(100vw - 32px)); padding: var(--s6); border: 0;
    border-radius: var(--r-lg); background: var(--surface); color: var(--label); box-shadow: var(--shadow-2);
}
dialog.sheet::backdrop { background: var(--scrim); }
dialog.sheet h2 { font: 600 var(--t-title3)/1.3 var(--font-display); letter-spacing: -0.01em; margin-bottom: var(--s2); }
dialog.sheet p { color: var(--label-2); margin-bottom: var(--s4); }
dialog.sheet .field { margin-bottom: var(--s2); }
dialog.sheet .sheet-actions { margin-top: var(--s2); }

/* ── Remote control: a large focused sheet holding MeshCentral's desktop view ───────────────────────── */

dialog.remote {
    width: min(1400px, calc(100vw - 32px)); height: calc(100vh - 32px); max-height: none; padding: 0; border: 0;
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: var(--r-lg); background: var(--surface); color: var(--label); box-shadow: var(--shadow-2);
}
dialog.remote:not([open]) { display: none; }
dialog.remote::backdrop { background: var(--scrim); }
.remote-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 0.5px solid var(--separator); }
.remote-title { flex: 1; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.remote-title .muted { font-size: var(--t-callout); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.remote iframe { flex: 1; width: 100%; border: 0; background: #000; }

/* ── Chat: a side sheet beside the page, not over it ────────────────────────────────────────────────── */

.chat-sheet {
    position: fixed; top: var(--s3); right: var(--s3); bottom: var(--s3); z-index: 30;
    width: min(420px, calc(100vw - 24px));
    display: flex; flex-direction: column;
    border-radius: var(--r-lg); background: var(--material-strong);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-2); overflow: hidden;
}
.sheet-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-bottom: 0.5px solid var(--separator); }
.sheet-title { flex: 1; min-width: 0; }
.sheet-title h2 { font: 600 var(--t-headline)/1.3 var(--font-display); }
.connection { display: flex; align-items: center; gap: 6px; color: var(--label-2); font-size: var(--t-footnote); }
.connection .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--label-3); }
.connection.live .dot { background: var(--good); }
.connection.waiting .dot { background: var(--warn); }
.thread { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.thread li { display: flex; flex-direction: column; max-width: 82%; }
.thread li.mine { align-self: flex-end; align-items: flex-end; }
.thread li.theirs { align-self: flex-start; }
.bubble { padding: 8px 12px; border-radius: 18px; overflow-wrap: anywhere; white-space: pre-wrap; }
.mine .bubble { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.theirs .bubble { background: var(--surface); color: var(--label); box-shadow: var(--shadow-1); border-bottom-left-radius: 6px; }
.bubble-meta { margin-top: 3px; padding: 0 4px; color: var(--label-3); font-size: var(--t-caption); }
.thread li.system { align-self: center; max-width: 100%; color: var(--label-2); font-size: var(--t-footnote); text-align: center; }
.thread li.intro { flex-direction: row; gap: var(--s2); align-items: flex-start; margin: auto 0; padding: var(--s4); border-radius: var(--r-md); background: var(--fill-2); text-align: left; }
.sheet-foot { padding: var(--s3) var(--s4) var(--s4); border-top: 0.5px solid var(--separator); display: flex; flex-direction: column; gap: var(--s2); }
.sheet-foot-row { display: flex; align-items: center; gap: var(--s2); }
.sheet-foot-row .hint { flex: 1; color: var(--label-3); font-size: var(--t-caption); text-align: center; }

/* ── Toasts and tooltips ────────────────────────────────────────────────────────────────────────────── */

.toasts { position: fixed; left: 50%; bottom: var(--s6); transform: translateX(-50%); z-index: 60; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: var(--s3);
    max-width: min(560px, calc(100vw - 32px)); padding: 10px var(--s4);
    border-radius: var(--r-md); background: var(--material-strong);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-2); pointer-events: auto;
}
.toast .icon { color: var(--good); }
.toast.status .icon { color: var(--accent-text); }
.toast.warning .icon { color: var(--warn); }
.toast.error .icon { color: var(--bad); }
.toast-text { flex: 1; font-weight: 500; }
.toast-action { border: 0; background: transparent; color: var(--accent-text); font: 600 var(--t-body)/1 var(--font); cursor: pointer; padding: 6px 4px; }

.tooltip {
    position: fixed; z-index: 70; padding: 6px 10px; pointer-events: none;
    border-radius: 8px; background: var(--label); color: var(--surface);
    font: 500 var(--t-footnote)/1.3 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ── Sign-in ────────────────────────────────────────────────────────────────────────────────────────── */

body.signin { display: grid; place-items: center; min-height: 100vh; padding: var(--s4); }
.signin-card { width: min(380px, 100%); padding: var(--s8) var(--s6) var(--s6); display: flex; flex-direction: column; gap: var(--s4); }
.signin-card .logo { height: 22px; width: auto; color: var(--label); align-self: center; }
.signin-card h1 { text-align: center; font: 600 var(--t-title)/1.2 var(--font-display); letter-spacing: -0.015em; }
.signin-card .lede { text-align: center; color: var(--label-2); margin-top: calc(var(--s2) * -1); }
.password { position: relative; }
.password input { padding-right: 42px; }
.password .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.signin-card .error { color: var(--bad); font-size: var(--t-callout); min-height: 1.2em; }
.signin-card .btn { width: 100%; height: 40px; }

/* ══ Navy redesign: shell, top bar and the richer pieces ══════════════════════════════════════════════ */

/* Sidebar: brand mark, grouped nav with tinted icon tiles, a highlight bar on the current page. */
.sidebar {
    background: var(--material);
    border-right: 1px solid var(--separator);
    gap: var(--s4);
    padding: var(--s5) var(--s3) var(--s4);
}
.brand { gap: var(--s3); padding: var(--s1) var(--s2) var(--s3); }
.brand-mark {
    width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px;
    background: var(--accent);
}
.brand-mark svg { width: 22px; height: 22px; color: var(--on-accent); }
.brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand .logo { height: 15px; color: var(--label); }
.brand .product { font: 600 var(--t-caption)/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label-3); }
.nav-label { margin: var(--s2) var(--s3) 0; font: 600 var(--t-caption)/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label-3); }
.sidebar nav { gap: 4px; }
.sidebar nav a, .sidebar-foot button { position: relative; min-height: 42px; padding: 0 var(--s2); color: var(--label-2); font-weight: 500; }
.sidebar nav a:hover, .sidebar-foot button:hover { background: var(--fill-2); color: var(--label); }
.nav-icon {
    width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px;
    background: var(--fill-2); color: var(--label-2); transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.sidebar nav a[data-nav="computers"] .nav-icon { color: var(--cpu); }
.sidebar nav a[data-nav="tickets"] .nav-icon { color: var(--disk); }
.sidebar nav a[data-nav="audit"] .nav-icon { color: var(--mem); }
.sidebar nav a[aria-current="page"] { background: var(--accent-soft); color: var(--label); font-weight: 600; }
.sidebar nav a[aria-current="page"] .nav-icon { background: var(--accent); color: var(--on-accent); }
.sidebar nav a svg, .sidebar-foot svg { color: inherit; }

.sidebar-card {
    margin-top: auto; padding: var(--s3); border-radius: var(--r-md);
    background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--separator);
    display: flex; flex-direction: column; gap: var(--s2);
}
.sidebar-card .row-line { display: flex; align-items: center; justify-content: space-between; font-size: var(--t-footnote); color: var(--label-2); }
.sidebar-card strong { color: var(--label); font-variant-numeric: tabular-nums; }
.sidebar-card .health-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--fill); }
.sidebar-card .health-bar span { display: block; height: 100%; }
.sidebar-foot { margin-top: 0; }

/* Top bar: search, the demo switch, refresh and who is signed in, on every page. */
.topbar {
    position: sticky; top: 0; z-index: 8;
    display: flex; align-items: center; gap: var(--s3);
    padding: var(--s3) 5%;
    background: var(--material);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--separator);
}
.topsearch { position: relative; flex: 0 1 460px; display: flex; align-items: center; }
.topsearch .icon { position: absolute; left: 13px; color: var(--label-3); pointer-events: none; }
.topsearch input { min-height: 40px; padding-left: 40px; padding-right: 44px; border-radius: 12px; background: var(--fill-2); border: 1px solid var(--separator); }
.topsearch kbd {
    position: absolute; right: 10px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--separator);
    color: var(--label-3); font: 500 var(--t-caption)/1.4 var(--font); pointer-events: none;
}
.icon-btn {
    width: 40px; height: 40px; flex: none; display: grid; place-items: center;
    border: 1px solid var(--separator); border-radius: 12px; background: var(--fill-2); color: var(--label-2); cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, transform 100ms ease-out;
}
.icon-btn:hover { background: var(--fill); color: var(--label); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.spinning svg { animation: spin 0.8s linear infinite; }
.me {
    width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
    background: var(--accent); color: var(--on-accent); font: 700 var(--t-callout)/1 var(--font);
}

.demo-switch {
    display: flex; align-items: center; gap: var(--s3); min-height: 40px; padding: 5px 7px 5px var(--s3);
    border: 1px solid var(--separator); border-radius: 12px; background: var(--fill-2);
    transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.demo-switch .icon { color: var(--label-3); }
.demo-switch.on { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.demo-switch.on .icon { color: var(--warn); }
.demo-text { display: flex; flex-direction: column; line-height: 1.15; }
.demo-text strong { font: 600 var(--t-callout)/1.15 var(--font); }
.demo-text span { font-size: var(--t-caption); color: var(--label-3); }
.demo-switch.on .demo-text span { color: var(--warn); }
.switch {
    position: relative; width: 44px; height: 26px; flex: none; padding: 0; border: 0; border-radius: 13px; cursor: pointer;
    background: var(--fill-3); transition: background-color 200ms ease;
}
.switch .knob {
    position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 4px var(--shadow-color); transition: transform 220ms var(--ease);
}
.switch[aria-checked="true"] { background: var(--warn-fill); }
.switch[aria-checked="true"] .knob { transform: translateX(18px); }
.switch:disabled { opacity: 0.6; cursor: progress; }

.demo-banner {
    display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 5% 0; padding: 10px var(--s4);
    border-radius: 12px; background: var(--warn-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); color: var(--demo-text); font-size: var(--t-callout);
}
.demo-banner .icon { color: var(--warn); }
.demo-banner span { flex: 1; }
.demo-banner .btn { height: 28px; }

main#page { padding-top: var(--s6); }
.pagebar, .computer-bar { padding-right: 0; }
.pagebar h1 { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.025em; color: var(--label); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--accent-text); font: 600 var(--t-caption)/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase; }

/* Buttons and fields on navy. */
.btn.tinted:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.btn.destructive:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 22%, transparent); }
input[type="text"], input[type="search"], input[type="password"], textarea, select { background: var(--fill-2); border-color: var(--separator); }
input:focus, textarea:focus, select:focus { background: var(--surface-2); }
select option { background: var(--surface-2); color: var(--label); }

/* Status badges glow softly; the shape still tells them apart. */
.badge { height: 24px; padding: 0 10px; border-radius: 12px; }
.badge.good { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 25%, transparent); }
.badge.warn { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.bad { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 30%, transparent); }
.badge.idle { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--idle) 25%, transparent); }
.chip { height: 24px; padding: 0 9px; border-radius: 12px; }
.chip.presence.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 22%, transparent); }
.chip.presence.idle { color: var(--info); background: var(--info-soft); }
.chip.demo { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 25%, transparent); }

/* Meters in the colour of what they measure; amber and red still win when the load is high. */
.meter { height: 6px; border-radius: 3px; background: var(--fill); }
.meter > span { border-radius: 3px; background: var(--accent); }

/* People: an initials avatar in a colour of its own, with a small laptop or desktop badge. */
.avatar {
    position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
    color: #fff; font: 700 var(--t-callout)/1 var(--font); letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 4px 12px -6px var(--shadow-color);
}
.avatar.large { width: 64px; height: 64px; border-radius: 18px; font-size: 1.25rem; }
.avatar.offline { filter: grayscale(0.85) brightness(0.7); }
.device-badge {
    position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; display: grid; place-items: center;
    border-radius: 7px; background: var(--surface-3); color: var(--label-2); box-shadow: 0 0 0 2px var(--surface);
}
.device-badge .dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--surface); }
.device-badge .dot.off { background: var(--label-3); box-shadow: 0 0 0 2px var(--surface); }

/* Stat cards: coloured icon tile, big number, a hint and a small graphic. */
.stats { gap: var(--s4); }
.stat { position: relative; overflow: hidden; gap: 6px; padding: var(--s5); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; }
.stat-icon.violet { background: var(--cpu-soft); color: var(--cpu); }
.stat-icon.green { background: var(--good-soft); color: var(--good); }
.stat-icon.rose { background: var(--bad-soft); color: var(--bad); }
.stat-icon.amber { background: var(--warn-soft); color: var(--warn); }
.stat-icon.sky { background: var(--info-soft); color: var(--info); }
.stat-label { color: var(--label-2); font-weight: 500; }
.stat-value { font: 700 2rem/1.05 var(--font-display); letter-spacing: -0.03em; color: var(--label); }
.stat-of { font: 500 var(--t-body)/1 var(--font); color: var(--label-3); letter-spacing: 0; margin-left: 4px; }
.stat-hint { display: flex; align-items: center; gap: 6px; }
.stat .split { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--fill); margin-top: 4px; }
.stat .split span { display: block; height: 100%; }
.trend-chip { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 10px; font: 600 var(--t-caption)/1 var(--font); }
.trend-chip.good { background: var(--good-soft); color: var(--good); }
.trend-chip.bad { background: var(--bad-soft); color: var(--bad); }
.trend-chip.idle { background: var(--fill); color: var(--label-2); }
.spark { display: block; width: 100%; height: 36px; margin-top: 4px; overflow: visible; }
.spark .spark-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .spark-end { stroke: var(--surface); stroke-width: 2; }
.spark.green .spark-line { stroke: var(--good); } .spark.green .spark-end { fill: var(--good); } .spark.green stop { stop-color: var(--good); }
.spark.violet .spark-line { stroke: var(--cpu); } .spark.violet .spark-end { fill: var(--cpu); } .spark.violet stop { stop-color: var(--cpu); }
.spark.sky .spark-line { stroke: var(--info); } .spark.sky .spark-end { fill: var(--info); } .spark.sky stop { stop-color: var(--info); }

/* Fleet overview: health donut, the fleet's load over the day, and what is going wrong most. */
.overview { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.6fr) minmax(280px, 1fr); gap: var(--s4); margin-bottom: var(--s6); }
.panel-card { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.panel-head h2 { font: 600 var(--t-headline)/1.25 var(--font-display); letter-spacing: -0.01em; }
.panel-head .sub { color: var(--label-3); font-size: var(--t-footnote); margin-top: 2px; }
.panel-head .big { font: 700 1.5rem/1 var(--font-display); letter-spacing: -0.02em; color: var(--label); font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: var(--s5); }
.donut { position: relative; width: 132px; height: 132px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .track { stroke: var(--fill); }
.donut circle { fill: none; stroke-width: 14; }
.donut-centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-centre strong { font: 700 1.625rem/1 var(--font-display); color: var(--label); letter-spacing: -0.02em; }
.donut-centre span { color: var(--label-3); font-size: var(--t-caption); margin-top: 4px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.legend li { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-callout); color: var(--label-2); }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend strong { margin-left: auto; color: var(--label); font-variant-numeric: tabular-nums; }
.legend button { all: unset; display: contents; cursor: pointer; }
.area-chart { display: block; width: 100%; height: 150px; overflow: visible; }
.area-chart .gridline { stroke: var(--separator); stroke-dasharray: 2 4; }
.area-chart .axis { fill: var(--label-3); font: 500 10px var(--font); }
.area-chart .line-cpu { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.area-chart .line-online { fill: none; stroke: var(--good); stroke-width: 2; stroke-dasharray: 4 4; stroke-linejoin: round; }
.area-chart stop { stop-color: var(--accent); }
.chart-key { display: flex; gap: var(--s4); font-size: var(--t-footnote); color: var(--label-2); }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; }
.chart-key i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.problem-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.problem-bars li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; }
.problem-bars .pi { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; }
.problem-bars .pt { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: var(--t-callout); }
.problem-bars .pt span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.problem-bars .pn { font: 700 var(--t-headline)/1 var(--font); font-variant-numeric: tabular-nums; }
.problem-bars .bar { height: 5px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.problem-bars .bar span { display: block; height: 100%; border-radius: 3px; }
.all-good { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); flex: 1; text-align: center; color: var(--label-2); font-size: var(--t-callout); }
.all-good .icon-blob { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--good-soft); color: var(--good); }

/* The computer list. */
.controls { margin-bottom: var(--s3); }
.list-table th { background: var(--fill-2); padding: 12px var(--s4); text-transform: uppercase; letter-spacing: 0.06em; font: 600 var(--t-caption)/1.2 var(--font); color: var(--label-3); border-bottom: 1px solid var(--separator); }
.list-table td { padding: 12px var(--s4); border-bottom: 1px solid var(--separator); }
.list-table tbody tr:hover { background: var(--fill-2); }
.who { min-width: 240px; }
.who-name { font-weight: 600; color: var(--label); letter-spacing: -0.005em; }
.who-name:hover { color: var(--label); text-decoration: none; }
.who-model { color: var(--label-3); font-size: var(--t-footnote); }
.usage { min-width: 92px; gap: 6px; }
.usage-num { font-weight: 600; font-size: var(--t-callout); }
.usage-num small { font-weight: 500; color: var(--label-3); margin-left: 2px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--separator); color: var(--label-3); font-size: var(--t-footnote); }
.pager-buttons { display: flex; align-items: center; gap: 4px; }
.pager-buttons .btn { min-width: 30px; }
.pager-buttons .btn[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }

.tiles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s4); }
.tile { padding: var(--s5); gap: var(--s4); }
.tile:hover { box-shadow: var(--shadow-2), 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); transform: translateY(-2px); }
.tile-usage { grid-template-columns: repeat(3, 1fr); border: 0; padding: 0; }
.mini-ring { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: var(--t-caption); color: var(--label-3); }

/* Ring gauges for one computer's readings. */
.gauge-card { display: flex; align-items: center; gap: var(--s4); padding: var(--s5); position: relative; overflow: hidden; }
.gauge { position: relative; width: 76px; height: 76px; flex: none; }
.gauge.small { width: 54px; height: 54px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.gauge.small circle { stroke-width: 7; }
.gauge .track { stroke: var(--fill); }
.gauge .value { transition: stroke-dashoffset 600ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.gauge-num { position: absolute; inset: 0; display: grid; place-items: center; font: 700 var(--t-headline)/1 var(--font); color: var(--label); font-variant-numeric: tabular-nums; }
.gauge.small .gauge-num { font-size: var(--t-footnote); }
.gauge-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gauge-text .stat-label { display: flex; align-items: center; gap: 6px; }
.gauge-text strong { font: 700 1.25rem/1.15 var(--font-display); color: var(--label); letter-spacing: -0.015em; }
.gauge-text span:last-child { color: var(--label-3); font-size: var(--t-footnote); }

/* One computer: a hero header with the machine drawn in. */
.hero {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: var(--s6);
    padding: var(--s6); margin-bottom: var(--s2); border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: var(--shadow-1);
}
.hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s3); }
.hero .computer-title h1 { font-size: 1.875rem; color: var(--label); }
.hero .computer-title .sub { color: var(--label-2); }
.hero-art { width: 220px; flex: none; align-self: stretch; display: grid; place-items: center; }
.hero-art img { width: 100%; height: auto; filter: drop-shadow(0 16px 24px var(--shadow-color)); }
.hero .pagebar-actions { margin-top: var(--s2); }
.hero-facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--label-2); font-size: var(--t-callout); }
.hero-facts span { display: inline-flex; align-items: center; gap: 6px; }
.hero-facts .icon { color: var(--label-3); }
.seg.tabs { margin: var(--s5) 0; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--separator); }

/* Apps with a coloured tile each, so a long list scans quickly. */
.app-icon {
    width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px;
    color: #fff; font: 700 var(--t-footnote)/1 var(--font); letter-spacing: -0.02em;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 3px 8px -4px var(--shadow-color);
}
.app-mem { width: 130px; }

/* History as a timeline: a line through the events, each with its own icon. */
.feed { position: relative; padding: var(--s3) 0; }
.feed::before { content: ""; position: absolute; left: 31px; top: 22px; bottom: 22px; width: 2px; background: linear-gradient(180deg, var(--fill-3), transparent); }
.feed-item { position: relative; grid-template-columns: 32px 1fr auto; }
.feed-icon { width: 32px; height: 32px; background: var(--surface-3); box-shadow: 0 0 0 4px var(--surface); }

/* Charts in the colour of their measurement, with a soft gradient under the line. */
.chart-grid { gap: 0; }
.chart { padding: var(--s5); }
.chart-title { display: inline-flex; align-items: center; gap: var(--s2); }
.chart-title .icon { padding: 5px; width: 26px; height: 26px; border-radius: 8px; }
.chart-now { font-size: 1.25rem; color: var(--label); }
.chart-plot .gridline { stroke: var(--separator); stroke-dasharray: 2 4; }
.chart-plot .series { stroke: var(--chart-color, var(--accent)); stroke-width: 2.2; }
.chart-plot .lone { fill: var(--chart-color, var(--accent)); }
.chart-plot .marker { stroke: var(--chart-color, var(--accent)); fill: var(--surface); }
.chart-plot stop { stop-color: var(--chart-color, var(--accent)); }
.chart-empty { background: var(--fill-2); }

/* Empty states: a glowing tile instead of a grey square. */
.empty-icon { width: 72px; height: 72px; border-radius: 22px; color: var(--accent-text); background: var(--accent-soft); }
.row-icon { width: 32px; height: 32px; border-radius: 9px; }
.row + .row::before { left: 60px; }
.tooltip { background: var(--surface-3); color: var(--label); box-shadow: var(--shadow-2); }
.bone { background: linear-gradient(90deg, var(--fill-2) 0%, var(--fill) 50%, var(--fill-2) 100%); background-size: 200% 100%; }
dialog.sheet { background: var(--surface-2); }
dialog.sheet::backdrop, dialog.remote::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }

.pager-card { margin-top: var(--s4); }
.pager-card .pager { border-top: 0; }

/* Sign-in: the brand mark over one card. */
.signin-card { box-shadow: var(--shadow-2); }
.signin-card .brand-mark { align-self: center; width: 56px; height: 56px; border-radius: 17px; }
.signin-card .brand-mark svg { width: 30px; height: 30px; }
.signin-card .logo { color: var(--label); }

@media (max-width: 1400px) {
    .overview { grid-template-columns: 1fr 1fr; }
    .overview > :nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 1080px) {
    .brand-text, .nav-label, .sidebar-card { display: none; }
    .hero-art { display: none; }
    .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .topbar { padding: var(--s2) var(--s4); flex-wrap: wrap; }
    .topsearch { flex: 1 1 100%; order: 2; }
    .topsearch kbd, .demo-text span { display: none; }
    .demo-banner { margin: var(--s3) var(--s4) 0; }
    .overview { grid-template-columns: 1fr; }
    .hero { flex-direction: column; align-items: stretch; padding: var(--s4); }

    .nav-icon { width: 26px; height: 26px; }
}

/* ══ Three colours for every reading: green safe, orange in the middle, red critical ═══════════════════ */

.tone-good { color: var(--good) !important; }
.tone-warn { color: var(--warn) !important; }
.tone-bad { color: var(--bad) !important; }
.meter.good > span { background: var(--good); }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }
.meter.share > span { background: var(--info); }
.gauge .value { stroke: var(--label-3); }
.gauge.good .value { stroke: var(--good); }
.gauge.warn .value { stroke: var(--warn); }
.gauge.bad .value { stroke: var(--bad); }
.gauge-card.edge-warn { box-shadow: var(--shadow-1), inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); }
.gauge-card.edge-bad { box-shadow: var(--shadow-1), inset 0 0 0 1px color-mix(in srgb, var(--bad) 40%, transparent); }

/* Charts: one line colour for every measurement; the value and the dashed limits carry the green, orange and red. */
.chart-plot .series { stroke: var(--chart); }
.chart-plot .lone { fill: var(--chart); }
.chart-plot .marker { stroke: var(--chart); }
.chart-plot stop { stop-color: var(--chart); }
.chart-title .icon { background: var(--accent-soft); color: var(--accent-text); }
.chart-plot .limit { stroke-width: 1.4; stroke-dasharray: 6 5; opacity: 0.9; }
.chart-plot .limit.warn { stroke: var(--warn); }
.chart-plot .limit.bad { stroke: var(--bad); stroke-dasharray: 2 4; stroke-width: 2; }
.chart-key i.dashed { background: none; border-top: 2px dashed var(--good); height: 0; }
.spark.amber .spark-line { stroke: var(--warn); } .spark.amber stop { stop-color: var(--warn); }

/* Stat cards: the same four rows in every card, so numbers, graphics and hints line up across the row. */
.stat { display: grid; grid-template-rows: auto auto 40px auto; align-content: start; gap: 8px; min-height: 0; }
.stat-graphic { display: flex; align-items: flex-end; height: 40px; }
.stat-graphic > * { width: 100%; }
.stat-graphic .split { margin: 0 0 6px; height: 8px; }
.stat-graphic .spark { height: 40px; margin: 0; }
.stat-hint { min-height: 18px; font-size: var(--t-footnote); }
.stat-value { font-size: 2.125rem; }
.stat-of { font-size: var(--t-callout); }
.keys { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--label-2); }
.key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.split span + span { box-shadow: -2px 0 0 var(--surface); }

/* Overview panels fill their height; the last line sits at the bottom of each. */
.overview { align-items: stretch; }
.donut-wrap { flex: 1; }
.panel-foot { margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--separator); color: var(--label-3); font-size: var(--t-footnote); }
.panel-link { margin-top: auto; align-self: flex-start; padding-left: 0; }
.big-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.big-cap { color: var(--label-3); font-size: var(--t-caption); white-space: nowrap; }
.problem-bars .pi.bad { background: var(--bad-soft); color: var(--bad); }
.problem-bars .pi.warn { background: var(--warn-soft); color: var(--warn); }
.legend li { min-width: 0; }
.legend li span:not(.swatch) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend button:hover span { color: var(--label); }

/* Names, models and problems stay on one line; the full text is in the tooltip. */
.who { min-width: 0; max-width: 340px; }
.who-text { min-width: 0; flex: 1; }
.who-name, .who-model, .problem-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.problem-line { display: flex; align-items: center; gap: 5px; }
.problem-line > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.problem-line .icon { flex: none; }
.list-table .col-who { width: 30%; }
.status-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.status-cell .pill { margin-left: 0; }
.usage-num small { color: var(--label-3) !important; }

/* Grid cards: fixed rows, so every card in a row lines up. */
.tiles { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tile { display: grid; grid-template-rows: auto auto 20px auto auto; gap: var(--s3); padding: var(--s4) var(--s5) var(--s4); }
.tile .who { max-width: none; }
.tile-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tile-problem { min-width: 0; display: flex; align-items: center; }
.tile-problem .problem-line { margin: 0; }
.tile-usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--separator); border-bottom: 1px solid var(--separator); }
.mini-ring { gap: 4px; text-align: center; min-width: 0; }
.ring-label { color: var(--label-2); font-size: var(--t-footnote); font-weight: 500; }
.ring-caption { color: var(--label-3); font-size: var(--t-caption); min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile-foot { min-height: 22px; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); color: var(--label-3); font-size: var(--t-footnote); }
.tile-foot > span:first-child { display: inline-flex; align-items: center; gap: 6px; }

/* Avatars: initials stay readable on every colour. */
.avatar { text-shadow: 0 1px 2px rgb(0 0 0 / 0.35); }

/* Sidebar brand: one Edge mark, then the word, at a readable size. */
.brand .logo { height: 17px; width: auto; }
.brand .product { font-size: 0.625rem; color: var(--label-2); }

/* ══ The summary: four counts and three panels in one row ═════════════════════════════════════════════ */

.summary {
    display: grid; gap: var(--s4); margin-bottom: var(--s5); align-items: stretch;
    grid-template-columns: minmax(400px, 1.15fr) minmax(300px, 0.95fr) minmax(360px, 1.35fr) minmax(280px, 0.9fr);
}
.summary > .region, .summary .overview { display: contents; }
.summary .stats { grid-template-columns: 1fr 1fr; gap: var(--s3); margin: 0; }
.summary .stat {
    grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: var(--s3); row-gap: 4px;
    padding: var(--s3) var(--s4); align-content: center;
}
.summary .stat-top { grid-column: 1 / -1; }
.summary .stat-icon { width: 26px; height: 26px; border-radius: 8px; }
.summary .stat-icon .icon { width: 15px; height: 15px; }
.summary .stat-label { font-size: var(--t-footnote); }
.summary .stat-value { font-size: 1.625rem; align-self: center; }
.summary .stat-of { font-size: var(--t-footnote); }
.summary .stat-graphic { height: 30px; align-self: center; min-width: 0; }
.summary .stat-graphic .spark { height: 30px; }
.summary .stat-graphic .split { margin: 0; height: 6px; align-self: center; }
.summary .stat-graphic { align-items: center; }
.summary .stat-hint { grid-column: 1 / -1; min-height: 0; font-size: var(--t-caption); }
.summary .keys { gap: 2px 10px; }
.summary .panel-card { padding: var(--s4); gap: var(--s3); }
.summary .panel-head h2 { font-size: var(--t-body); }
.summary .panel-head .sub { font-size: var(--t-caption); }
.summary .panel-head .big { font-size: 1.25rem; }
.summary .donut { width: 112px; height: 112px; }
.summary .donut-centre strong { font-size: 1.375rem; }
.summary .donut-wrap { gap: var(--s4); }
.summary .legend { gap: 6px; }
.summary .legend li { font-size: var(--t-footnote); }
.summary .area-chart { height: 120px; }
.summary .chart-key { font-size: var(--t-caption); }
.summary .problem-bars { gap: 10px; }
.summary .problem-bars li { grid-template-columns: 26px 1fr auto; gap: 8px; }
.summary .problem-bars .pi { width: 26px; height: 26px; border-radius: 8px; }
.summary .problem-bars .pt { font-size: var(--t-footnote); gap: 4px; }
.summary .panel-link { height: 24px; font-size: var(--t-footnote); }
/* Four across only when they fit (content about 1500px wide); two across below that. */
@media (max-width: 1859px) {
    .summary { grid-template-columns: 1fr 1fr; }
    .summary .stats { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
    .summary .overview > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 760px) {
    .summary { grid-template-columns: 1fr; }
    .summary .stats { grid-template-columns: 1fr 1fr; }
}

/* Summary cards: one line of hint each, so the four numbers sit level. */
@media (min-width: 1860px) {
    .summary { grid-template-columns: minmax(460px, 1.3fr) minmax(300px, 0.95fr) minmax(360px, 1.2fr) minmax(280px, 0.9fr); }
}
.summary .stat { grid-template-rows: auto 34px auto; align-content: space-between; }
.summary .stat-value { line-height: 34px; }
.summary .keys { flex-wrap: nowrap; overflow: hidden; }
.summary .keys .key:nth-child(3) { display: none; }
.summary .stat-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--label-3); }
.summary .stat-hint .muted { color: var(--label-3); }
/* ══ Computer cards: larger, and shaded by their worst state ═════════════════════════════════════════ */

.tiles { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: var(--s4); }
.tile { padding: var(--s5); gap: var(--s4); grid-template-rows: auto auto 22px auto auto; }
.tile .avatar { width: 48px; height: 48px; border-radius: 14px; font-size: var(--t-headline); }
.tile .who-name { font-size: var(--t-headline); }
.tile .who-model { font-size: var(--t-callout); }
.tile .gauge.small { width: 72px; height: 72px; }
.tile .gauge.small .gauge-num { font-size: var(--t-callout); }
.tile .ring-label { font-size: var(--t-callout); }
.tile .ring-caption { font-size: var(--t-footnote); }
.tile-usage { padding: var(--s4) 0; }
.tile.t-warn { box-shadow: var(--shadow-1), inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.tile.t-bad { box-shadow: var(--shadow-1), inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 60%, transparent); }
.tile.t-warn:hover { box-shadow: var(--shadow-2), inset 0 0 0 1px color-mix(in srgb, var(--warn) 70%, transparent); }
.tile.t-bad:hover { box-shadow: var(--shadow-2), inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 85%, transparent); }
.tile.offline { opacity: 0.88; }
.tile-usage { border-color: var(--separator); }

/* ══ Groups: the picker above the list, chips, the move menu and the Manage groups sheet ═════════════ */

.group-pick { display: flex; align-items: center; gap: var(--s1); }
.group-select select { height: 34px; min-width: 210px; max-width: 280px; font-weight: 600; padding-left: 34px; }
.select .icon.lead { left: 12px; right: auto; }
.group-select.chosen select { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-text); }
.group-select.chosen .icon { color: var(--accent-text); }

.group-chip {
    display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 24px; padding: 0 9px; border-radius: 12px;
    background: var(--accent-soft); color: var(--accent-text); font: 600 var(--t-footnote)/1 var(--font); white-space: nowrap;
}
.group-chip span { overflow: hidden; text-overflow: ellipsis; }
.group-chip .icon { flex: none; }
.group-chip.small { height: 22px; padding: 0 8px; font-size: var(--t-caption); }
.group-chip.button { border: 0; cursor: pointer; }
.group-chip.button:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.group-chip.button:focus-visible { outline: none; box-shadow: var(--ring); }
.group-chip.empty { background: var(--fill-2); color: var(--label-2); box-shadow: inset 0 0 0 1px dashed var(--separator); }
.list-table .col-group { width: 13%; max-width: 200px; }
.list-table .col-group .group-chip { max-width: 190px; }

.group-menu { gap: 2px; }
.group-menu button { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: 8px; font-size: var(--t-callout); }
.group-menu .heat, .group-menu .muted.small { flex: none; }
.menu-title { padding: 4px 10px 6px; color: var(--label-3); font: 600 var(--t-caption)/1.3 var(--font); text-transform: uppercase; letter-spacing: 0.06em; }
.menu-scroll { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.group-menu button .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.group-menu button.current { color: var(--accent-text); }
.group-menu .small { font-size: var(--t-caption); }
.menu-new { display: flex; gap: var(--s2); padding: var(--s2) 4px 2px; margin-top: 4px; border-top: 1px solid var(--separator); }
.menu-new input { flex: 1; min-width: 0; height: 30px; }

.groups-sheet { width: min(560px, calc(100vw - 32px)); }
.groups-sheet > .muted { margin: 0 0 var(--s4); font-size: var(--t-callout); line-height: 1.5; }
.group-add { display: flex; align-items: flex-start; gap: var(--s2); }
.group-add .field { flex: 1; }
.group-add .btn { margin-top: 24px; }
.group-list { list-style: none; margin: var(--s3) 0 var(--s4); padding: 0; max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--separator); }
.group-list li { display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 6px 2px; border-bottom: 1px solid var(--separator); }
.group-list .group-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.group-list .group-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-list .muted { font-size: var(--t-footnote); white-space: nowrap; margin-right: var(--s2); }
.group-list .group-none { justify-content: center; color: var(--label-2); }
.group-rename { flex: 1; display: flex; gap: var(--s2); }
.group-rename input { flex: 1; min-width: 0; height: 32px; }

/* The RM and account pickers: a button that opens a searchable list. */
.picker {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; max-width: 280px; padding: 0 10px 0 12px; border-radius: 10px;
    border: 1px solid var(--separator); background: var(--fill-2); color: var(--label); font: 600 var(--t-callout)/1 var(--font); cursor: pointer;
}
.picker .icon { color: var(--label-2); flex: none; }
.picker-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.picker:hover { background: var(--fill); }
.picker:focus-visible { outline: none; box-shadow: var(--ring); }
.picker.chosen { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-text); }
.picker.chosen .icon { color: var(--accent-text); }
.choice-search { width: 100%; height: 34px; margin: 2px 0 6px; }
.group-menu.choice .menu-scroll { max-height: 340px; }
.menu-empty { padding: 10px; color: var(--label-3); font-size: var(--t-footnote); text-align: center; }
.groups-sheet .choice-search { margin: var(--s3) 0 0; }

/* The account and RM of a computer, in the list. */
.group-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.rm-line { display: inline-flex; align-items: center; gap: 4px; max-width: 190px; color: var(--label-2); font-size: var(--t-caption); }
.rm-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-line .icon { flex: none; color: var(--label-3); }
.list-table .col-group { width: 15%; }

/* The talent's email and RM at the top of a computer's page. */
.owner-email { display: inline-block; margin-top: 2px; color: var(--accent-text); font-size: var(--t-callout); }
.chip.rm-chip { color: var(--info); background: var(--info-soft); text-decoration: none; }
.chip.rm-chip:hover { background: color-mix(in srgb, var(--info) 22%, transparent); text-decoration: none; }
.chip.glpi-chip { color: var(--accent-text); background: var(--accent-soft); }

/* ══ Edge IT Desk (GLPI): link status, ticket numbers, where a ticket came from, its conversation ══════════════════ */

.glpi-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3) var(--s4); margin-bottom: var(--s4); font-size: var(--t-footnote); color: var(--label-2); }
.glpi-bar strong { color: var(--label); }
.glpi-bar.bad { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 35%, transparent); }
.glpi-bar.off { color: var(--label-2); }
.glpi-bar .btn { margin-left: auto; }
.glpi-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.glpi-dot.ok { background: var(--good); }
.glpi-dot.bad { background: var(--bad); }
.glpi-open, .glpi-link { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-text); }
.glpi-link { font-weight: 600; }
.source-chip { display: inline-block; padding: 1px 7px; border-radius: 9px; font: 600 var(--t-caption)/1.5 var(--font); background: var(--fill-2); color: var(--label-2); }
.source-chip.glpi { background: var(--accent-soft); color: var(--accent-text); }
.source-chip.bot { background: var(--info-soft); color: var(--info); }
.source-chip.demo { background: var(--warn-soft); color: var(--warn); }
.source-chip.solution { margin-left: 6px; background: var(--good-soft); color: var(--good); }
.sync-error { color: var(--bad); display: inline-flex; align-items: center; gap: 4px; }
.link-button { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--accent-text); font: 600 var(--t-footnote)/1.4 var(--font); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.link-button:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
.notes { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); max-width: 760px; }
.note { padding: var(--s2) var(--s3); border-radius: 10px; background: var(--fill-2); }
.note.in { background: var(--accent-soft); }
.note.out { background: var(--info-soft); }
.note.solution { background: var(--good-soft); }
.note-head { font-size: var(--t-caption); color: var(--label-2); margin-bottom: 2px; }
.note-head strong { color: var(--label); }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--t-footnote); color: var(--label); }

/* Ticked computers in the list, and the bar of what to do with them. */
.list-table .col-tick { width: 44px; padding-right: 0; }
.tick { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.list-table tbody tr.selected { background: var(--accent-soft); }
.list-table tbody tr.selected:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.selection-bar {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(calc(-50% + var(--sidebar) / 2)); z-index: 30;
    display: flex; align-items: center; gap: var(--s3); padding: 10px 12px 10px 18px; border-radius: 16px;
    background: var(--material-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-2);
}
.selection-bar strong { font-size: var(--t-callout); white-space: nowrap; }

/* ══ Compact view: every computer as a small square in its colour ═════════════════════════════════════ */

.sq-card { padding: var(--s4) var(--s5) var(--s5); }
.sq-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s6); margin-bottom: var(--s4); }
.sq-by { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--t-footnote); }
.sq-legend { flex: 1 1 420px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); color: var(--label-2); font-size: var(--t-footnote); }
.sq-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.sq-legend .muted { margin-left: auto; color: var(--label-3); }
.sq-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sq-clusters { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s5) var(--s6); align-items: start; }
.sq-cluster header { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); min-width: 0; }
.sq-name {
    display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 6px; margin-left: -6px; border: 0; border-radius: 6px;
    background: none; color: var(--label); font: 600 var(--t-callout)/1.3 var(--font); cursor: pointer;
}
.sq-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-name .icon { color: var(--accent-text); flex: none; }
.sq-name:hover { background: var(--fill-2); color: var(--accent-text); }
.sq-name:focus-visible { outline: none; box-shadow: var(--ring); }
.sq-cluster header > .muted { font-size: var(--t-footnote); }
.sq-counts { display: inline-flex; gap: 8px; margin-left: auto; font: 600 var(--t-caption)/1 var(--font); color: var(--label-2); }
.sq-count { display: inline-flex; align-items: center; gap: 4px; }
.sq-count i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.sq-count.good i { background: var(--good); } .sq-count.warn i { background: var(--warn); } .sq-count.bad i { background: var(--bad); }
.sq-grid { display: grid; grid-template-columns: repeat(auto-fill, 34px); gap: 5px; }
.sq {
    position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
    font: 700 0.625rem/1 var(--font); letter-spacing: 0.02em; color: rgb(255 255 255 / 0.92); text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.sq:hover { text-decoration: none; transform: scale(1.18); z-index: 2; box-shadow: 0 6px 18px -4px var(--shadow-color), 0 0 0 2px var(--label); }
.sq:focus-visible { outline: none; box-shadow: var(--ring); z-index: 2; }
.sq.t-good, .sq-key.t-good { background: var(--good-fill); }
.sq.t-warn, .sq-key.t-warn { background: var(--warn-fill); }
.sq.t-bad, .sq-key.t-bad { background: var(--bad-fill); }
.sq.off, .sq-key.off { opacity: 0.38; }
.sq.off:hover { opacity: 0.8; }
.sq-name .sq-key { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* The overview: every box the same size, 8 squares across and 4 down, whether it holds 1 computer or 145. */
.sq-clusters.fixed { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); align-items: stretch; }
/* Each group is its own shaded panel, so neighbouring groups are easy to tell apart. */
.sq-clusters { gap: var(--s4); }
.sq-clusters .sq-cluster {
    padding: var(--s3) var(--s4) var(--s4); border-radius: 12px; min-width: 0;
    background: var(--fill-2); border: 1px solid var(--separator);
}
.sq-clusters .sq-cluster:hover { border-color: var(--fill-3); }
.sq-clusters.fixed .sq-grid { grid-template-columns: repeat(8, 34px); grid-auto-rows: 34px; height: calc(4 * 34px + 3 * 5px); align-content: start; }
.sq-more {
    border: 1px dashed var(--fill-3); background: var(--fill-2); color: var(--accent-text); cursor: pointer;
    display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0; font: 700 0.625rem/1 var(--font);
}
.sq-more small { font: 600 0.5rem/1 var(--font); color: var(--label-2); text-transform: lowercase; }
.sq-more:hover { background: var(--fill-3, var(--fill-2)); box-shadow: 0 0 0 2px var(--accent-text); }
@media (max-width: 380px) {
    .sq-clusters.fixed .sq-grid { grid-template-columns: repeat(8, 30px); grid-auto-rows: 30px; gap: 4px; height: calc(4 * 30px + 3 * 4px); }
    .sq-clusters.fixed .sq { width: 30px; height: 30px; }
}

/* ══ Usage: a week or a month of one computer ══════════════════════════════════════════════════════════ */

.usage-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
.usage-card { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s4); min-width: 0; }
.usage-card > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.usage-card strong { font: 700 1.25rem/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-card .muted { font-size: var(--t-footnote); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--fill); color: var(--label-2); }
.usage-icon.violet { background: var(--cpu-soft); color: var(--cpu); }
.usage-icon.sky { background: var(--info-soft); color: var(--info); }
.usage-icon.green, .usage-icon.tone-good { background: var(--good-soft); color: var(--good); }
.usage-icon.amber, .usage-icon.tone-warn { background: var(--warn-soft); color: var(--warn); }
.usage-icon.tone-bad { background: var(--bad-soft); color: var(--bad); }
.usage-charts .card { padding: var(--s4); }
.pad-chart svg { display: block; width: 100%; height: auto; }

.bars-chart .bar-hit { fill: transparent; }
.bars-chart .bar-day:hover .bar-hit { fill: var(--fill-2); }
.bars-chart .bar-on { fill: color-mix(in srgb, var(--info) 22%, transparent); }
.bars-chart .bar-online { fill: var(--chart); }
.bars-chart .weekend .bar-online { fill: color-mix(in srgb, var(--chart) 60%, transparent); }
/* Axis text in the dashboard's font and a readable grey. These charts are drawn at their real width (fitted), so this is true pixels. */
.bars-chart .axis, .heatmap .axis { fill: var(--label-2); font: 500 12px var(--font); font-variant-numeric: tabular-nums; }
.bars-chart .gridline { stroke: var(--separator); stroke-dasharray: 2 4; }
.bars-chart .axis.quiet, .heatmap .axis.quiet { fill: var(--label-3); }
.heatmap .heat { fill: var(--fill-2); }
.heatmap .heat.on { fill: var(--chart); }
.heatmap .heat.on:hover { stroke: var(--label); stroke-width: 1.5; }

.table-scroll { overflow-x: auto; }
.usage-table td, .usage-table th { white-space: nowrap; }
.usage-table tbody tr { cursor: default; }
.usage-table tr.offline td { color: var(--label-3); }
.nowrap { white-space: nowrap; }
.footnote.pad { padding: var(--s3) var(--s4) var(--s4); margin: 0; }

@media (max-width: 1500px) {
    .usage-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
    .selection-bar { transform: translateX(-50%); }
}
@media (max-width: 760px) {
    .usage-cards { grid-template-columns: 1fr 1fr; }
    .group-select select { min-width: 0; width: 100%; }
    .group-pick { width: 100%; }
    .group-pick .select { flex: 1; }
    .list-table .col-group { display: none; }
    .selection-bar { bottom: 84px; }
}

/* ── Responsive ─────────────────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .list-table .col-disk, .list-table .col-memory { display: none; }
}
@media (max-width: 1080px) {
    :root { --sidebar: 72px; }
    .sidebar { padding: var(--s5) var(--s2); align-items: center; }
    .sidebar nav a span, .sidebar-foot span, .brand .product { display: none; }
    .sidebar nav a, .sidebar-foot button { width: 44px; justify-content: center; padding: 0; }
    .count { position: absolute; margin: -18px 0 0 22px; transform: scale(0.85); }
    .sidebar nav a { position: relative; }
    .brand .logo { height: 12px; }
    .columns, .chart-grid { grid-template-columns: 1fr; }
    .chart-grid .chart:nth-child(odd) { border-right: 0; }
    .chart-grid .chart + .chart { border-top: 0.5px solid var(--separator); }
}
@media (max-width: 760px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 20;
        flex-direction: row; justify-content: space-around; padding: 6px var(--s2) calc(6px + env(safe-area-inset-bottom));
        border-right: 0; border-top: 0.5px solid var(--separator);
    }
    .brand, .sidebar-foot { display: none; }
    .sidebar nav { flex-direction: row; gap: var(--s2); width: 100%; justify-content: space-around; }
    /* A tab bar: icon over a short label, as on iPhone. */
    .sidebar nav a { flex-direction: column; gap: 3px; width: auto; min-width: 72px; height: auto; padding: 6px 10px; font-size: var(--t-caption); font-weight: 600; }
    .sidebar nav a span:not(.count) { display: inline; }
    .count { margin: -4px 0 0 30px; top: 2px; }
    main#page { padding: var(--s5) var(--s4) 96px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .list-table .col-cpu, .list-table .col-seen, .list-table th:nth-child(5), .list-table td:nth-child(5) { display: none; }
    .computer-bar { flex-direction: column; padding-right: 44px; }
    .seg.tabs { width: 100%; overflow-x: auto; }
    .form-row { flex-direction: column; align-items: stretch; }
    .form-row > .btn { margin-top: 0; }
    .danger-body { flex-direction: column; align-items: stretch; }
    .pagebar h1, .computer-title h1 { font-size: 1.5rem; }
}

/* ── Accessibility preferences ──────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    main#page.entering { animation: none; }
    .btn[aria-busy="true"]::after, .icon-btn.spinning svg { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
    .sidebar, .topbar, .popover, .chat-sheet, .toast, .selection-bar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
    :root { --separator: rgb(0 0 0 / 0.35); --label-2: #3a3a40; --label-3: #4f4f56; }
    .card, .popover, .chat-sheet, .toast { box-shadow: 0 0 0 1px var(--label-2); }
    .sidebar, .popover, .chat-sheet, .toast { background: var(--surface); backdrop-filter: none; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
    :root { --separator: rgb(148 163 184 / 0.4); --label-2: #c8d0e0; --label-3: #a3adc2; }
}

/* ══ IT users: sign-in, the account menu, roles, the Team page ═══════════════════════════════════════════════════ */

.sso { display: flex; flex-direction: column; gap: var(--s2); }
.sso-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); text-decoration: none; }
.sso-btn:hover { text-decoration: none; }
.emergency-link { align-self: center; }
.emergency { display: flex; flex-direction: column; gap: var(--s2); padding-top: var(--s3); border-top: 0.5px solid var(--separator); }
.emergency p, .signin-foot { margin: 0; text-align: center; }
.signin-foot { color: var(--label-3); }

button.me { border: 0; cursor: pointer; }
button.me:focus-visible { outline: none; box-shadow: var(--ring); }
.me.away { background: var(--idle); }
.me.big { width: 44px; height: 44px; font-size: var(--t-headline); }
.me-menu { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3); }
.me-head { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.me-head > div { display: flex; flex-direction: column; min-width: 0; }
.me-head strong, .me-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-facts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.me-actions { display: flex; gap: var(--s2); }
.me-actions .btn { flex: 1; }

.role-chip { display: inline-block; margin-left: var(--s2); padding: 1px 8px; border-radius: 9px; font: 600 var(--t-caption)/1.5 var(--font); vertical-align: middle; background: var(--fill-2); color: var(--label-2); }
.me-facts .role-chip { margin-left: 0; }
.role-chip.admin { background: var(--bad-soft); color: var(--bad); }
.role-chip.manager { background: var(--accent-soft); color: var(--accent-text); }
.role-chip.support { background: var(--info-soft); color: var(--info); }
.role-chip.viewer { background: var(--fill-2); color: var(--label-2); }
.away-chip { display: inline-block; margin-left: var(--s2); padding: 1px 8px; border-radius: 9px; font: 600 var(--t-caption)/1.5 var(--font); background: var(--warn-soft); color: var(--warn); vertical-align: middle; }
.me-facts .away-chip { margin-left: 0; }

.person-initials { width: 36px; height: 36px; font-size: var(--t-footnote); border-radius: 11px; box-shadow: none; }
.team-row { align-items: center; }
.team-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
.team-actions .select { min-width: 130px; }
.team-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-bottom: var(--s4); }
.team-filter .team-search { max-width: 360px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--label-2); font-size: var(--t-footnote); cursor: pointer; }
.selection-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); margin-bottom: var(--s4); }
.customer-row > input[type=checkbox] { flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.owners { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); max-width: 55%; }
.owner-pick {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; border: 0;
    background: var(--accent-soft); color: var(--accent-text); font: 600 var(--t-footnote)/1 var(--font); cursor: pointer;
}
span.owner-pick { cursor: default; }
.owner-pick.empty { background: var(--warn-soft); color: var(--warn); }
.owner-pick:hover { filter: brightness(1.15); }
.owner-pick:focus-visible { outline: none; box-shadow: var(--ring); }
.backup-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 10px; border-radius: 12px; background: var(--fill-2); color: var(--label-2); font-size: var(--t-caption); }
.chip-x { display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: none; color: var(--label-3); cursor: pointer; }
.chip-x:hover { background: var(--fill-3); color: var(--label); }
dialog.team-sheet { width: min(460px, calc(100vw - 32px)); }
.sheet-fields { display: flex; flex-direction: column; gap: var(--s2); }
.sheet-actions { display: flex; justify-content: flex-end; gap: var(--s2); }

.assignee { display: inline-flex; align-items: center; gap: 4px; }
.mine-chip { margin-left: 6px; padding: 0 6px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font: 600 var(--t-caption)/1.5 var(--font); }
.chip.unregistered { color: var(--warn); background: var(--warn-soft); }
button.chip.edit-talent { border: 0; cursor: pointer; color: var(--label-2); background: var(--fill-2); }
button.chip.edit-talent:hover { color: var(--label); background: var(--fill-3); }

/* ── History filters, management agent, password ───────────────────────────────────────────────────── */

.history-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.history-more { display: flex; justify-content: center; padding: 0 var(--s4) var(--s3); }
.history-more .btn[hidden] { display: none; }
.feed-label a { color: var(--accent); font-weight: 600; text-decoration: none; }
.feed-label a:hover { text-decoration: underline; }
.feed-time { text-align: right; }

.agent-state { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s4); }
/* Computers waiting for an Admin's approval (Computers page): the buttons wrap under the text on a narrow screen. */
.pending-row { flex-wrap: wrap; }
.pending-row .row-main { min-width: 200px; }
.pending-row .row-sub.mono { color: var(--label-3); font-size: var(--t-footnote); overflow-wrap: anywhere; }
.password-form { display: flex; flex-direction: column; padding-bottom: var(--s4); }
.password-form > .field { padding: var(--s4) var(--s4) 0; max-width: 520px; }
.password-form .form-row { padding-bottom: 0; }
.password-form .form-row > .field { flex: 0 1 360px; }
.password-form .select[hidden], .password-form input[hidden] { display: none; }
.check-row { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4) 0; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-actions { padding: var(--s4) var(--s4) 0; }
.switches-row { padding-top: 0; }
.switches-row > .field { flex: 1; }
.switches-row > .select { margin-top: 23px; min-width: 220px; }

@media (max-width: 760px) {
    .feed-item { grid-template-columns: 28px 1fr; }
    .feed-time { grid-column: 2; text-align: left; white-space: normal; }
    .switches-row { flex-direction: column; align-items: stretch; }
    .switches-row > .select { margin-top: 0; }
}
