/* Metropolis (Chris Simpson, public domain - fonts/Metropolis-LICENSE.txt): the face ESXi's Host Client uses */
@font-face { font-family: "Metropolis"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/metropolis-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Metropolis"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/metropolis-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Metropolis"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/metropolis-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #f3f5f8; --card: #ffffff; --side: #fbfcfd; --line: #dfe3e9; --text: #1a1f26; --muted: #677283;
  --accent: #2563eb; --accent-soft: #e8f0fe; --accent-text: #ffffff; --ok: #16803c; --ok-soft: #dcf5e4;
  --bad: #c62828; --warn: #b45309; --warn-soft: #fff6dd; --warn-line: #f0d68a; --code: #0d1117; --code-text: #d6dee6;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  color-scheme: light dark;
  font: 14px/1.45 Metropolis, "Avenir Next", "Helvetica Neue", "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --card: #171b22; --side: #13171d; --line: #2a313b; --text: #e6eaef; --muted: #8d98a8;
    --accent: #5b93ff; --accent-soft: #1b2a47; --ok: #4ac26b; --ok-soft: #173321; --bad: #ff6b6b;
    --warn: #e0893b; --warn-soft: #2e2713; --warn-line: #5c4c17; --code: #090c10; --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--bg); }
[hidden] { display: none !important; }
svg.icon { flex: none; vertical-align: -3px; }
[data-icon] > svg.icon { margin-right: 6px; }

/* ---- top and bottom ---- */
header { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
footer { display: flex; align-items: center; justify-content: space-between; padding: 7px 16px; color: var(--muted); font-size: 12px; background: var(--card); border-top: 1px solid var(--line); }
footer a { color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; }
.brand { display: flex; align-items: center; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.brand > span:not(.mark) { color: var(--accent); }
.brand small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 10px; letter-spacing: 0; }
.brand .mark { width: 36px; height: 36px; margin-right: 8px; }
.brand .mark svg.icon { margin: 0; }
nav#views { display: flex; gap: 4px; margin-right: auto; margin-left: 12px; background: var(--bg); padding: 3px; border-radius: 10px; }
nav#views button { border: none; background: transparent; border-radius: 8px; padding: 6px 16px; font-weight: 600; color: var(--muted); }
nav#views button.on { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }

/* ---- the frame: the list on the left, the work on the right ---- */
#shell { flex: 1; min-height: 0; display: flex; }
.side { width: var(--side-w, 284px); flex: none; display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--line); min-height: 0; }
.side-top { padding: 10px 10px 6px; display: flex; gap: 6px; align-items: center; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--muted); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 6px 0; font: inherit; color: var(--text); }
.chip { flex: none; border-radius: 999px; padding: 4px 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.chip.on { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.chip.on i { background: var(--ok); }
.tree { flex: 1; min-height: 0; overflow: auto; list-style: none; margin: 0; padding: 2px 6px 8px; outline: none; }
.tree li { display: flex; align-items: center; gap: 7px; height: 30px; padding-right: 8px; border-radius: 7px; cursor: pointer; white-space: nowrap; user-select: none; }
.tree li:hover { background: var(--accent-soft); }
.tree li.vm.on { background: var(--accent); color: var(--accent-text); }
.tree li.vm.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.tree li.vm.sel.on { background: var(--accent); }
.tree li.img.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
#ibatch-rows .brow { display: flex; gap: 10px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; }
#ibatch-rows .brow .where { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
#ibatch-rows .brow .said { margin-left: auto; font-size: 12px; }
#ibatch-rows .brow .said.ok { color: var(--ok); }
#ibatch-rows .brow .said.bad { color: var(--bad); }
#batch-rows .brow { display: flex; gap: 10px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; }
#batch-rows .brow .where { color: var(--muted); font-size: 12px; }
#batch-rows .brow .said { margin-left: auto; font-size: 12px; }
#batch-rows .brow .said.ok { color: var(--ok); }
#batch-rows .brow .said.bad { color: var(--bad); }
.row.wrap { flex-wrap: wrap; }
.tree li .name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.tree li.group { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.tree li.host { font-weight: 700; font-size: 13px; }
.tree li.host .twist { display: inline-flex; transition: transform 0.12s; }
.tree li.host.open .twist { transform: rotate(90deg); }
.tree li.host i.net { width: 8px; height: 8px; border-radius: 50%; background: #b8c0cc; flex: none; }
.tree li.host.online i.net { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.tree li.host.offline i.net { background: var(--bad); }
.tree li.host.offline .name { opacity: 0.6; }
.tree li.add { color: var(--accent); font-size: 12.5px; }
.tree li.vm.remote.paused i { background: #e0af68; box-shadow: none; }
.tree li.group .twist { display: inline-flex; transition: transform 0.12s; }
.tree li.group.open .twist { transform: rotate(90deg); }
.tree li .count { font-size: 11px; font-weight: 500; padding: 0 7px; border-radius: 999px; background: var(--line); color: var(--muted); }
.tree li .count.live { background: var(--ok-soft); color: var(--ok); }
.tree li.vm i { width: 9px; height: 9px; border-radius: 50%; background: #b8c0cc; flex: none; margin-left: 2px; }
.tree li.vm.running i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.tree li.vm.on.running i { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }
.tree li.vm.missing i { background: var(--bad); }
.tree li.vm.missing .name { text-decoration: line-through; opacity: 0.7; }
.side-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.side-empty b { color: var(--text); font-size: 14px; }
.side-foot { display: flex; gap: 6px; padding: 8px 10px 4px; border-top: 1px solid var(--line); }
.side-foot .primary { flex: 1; padding: 7px 10px; }
.side-count { padding: 0 12px 8px; font-size: 11.5px; color: var(--muted); }
#side-image .side-foot button { flex: 1; }
.side-suggest { padding: 6px 10px 2px; display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.side-suggest button { border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.tree li .size { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tree li.img.on { background: var(--accent); color: var(--accent-text); }
.tree li.img.on .size { color: inherit; opacity: 0.8; }
.tree li.img.used .name::after { content: "•"; color: var(--ok); margin-left: 6px; }
.tree li.img.on.used .name::after { color: inherit; }
/* hot: a running machine's disk */
.tree li.img.hot .name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); margin-right: 7px; vertical-align: 1px; }
.tree li.img.hot .name { font-weight: 600; }
.tree li .drop { display: none; border: none; background: transparent; padding: 0 2px; color: var(--muted); }
.tree li.group:hover .drop { display: inline-flex; }
#work { flex: 1; min-width: 0; overflow: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.view { display: flex; flex-direction: column; gap: 10px; }

/* ---- pieces ---- */
/* ---- a computer's page: its use (two series: processor, memory - validated pair, dataviz) */
:root { --s1: #2a78d6; --s2: #eb6834; --crit: #d03b3b; }
@media (prefers-color-scheme: dark) { :root { --s1: #3987e5; --s2: #d95926; } }
.hc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hc-tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.hc-tile .k { font-size: 12px; color: var(--muted); }
.hc-tile .v { font-size: 22px; font-weight: 600; margin: 2px 0; font-variant-numeric: tabular-nums; }
.hc-tile .d { font-size: 12px; color: var(--muted); }
.hc-tile .warn { color: var(--crit); font-weight: 600; }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 6px 0 4px; display: flex; }
.meter i { display: block; height: 100%; background: var(--s1); border-radius: 4px; }
.meter i + i { margin-left: 2px; }
.meter i.mem { background: var(--s2); }
.meter i.crit { background: var(--crit); }
.meter i.soft { background: var(--muted); opacity: .45; }
.hc-block { margin-top: 14px; }
.pv-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; margin-bottom: 10px; }
.pv-field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; margin-bottom: 6px; }
.pv-field > span { color: var(--muted); font-size: 12px; }
.pv-field[hidden] { display: none; }
.ct-logs { max-height: 340px; overflow: auto; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--code); color: var(--code-text); font: 12px/1.45 "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
#ct-facts td:first-child { color: var(--muted); width: 130px; vertical-align: top; }
#ct-facts td { word-break: break-all; }
.hc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; font-size: 13px; }
.hc-head .ghost.small { margin-left: auto; font-size: 12px; padding: 2px 8px; }
.hc-legend { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.hc-legend .sw { width: 14px; height: 3px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.sw.s1 { background: var(--s1); } .sw.s2 { background: var(--s2); }
.hc-chart { position: relative; height: 170px; }
.hc-chart svg { width: 100%; height: 100%; overflow: visible; }
.hc-chart .grid { stroke: var(--line); stroke-width: 1; }
.hc-chart .axis { fill: var(--muted); font-size: 10px; }
.hc-chart .l1 { stroke: var(--s1); stroke-width: 2; fill: none; }
.hc-chart .l2 { stroke: var(--s2); stroke-width: 2; fill: none; }
.hc-chart .end { font-size: 11px; fill: var(--text); }
.hc-chart .cross { stroke: var(--muted); stroke-width: 1; }
.hc-tip { position: absolute; top: 0; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; }
.hc-vol { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.hc-vol .holds { grid-column: 1 / -1; margin-top: -4px; font-size: 12px; color: var(--muted); }
.hc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hc-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 4px 6px; cursor: pointer; user-select: none; }
.hc-table td { padding: 5px 6px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hc-table tr.m { cursor: pointer; } .hc-table tr.m:hover td { background: var(--accent-soft); }
.hc-table .num { text-align: right; }
.hc-table .bar { width: 90px; } .hc-table .bar .meter { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.row { display: flex; gap: 8px; align-items: center; }
.row input[type="text"] { flex: 1; min-width: 0; }
.grow { flex: 1; min-width: 0; }
input[type="text"], input[type="number"], input[type="password"], input[type="time"], input[type="date"], input[type="email"], input[type="url"], input[type="tel"], select, textarea {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px;
}
input:focus, select:focus, textarea:focus, button:focus-visible, .tree:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: 0.45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.primary.big { padding: 8px 26px; font-size: 15px; }
button.ghost { border-color: transparent; background: transparent; color: var(--accent); padding: 4px 8px; }
button.ghost:hover:not(:disabled) { background: var(--accent-soft); }
.muted { color: var(--muted); }
.bad { color: var(--bad); }
.small { font-size: 12px; overflow-wrap: anywhere; }
.pill { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: transparent; background: var(--ok-soft); font-weight: 600; }
.pill.bad { color: var(--bad); border-color: var(--bad); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); font-size: 16px; }
.empty svg.icon, .side-empty svg.icon { margin: 0; opacity: 0.5; }
.note { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: 13px; }
.note.bad { background: transparent; border-color: var(--bad); }

/* ---- a machine's page ---- */
#page .title { margin-bottom: 14px; align-items: center; }
#page h2 { margin: 0; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar svg.icon { margin: 0; }
.avatar.live { background: var(--ok-soft); color: var(--ok); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; align-items: end; }
.grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.grid label > span[data-icon] { display: inline-flex; align-items: center; }
.grid label.wide { grid-column: 1 / -1; }
.grid label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
/* tick boxes side by side: their first lines level, whichever wraps */
.grid label.check { align-self: start; align-items: flex-start; }
.grid label.check > input { margin-top: 3px; flex: none; }
.grid.one { grid-template-columns: 1fr; }

.pill.warn { color: #b45309; border-color: transparent; background: #fef3c7; font-weight: 600; }

/* ---- a machine being dragged to a folder ---- */
#drag-ghost { position: fixed; z-index: 60; pointer-events: none; padding: 4px 10px; border-radius: 7px; background: var(--accent); color: var(--accent-text); font-size: 13px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.tree li.group.drop, .tree.drop-top { outline: 2px dashed var(--accent); outline-offset: -2px; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }

/* ---- the menu at the pointer ---- */
#ctx { position: fixed; z-index: 50; min-width: 190px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22); }
#ctx button { display: block; width: 100%; text-align: left; border: 0; background: none; border-radius: 6px; padding: 6px 12px; font: inherit; color: var(--text); cursor: pointer; }
#ctx button:hover { background: var(--accent-soft); }
#ctx button.danger { color: var(--bad); }
#ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
#ctx .head { padding: 4px 12px 6px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---- hardware ---- */
#hw { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
#hw summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
#hw summary::-webkit-details-marker { display: none; }
#hw summary::before { content: "▸"; color: var(--muted); }
#hw[open] summary::before { content: "▾"; }
#hw summary em { font-weight: 400; font-style: normal; }
#hw .grid { margin-top: 10px; }

/* ---- networks ---- */
.net-rows { display: grid; gap: 8px; margin: 6px 0 14px; max-height: 56vh; overflow: auto; }
.net-rows > div { display: grid; grid-template-columns: 34px 1.2fr 1.6fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.net-rows > div b { text-align: center; }
.net-rows > div .live { grid-column: 2 / -1; }
.net-rows select, .net-rows input { width: 100%; }
#cards .wide { display: block; margin-top: 8px; }
#cards .wide input { width: 100%; }

/* ---- disks and snapshots ---- */
.fold { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.fold summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: "▸"; color: var(--muted); }
.fold[open] summary::before { content: "▾"; }
.fold summary em { font-weight: 400; font-style: normal; }
.fold .rows { display: grid; gap: 6px; margin: 10px 0; }
.fold .rows > div { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.fold .rows > div b { font-weight: 600; }
.fold .rows > div .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold .rows > div.missing { color: var(--bad); }
.fold .actions { margin-top: 8px; }
#snap-name { flex: 0 1 280px; }

/* ---- a shared folder ---- */
#bt-sharemode { flex: 0 0 150px; }
#bt-share-note code { font: 12px ui-monospace, Consolas, monospace; background: rgba(0, 0, 0, 0.07); padding: 1px 5px; border-radius: 4px; user-select: all; overflow-wrap: anywhere; }
#bt-share-note div { margin-top: 3px; }

/* ---- the host check ---- */
.pills { gap: 8px; }
button.pill { cursor: pointer; background: none; font: inherit; font-size: 12px; }
dialog.wide { width: min(640px, 94vw); }
dialog.xwide { width: min(1180px, 96vw); }
#dlg-poolman #pm-note { margin: 8px 0 6px; }
#dlg-poolman .pool-disks { margin-bottom: 8px; }
#dlg-poolman #pm-devices { max-height: 40vh; overflow: auto; }
#dlg-fleetall #fa-list { max-height: 58vh; overflow: auto; margin-top: 6px; }
#dlg-fleetall tr.host-row { cursor: pointer; }
#dlg-fleetall tr.host-row:hover td { background: color-mix(in srgb, var(--line) 35%, transparent); }
#dlg-fleetall td.num, #dlg-fleetall th.num { text-align: right; }
#dlg-fleetall .bar { display: block; flex: none; width: 64px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
/* a bar and its number: every bar of a column begins at the same place, every number ends at the same place */
#dlg-fleetall .barcell { display: flex; align-items: center; gap: 10px; }
#dlg-fleetall .barcell > span:last-child { margin-left: auto; text-align: right; }
/* one line: what is typed takes the room that is left, the rest is as wide as what it says */
#dlg-fleetall .fa-find { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin: 6px 0 8px; white-space: nowrap; }
#dlg-fleetall .fa-find input { flex: 1 1 160px; min-width: 120px; width: auto; }
#dlg-fleetall .fa-find select { flex: none; width: auto; }
#dlg-fleetall .fa-pages { display: inline-flex; align-items: center; gap: 6px; flex: none; }
#dlg-fleetall #fa-list { max-height: 56vh; overflow: auto; }
#dlg-fleetall .bar > i { display: block; height: 100%; background: var(--accent, #2563eb); }
#dlg-fleetall .bar.hot > i { background: var(--crit, #dc2626); }
.rm-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.rm-table td { padding: 5px 6px; border-top: 1px solid var(--line); }
.rm-table td.acts { text-align: right; white-space: nowrap; }
.rm-table td.acts button { padding: 2px 8px; font-size: 12px; }
#host-list { display: grid; gap: 10px; margin: 4px 0 16px; max-height: 60vh; overflow: auto; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; align-items: start; }
/* a choice with a title and words under it (a machine's networks): the words under the title, not in the box's column */
.check > :nth-child(n+3) { grid-column: 2; }
.check i { width: 10px; height: 10px; border-radius: 50%; margin: 5px 6px; background: var(--muted); }
.check.ok i { background: var(--ok); } .check.warn i { background: #d97706; } .check.bad i { background: var(--bad); }
.check b { font-weight: 600; }
.check div { grid-column: 2; }
.check .fix { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.check code { flex: 1; font: 12px ui-monospace, Consolas, monospace; background: #0f1117; color: #c9d1d9; padding: 6px 8px; border-radius: 6px; overflow-wrap: anywhere; user-select: all; }

/* ---- a machine's screen ---- */
#screen-box { height: 480px; background: #000; border-radius: 8px; overflow: hidden; }
#screen-box:empty { display: none; }
#screen-box canvas { outline: none; }
#screen .cmd-head em { color: var(--ok); }

/* ---- images ---- */
.info { flex: 1; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.info b { font-weight: 600; }
.info .chain { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.info.bad { color: var(--bad); }
nav#tabs { display: flex; flex-wrap: wrap; gap: 6px; }
nav#tabs button { border-radius: 999px; padding: 5px 14px; }
nav#tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.op p { margin: 0 0 10px; }

/* ---- the command, and what it says ---- */
.cmd-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.cmd-head > span { display: inline-flex; align-items: center; }
.cmd-head em { color: var(--accent); font-style: normal; margin-left: 8px; }
textarea#command { width: 100%; resize: vertical; font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; background: var(--code); color: var(--code-text); border-color: var(--code); border-radius: 8px; }
.actions { margin-top: 10px; }
progress { flex: 1; height: 8px; accent-color: var(--accent); }
#result { border-color: var(--ok); }
#result.bad { border-color: var(--bad); }
.out { flex: 1; min-height: 150px; display: flex; flex-direction: column; }
pre#output { flex: 1; margin: 0; overflow: auto; background: var(--code); color: var(--code-text); border-radius: 8px; padding: 8px 10px; font: 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; white-space: pre-wrap; word-break: break-all; min-height: 100px; }

/* ---- dialogs ---- */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); padding: 20px 22px; width: min(480px, 92vw); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
dialog::backdrop { background: rgba(10, 14, 20, 0.5); }
dialog h3 { margin: 0 0 14px; display: flex; align-items: center; font-size: 17px; }
dialog p { margin: 0 0 12px; white-space: pre-line; }
dialog p.small { margin: 0 0 10px; }
dialog input[type="text"], dialog input[type="password"], dialog input[type="time"], dialog input[type="date"], dialog input[type="email"], dialog input[type="url"], dialog select { width: 100%; }
input[type="text"], input[type="number"], input[type="password"], input[type="time"], input[type="date"], input[type="email"], input[type="url"], input[type="tel"], select { height: 34px; }
dialog textarea { width: 100%; }
/* the machine's cards: each network with its note, set apart from the next */
#card-rows > div { margin-bottom: 8px; }
/* in a row, a field shares the line with what is beside it instead of taking all of it (and pushing the rest under it) */
dialog .row > select { width: auto; flex: 1 1 auto; min-width: 0; }
dialog .row > input[type="number"], dialog .row > label > select, dialog .row > label > input { width: auto; }
dialog button { white-space: nowrap; }
/* a field with its name over it, wherever a dialog has one (not only where a grid lays them out) */
dialog form > label, dialog .field { display: block; margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
dialog form > label > select, dialog form > label > input:not([type="checkbox"]):not([type="radio"]), dialog form > label > textarea,
dialog .field > select, dialog .field > input:not([type="checkbox"]):not([type="radio"]) { display: block; margin-top: 4px; }
dialog form > label:has(> input[type="checkbox"]), dialog form > label:has(> input[type="radio"]) { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
dialog .row > .field { display: block; flex: 1 1 0; min-width: 0; white-space: normal; }
dialog .row > .field > input, dialog .row > .field > select { width: 100%; }
dialog details { margin-top: 10px; }
dialog details > summary { cursor: pointer; margin-bottom: 6px; }
dialog .row > label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* fields, then the buttons that act on them: a gap between */
dialog .grid + .row, dialog .grid + p, dialog .row + .grid, dialog p + .grid { margin-top: 12px; }
dialog .hc-head { margin-top: 14px; }
.row.end { justify-content: flex-end; margin-top: 16px; }

@media (max-width: 760px) {
  .side { width: 240px; }
  #qemu { display: none; }
}
/* ---- a narrow window: nothing pushed out of it, nothing squeezed to a letter */
.row.actions { flex-wrap: wrap; }
.brand small { white-space: nowrap; }
header .pills { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; min-width: 0; }
header .pills > * { white-space: nowrap; }
@media (max-width: 1180px) { .brand small { display: none; } }
.side { max-width: 45vw; }
.side-top { flex-wrap: wrap; }
.search { min-width: 130px; }
.side-foot { flex-wrap: wrap; }
.side-foot button { white-space: nowrap; }
#page-body > .row.title { flex-wrap: wrap; gap: 8px; }
#page-body > .row.title button { white-space: nowrap; }
#work { container-type: inline-size; }
@container (max-width: 620px) {
  .vm-set { flex-direction: column; }
  .vm-nav { width: auto; display: flex; flex-wrap: wrap; align-items: stretch; border-right: 0; border-bottom: 1px solid var(--line); padding: 4px; }
  .vm-nav-h { display: none; }
  .vm-nav button { width: auto; border-radius: 6px; padding: 5px 10px; }
  .vm-nav button small { display: none; }
  .vm-nav button.on { box-shadow: inset 0 -2px 0 var(--accent); }
}


/* ---- dividers that can be dragged (double-click: as they were) */
.split { flex: none; position: relative; z-index: 2; background: transparent; touch-action: none; }
.split.x { width: 6px; margin: 0 -3px; cursor: col-resize; }
.split.y { height: 6px; margin: -3px 0; cursor: row-resize; }
.split::after { content: ""; position: absolute; inset: 0; margin: auto; border-radius: 2px; background: transparent; transition: background .12s; }
.split.x::after { width: 2px; } .split.y::after { height: 2px; }
.split:hover::after, .split.drag::after { background: var(--accent); }
body.dragging, body.dragging * { user-select: none !important; }
body.dragging.x { cursor: col-resize; } body.dragging.y { cursor: row-resize; }

/* ---- a computer's page, as Hyper-V Manager: machines / details / actions */
#hostcard.hv { display: flex; flex-direction: column; flex: 1; min-height: 620px; padding-bottom: 12px; }
#hostcard.hv[hidden] { display: none; }
#hostcard .hc-tiles { margin-bottom: 10px; }
#hostcard .hc-tile { padding: 8px 12px; } #hostcard .hc-tile .v { font-size: 18px; }
.hv-body { flex: 1; min-height: 0; display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hv-pane { display: flex; flex-direction: column; min-height: 0; }
#hv-top { height: var(--hv-top, 46%); min-height: 110px; flex: none; }
.hv-detail { flex: 1; min-height: 90px; border-top: 1px solid var(--line); }
.hv-head { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--side); font-size: 13px; }
.hv-filter { flex: 0 1 200px; margin-left: auto; padding: 0 6px; } .hv-filter input { padding: 3px 4px; font-size: 12.5px; }
.hv-scroll { flex: 1; min-height: 0; overflow: auto; }
.hv-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.hv-table th { position: sticky; top: 0; z-index: 1; background: var(--card); text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; }
.hv-table th:hover { color: var(--text); }
.hv-table td { padding: 5px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hv-table td.name { font-weight: 500; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.hv-table td.warn { color: var(--crit); font-weight: 600; }
/* storage manager: compact per-pool actions + the New-pool dialog */
.mini { font-size: 12px; padding: 2px 9px; border-radius: 7px; }
.mini.danger { color: var(--bad); }
.mini.danger:hover:not(:disabled) { border-color: var(--bad); }
.hc-head .mini { margin-left: auto; }
.mini-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
#dlg-pool { width: min(460px, 94vw); }
#dlg-pool .field { display: block; margin: 0 0 10px; font-size: 13px; font-weight: 600; }
#dlg-pool .field select, #dlg-pool .field input { margin-top: 4px; font-weight: 400; }
.pool-disks { display: flex; flex-direction: column; gap: 5px; max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-weight: 400; }
.pool-disk { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.pool-disk input { width: auto; }
.small.warn { color: var(--bad); }
.small.muted { color: var(--muted); }
.hv-table.wrap td { white-space: normal; vertical-align: top; overflow-wrap: anywhere; }
.hv-table.wrap td:first-child, .hv-table.wrap td:has(> .pill) { white-space: nowrap; }
#dlg-fleet-health #fh-list { max-height: 60vh; overflow: auto; }
/* the computer's head keeps its shape when what it says is long (a computer that does not answer) */
/* (what it says goes beside the name where there is room, and on a line of its own under it where there is
   not - never a column a few letters wide; a long reason is kept to four lines, the rest by scrolling) */
#hostcard .row.title { flex-wrap: wrap; }
#hostcard .row.title > .grow { flex: 1 1 auto; min-width: 160px; }
#hostcard #hc-said { flex: 1 1 280px; min-width: min(280px, 100%); max-height: 6em; overflow: auto; overflow-wrap: anywhere; text-align: right; }
#hostcard #hc-said:empty { display: none; }
.hv-table.plain th { cursor: default; } /* a read-only table: headers are not sort buttons */
.hv-table.plain th:hover { color: var(--muted); }
.hv-table td.name > span { display: inline-flex; align-items: center; gap: 7px; }
.hv-table .num { text-align: right; }
.hv-table tr.m { cursor: default; }
.hv-table tr.m:hover td { background: var(--accent-soft); }
.hv-table tr.m.on td { background: var(--accent); color: var(--accent-text); }
.hv-table tr.m.on .muted, .hv-table tr.m.on .plat { color: inherit; opacity: .85; }
.hv-table .st { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line); display: inline-block; }
.hv-table .st.running { background: var(--ok); } .hv-table .st.paused, .hv-table .st.hibernated, .hv-table .st.suspended { background: #d79b00; }
.hv-table tr.m.on .st { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.hv-table .plat { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.hv-table .bar { display: inline-block; width: 44px; height: 4px; border-radius: 2px; background: var(--line); vertical-align: middle; margin-left: 6px; overflow: hidden; }
.hv-table .bar i { display: block; height: 100%; background: var(--s1); }
.hv-table tr.m.on .bar { background: rgba(255, 255, 255, .35); } .hv-table tr.m.on .bar i { background: #fff; }
.hv-tabs { display: flex; gap: 2px; padding: 3px 8px 0; border-bottom: 1px solid var(--line); background: var(--side); }
.hv-tabs button { border: 0; background: none; border-radius: 0; padding: 6px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; box-shadow: none; }
.hv-tabs button:hover { color: var(--text); background: none; }
.hv-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.hv-tab { flex: 1; min-height: 0; overflow: auto; padding: 10px 14px; }
.hv-tab[hidden] { display: none; }
.hv-tab .hc-block:first-child { margin-top: 0; }
.hv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 24px; font-size: 13px; margin: 0; }
.hv-facts div { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); min-width: 0; }
.hv-facts dt { color: var(--muted); min-width: 120px; } .hv-facts dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-snaps { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.hv-snaps li { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; }
.hv-snaps li:hover { background: var(--accent-soft); }
.hv-snaps li .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.hv-snaps li.now .grow { color: var(--accent); font-weight: 600; }
.hv-snaps li button { padding: 2px 8px; font-size: 12px; opacity: 0; } .hv-snaps li:hover button, .hv-snaps li button:focus { opacity: 1; }
.hv-snapbar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.hv-actions { width: var(--hv-act, 230px); flex: none; overflow: auto; background: var(--side); border-left: 1px solid var(--line); padding: 4px 0 8px; font-size: 13px; }
.hv-actions h4 { margin: 10px 14px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-actions button { display: flex; width: 100%; align-items: center; gap: 9px; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 5px 14px; text-align: left; font-size: 13px; color: var(--text); }
.hv-actions button svg { color: var(--muted); flex: none; }
.hv-actions button:hover:not(:disabled) { background: var(--accent-soft); } .hv-actions button:hover:not(:disabled) svg { color: var(--accent); }
.hv-actions button.danger, .hv-actions button.danger svg { color: var(--bad); }
.hv-actions button:disabled { opacity: .45; }
.hv-actions hr { border: 0; border-top: 1px solid var(--line); margin: 5px 14px; }
.hv-empty { color: var(--muted); font-size: 13px; padding: 6px 2px; }
.hv-actions button { justify-content: flex-start; }
#hostcard .row.title { margin-bottom: 8px; }
#hostcard .hc-tiles { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 8px; }
#hostcard .hc-tile .k { font-size: 11.5px; } #hostcard .hc-tile .d { font-size: 11.5px; line-height: 1.35; }
#hostcard .hc-tile .meter { margin: 4px 0; }
#work.hosting > .out, #work.hosting > #result { display: none; }
#view-vm:has(> #hostcard:not([hidden])) { flex: 1; min-height: 0; }

/* ---- a machine's settings, as Hyper-V's settings window: the list on the left, the part chosen on the right */
.vm-set { display: flex; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 380px; }
/* A phone Linux container has no QEMU hardware: hide the hardware list and its "Its image" button,
   and show a plain container card in their place. */
.ct-card { display: none; }
#page-body.is-container #vm-set, #page-body.is-container #vm-images { display: none; }
#page-body.is-container #ct-card { display: block; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--side); padding: 14px 16px; }
.ct-card .ct-row { margin: 5px 0; line-height: 1.45; }
.ct-card code { background: var(--card); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
.vm-nav { width: var(--vm-nav, 220px); flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 4px 0 10px; overflow: auto; }
.vm-nav-h { margin: 12px 14px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.vm-nav button { display: grid; grid-template-columns: 18px 1fr; column-gap: 9px; align-items: center; width: 100%; text-align: left; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 6px 14px; font-size: 13px; color: var(--text); }
.vm-nav button > svg { grid-row: span 2; color: var(--muted); }
.vm-nav button small { grid-column: 2; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 0; }
.vm-nav button small:empty { display: none; }
.vm-nav button:hover { background: var(--accent-soft); }
.vm-nav button.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); color: var(--accent); font-weight: 600; }
.vm-nav button.on > svg { color: var(--accent); }
.vm-panes { flex: 1; min-width: 0; padding: 16px 20px; overflow: auto; }
.vm-pane[hidden] { display: none; }
.vm-pane h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.vm-pane h3 > svg { color: var(--accent); }
.vm-pane .lead { margin: 4px 0 14px; color: var(--muted); font-size: 12.5px; max-width: 70ch; }
.vm-pane .grid + .row.actions, .vm-pane .rows + .grid, .vm-pane .row.actions + .grid, .vm-pane .grid + .note { margin-top: 12px; }
.vm-pane .row.actions { margin-top: 8px; }

/* the machine page's toolbar: its buttons as icons, at the top */
.vm-tools { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--side); margin-right: 6px; }
.vm-tools:empty { display: none; }
.vm-tools .tool { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 6px; background: none; box-shadow: none; padding: 5px 9px; font-size: 12.5px; color: var(--text); }
.vm-tools .tool svg { color: var(--muted); }
.vm-tools .tool:hover:not(:disabled) { background: var(--card); box-shadow: var(--shadow); } .vm-tools .tool:hover:not(:disabled) svg { color: var(--accent); }
.vm-tools .tool.go svg { color: var(--ok); } .vm-tools .tool.danger, .vm-tools .tool.danger svg { color: var(--bad); }
.vm-tools .tool:disabled { opacity: .45; }
/* the title: its name never squeezed out, its path on one line (all of it on hover) */
#page-body > .row.title > .grow { min-width: 0; flex: 1 1 260px; }
/* Phone/tablet: let the detail header wrap so Rename/Forget don't overflow or collide with the status pill. */
html.mobile #page-body > .row.title { flex-wrap: wrap; gap: 8px; }
#vm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vm-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
#page-body > .vm-tools { display: flex; width: max-content; max-width: 100%; flex-wrap: wrap; margin: 10px 0 0; }
#page-body > .vm-tools:empty { display: none; }
/* the fleet dialog */
#dlg-fleet textarea { width: 100%; box-sizing: border-box; font: 13px ui-monospace, Consolas, monospace; }
.fl-scroll { max-height: 46vh; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.fl-scroll:has(table:empty) { display: none; }
.fl-table td { white-space: normal; vertical-align: top; }
.fl-table td:first-child { width: 22px; text-align: center; }
.fl-table .fl-state b { font-weight: 600; }
.fl-table tr.fl-ready .fl-state b, .fl-table tr.fl-added .fl-state b { color: var(--ok); }
.fl-table tr.fl-host_key .fl-state b, .fl-table tr.fl-no_key .fl-state b, .fl-table tr.fl-not_yet .fl-state b { color: #b7791f; }
.fl-table tr.fl-host_key_changed .fl-state b, .fl-table tr.fl-install_failed .fl-state b, .fl-table tr.fl-failed .fl-state b, .fl-table tr.fl-unreachable .fl-state b, .fl-table tr.fl-unknown .fl-state b { color: var(--bad); }
.fl-prints { margin: 6px 0; padding: 6px 8px; font-size: 11.5px; background: var(--side); border-radius: 6px; white-space: pre-wrap; word-break: break-all; }

/* a site in the list: its computers under it */
.tree li.site { font-weight: 700; color: var(--text); }
.tree li.site > svg { color: var(--accent); }
.tree li.site .count { font-weight: 500; }

/* by group: the computer a machine is on */
.tree li .where { margin-left: auto; padding-left: 8px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; max-width: 45%; }
.tree li.vm.on .where { color: inherit; opacity: .8; }
.tree li.site .computers { margin-left: auto; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.tree li.site .computers + .count { margin-left: 6px; }
.tree li.site .name { flex: 0 0 auto; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.tree li.site .computers { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.away { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--text); cursor: pointer; }
#signin-pill { cursor: pointer; font-weight: 600; }

/* a platform's mark in the list (PVE, ESXi, KVM ...): a short word on its own colour */
.pmark { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 17px; padding: 0 5px; margin-right: 2px; border-radius: 4px; color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0.02em; flex: none; }
li.group.platform .name { font-weight: 500; }
li.host .name .via { display: block; font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.2; }

/* recent tasks: a foldable grid at the bottom of the window, as ESXi's */
.tasks { flex: none; background: var(--card); border-top: 1px solid var(--line); }
.tasks-head { display: flex; align-items: center; gap: 8px; padding: 3px 12px; font-size: 12.5px; }
.tasks-head .grow { flex: 1; }
.tasks-head button { padding: 2px 8px; font-size: 12px; }
.tasks-title { font-weight: 600; }
.tasks-fold svg { transition: transform 0.15s; }
.tasks.open .tasks-fold svg { transform: rotate(90deg); }
.tasks-body { display: none; height: 150px; overflow: auto; border-top: 1px solid var(--line); }
.tasks.open .tasks-body { display: block; }
.tasks-grid { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.tasks-grid th { position: sticky; top: 0; background: var(--card); text-align: left; font-weight: 600; padding: 5px 10px; border-bottom: 1px solid var(--line); color: var(--muted); }
.tasks-grid td { padding: 4px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tasks-grid th:nth-child(1) { width: 16%; }
.tasks-grid th:nth-child(4) { width: 30%; }
.tasks-grid tr.task { cursor: pointer; }
.tasks-grid tr.task:hover td { background: var(--hover, rgba(37, 99, 235, 0.06)); }
.tasks-grid td.st-running { color: var(--accent); }
.tasks-grid td.st-done { color: var(--ok); }
.tasks-grid td.st-failed { color: var(--bad); }
.tasks-grid td.empty { color: var(--muted); text-align: center; padding: 18px; white-space: normal; width: auto; }

/* a site's page (data centre, office) */
#sitecard.sc[hidden] { display: none; }
/* the site's page in tabs: what is not of the tab shown is not there */
.sc-tabs { margin: 4px 0 10px; padding: 0; background: none; }
#sitecard[data-tab="overview"] [data-in]:not([data-in="overview"]), #sitecard[data-tab="computers"] [data-in]:not([data-in="computers"]),
#sitecard[data-tab="bmcs"] [data-in]:not([data-in="bmcs"]), #sitecard[data-tab="devices"] [data-in]:not([data-in="devices"]) { display: none !important; }
.dev-table td { white-space: nowrap; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.dev-table tr.muted td { color: var(--muted); }
.dev-new { color: var(--accent); font-weight: 600; }
.dv-connect { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.dv-connect button { font-size: 12.5px; padding: 4px 10px; }
.dev-history { margin-top: 10px; }
.dev-history summary { cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px 0; }
.sc-body { display: flex; gap: 14px; align-items: flex-start; }
.sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sc-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.sc-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sc-card-head b { font-size: 14px; font-weight: 600; }
.sc-card-head button { font-size: 12px; letter-spacing: 0.03em; color: var(--accent); }
.sc-dl { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.sc-dl dt { color: var(--muted); }
.sc-dl dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.sc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.sc-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; }
.sc-form label:has(textarea) { grid-column: span 2; }
.sc-form .row.end { grid-column: span 2; }
#sc-issues .sc-issue { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; margin-bottom: 6px; border-radius: 8px; background: #fef3c7; color: #78350f; font-size: 13px; border: 1px solid #fcd34d; }
#sc-issues .sc-issue button { font-size: 12px; color: #78350f; text-decoration: underline; }
#sc-actions { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
#sc-actions button { text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; }
#sc-actions button:hover { background: var(--hover, rgba(37, 99, 235, 0.08)); }
#sc-actions button.danger { color: #dc2626; }
#sc-computers tr.m { cursor: pointer; }
#sc-computers td.empty { color: var(--muted); text-align: center; padding: 14px; }

/* a site's live tiles and its picture */
.sc-live .hc-tile .bar { height: 6px; border-radius: 3px; background: var(--line); margin: 4px 0 3px; overflow: hidden; }
.sc-live .hc-tile .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.sc-live .hc-tile .bar i.hot { background: #dc2626; }
.sc-live .hc-tile.good .v { color: #15803d; }
.sc-live .hc-tile.warn .v { color: #b45309; }
.sc-live .hc-tile.bad .v { color: #dc2626; }
.sc-mapcard { margin-bottom: 12px; }
.sc-mapcard .sc-card-head span { font-size: 11.5px; }
.sc-svg { width: 100%; height: auto; display: block; font-family: inherit; }
.sc-svg .wan { fill: #eff6ff; stroke: #93c5fd; }
.sc-svg .wan-t { font-size: 14px; font-weight: 600; fill: #1e3a8a; }
.sc-svg .wan-d { font-size: 11px; fill: #475569; }
.sc-svg .lan { fill: #f1f5f9; stroke: #cbd5e1; }
.sc-svg .lan-t { font-size: 12px; font-weight: 600; fill: #334155; }
.sc-svg .link { stroke: #94a3b8; stroke-width: 1.5; }
.sc-svg .rate { font-size: 10.5px; fill: #64748b; }
.sc-svg .node rect { fill: var(--card, #fff); stroke: #cbd5e1; stroke-width: 1.2; }
.sc-svg .node { cursor: pointer; }
.sc-svg .node:hover rect, .sc-svg .node:focus rect { stroke: var(--accent, #2563eb); stroke-width: 2; }
.sc-svg .node .name { font-size: 13.5px; font-weight: 600; fill: var(--text, #1f2937); }
.sc-svg .node .mark { font-size: 9.5px; font-weight: 600; fill: #fff; }
.sc-svg .node .d { font-size: 11px; fill: #64748b; }
.sc-svg .node .why { font-size: 11px; fill: #b45309; font-weight: 600; }
.sc-svg .node .dot { fill: #94a3b8; }
.sc-svg .node.ok .dot { fill: #22c55e; }
.sc-svg .node.warn .dot { fill: #f59e0b; } .sc-svg .node.warn rect { stroke: #f59e0b; }
.sc-svg .node.down .dot { fill: #dc2626; } .sc-svg .node.down rect { stroke: #fca5a5; }
@media (prefers-color-scheme: dark) { .sc-svg .wan { fill: #172554; stroke: #1d4ed8; } .sc-svg .wan-t { fill: #bfdbfe; } .sc-svg .lan { fill: #1e293b; stroke: #334155; } .sc-svg .lan-t { fill: #cbd5e1; } }
.sc-card { overflow-x: auto; } .sc-card table.hv-table { width: 100%; }

/* what Detect found: put into empty fields, marked */
.sc-form .detected { border-color: #f59e0b; background: #fffbeb; }
.sc-form .detected-note { color: #b45309; font-weight: 500; font-size: 11px; }
.sc-found { margin: 0 0 10px; font-size: 12px; }
.sc-found summary { cursor: pointer; font-weight: 600; margin-bottom: 4px; }
.sc-found pre { margin: 0; padding: 8px 10px; background: var(--code, #0f172a); color: var(--code-text, #e2e8f0); border-radius: 8px; white-space: pre-wrap; font-size: 11.5px; max-height: 220px; overflow: auto; }
.sc-card-head span button { margin-left: 6px; }
@media (prefers-color-scheme: dark) { .sc-form .detected { background: #2a2111; } }

/* what Detect found, kept */
#sc-detected[hidden] { display: none; }
#sc-detected .sc-card-head span { display: flex; align-items: center; gap: 8px; }
#sc-detected tr.odd td { background: #fffbeb; }
.sc-detected-more { margin-top: 8px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.sc-detected-more b { font-weight: 600; }
@media (prefers-color-scheme: dark) { #sc-detected tr.odd td { background: #2a2111; } }

.sc-dl dd .auto-tag { margin-left: 8px; font-size: 10.5px; padding: 1px 6px; border-radius: 9px; background: #fef3c7; color: #92400e; vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .sc-dl dd .auto-tag { background: #3b2f12; color: #fcd34d; } }

/* the line above the recent tasks: dragged up and down for their height */
.tasks { position: relative; }
.tasks-grip { position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: ns-resize; z-index: 5; }
.tasks-grip::after { content: ""; position: absolute; left: 50%; top: 2px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line); opacity: 0; transition: opacity 0.15s; }
.tasks-grip:hover::after, .tasks-grip:focus-visible::after, body.dragging-y .tasks-grip::after { opacity: 1; background: var(--accent); }
.tasks-grip:focus-visible { outline: none; }
body.dragging-y { cursor: ns-resize; user-select: none; }

/* servers' BMCs on a site's page: the header's buttons on its right, never squeezed; the table fits its card */
.bmc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bmc-acts { display: flex; gap: 6px; flex-wrap: nowrap; }
.bmc-acts button { white-space: nowrap; }
.bmc-note { margin: 2px 0 8px; }
.bmc-table { table-layout: fixed; width: 100%; }
.bmc-table td, .bmc-table th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmc-table th:nth-child(1) { width: 26%; } .bmc-table th:nth-child(2) { width: 14%; } .bmc-table th:nth-child(3) { width: 26%; }
.bmc-table th:nth-child(4) { width: 10%; } .bmc-table th:nth-child(5) { width: 16%; } .bmc-table th:nth-child(6) { width: 8%; }
.bmc-table td.found { color: var(--muted, #64748b); font-style: italic; }

/* the team (team-ui.js): one size whatever it shows - the lists at its left, the chosen one beside them */
dialog.team { width: min(1120px, 95vw); height: min(700px, 90vh); max-height: 90vh; padding: 0; overflow: hidden; }
dialog.team, dialog.team *, dialog.team-form, dialog.team-form * { word-break: normal; overflow-wrap: break-word; }
dialog.team > form { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 14px 16px 12px; }
.team-head { display: flex; align-items: baseline; gap: 12px; flex: none; }
.team-head h3 { margin: 0 0 10px; }
.team-main { flex: 1; min-height: 0; display: flex; gap: 14px; }
.team-nav { flex: none; width: 168px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--side); overflow: auto; }
.team-nav button { display: flex; align-items: center; justify-content: flex-start; width: 100%; gap: 8px; border: 0; background: none; box-shadow: none; border-radius: 6px; padding: 7px 9px; text-align: left; font-size: 13px; color: var(--text); }
.team-nav button svg { color: var(--muted); flex: none; }
.team-nav button:hover { background: var(--card); }
.team-nav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.team-nav button.on svg { color: var(--accent); }
.team-pane { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
/* Phone/tablet: the Team dialog fills the screen and its tabs become a horizontal, swipeable bar on
   top (the fixed 168px left column squeezed tabs out of reach on a narrow screen). */
html.mobile dialog.team { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
html.mobile dialog.team > form { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
html.mobile .team-main { flex-direction: column; gap: 8px; }
html.mobile .team-nav { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 4px; }
html.mobile .team-nav button { width: auto; flex: none; white-space: nowrap; }
.team-body { flex: 1; min-height: 0; overflow: auto; padding: 3px 2px 0 0; }
.team-body > p { margin: 0 0 8px; line-height: 1.45; }
dialog.team > form > .row.end { flex: none; margin-top: 8px; }
.team-grid { display: flex; flex-direction: column; min-height: 0; }
.team-tools { display: flex; width: max-content; max-width: 100%; flex-wrap: wrap; margin: 0 0 8px; }
.team-tools .tool span { white-space: nowrap; }
.team-scroll { border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.team-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.team-tbl th { position: sticky; top: 0; text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; background: var(--side); border-bottom: 1px solid var(--line); white-space: nowrap; }
.team-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; word-break: normal; overflow-wrap: break-word; }
.team-tbl td.small { font-size: 12.5px; }
.team-tbl .nowrap { white-space: nowrap; }
.team-clip { display: inline-block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.team-tbl td .team-tag:first-child { margin-left: 0; }
.team-tbl tbody tr:last-child td { border-bottom: 0; }
.team-tbl tbody tr { cursor: default; }
.team-tbl tbody tr:hover td { background: var(--side); }
.team-tbl tbody tr.sel td { background: var(--accent-soft); }
.team-tbl tr.none td { padding: 18px 8px; text-align: center; }
.team-count { padding: 5px 2px 0; }
.team-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; color: var(--muted); font-weight: 400; }
.team-on { color: var(--ok); font-weight: 600; }
.team-off { color: var(--bad); font-weight: 600; }
.team-avatar { display: inline-block; border-radius: 50%; object-fit: cover; color: #fff; text-align: center; font-weight: 600; flex: none; vertical-align: middle; }
.team-who { display: flex; gap: 8px; align-items: center; }
.team-section { border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px 12px; margin-bottom: 10px; }
.team-section h4 { margin: 0 0 8px; font-size: 13.5px; }
.team-section p { margin: 4px 0; }
.team-filter { display: flex; gap: 12px; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }
.team-filter input { margin-left: 4px; }
.team-profile { display: flex; gap: 18px; align-items: flex-start; }
.team-profile .grow { flex: 1; min-width: 0; }
.team-facebox { display: flex; flex-direction: column; gap: 6px; align-items: center; flex: none; }
.team-facebox button { font-size: 12px; padding: 3px 8px; }
dialog.team-form { width: min(680px, 94vw); }
dialog.team-form .grid { margin: 10px 0 4px; align-items: start; }
dialog.team-form textarea, dialog.team textarea { width: 100%; box-sizing: border-box; font: inherit; resize: vertical; }
dialog.team-form label small { font-size: 11.5px; }
dialog.team-form i.must, .team i.must { color: var(--bad); font-style: normal; }
dialog.team button svg, dialog.team-form button svg, dialog.vmb-ask button svg { vertical-align: -2px; margin-right: 5px; }
dialog.team .tool svg, dialog.team .team-nav button svg { margin-right: 0; }
.team-qr { background: #fff; padding: 8px; border-radius: 8px; display: inline-block; }
.team-qr svg { width: 200px; height: 200px; display: block; }
.team-token, .team-codes { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.team-token { display: block; padding: 10px; border-radius: 8px; background: var(--side); border: 1px solid var(--line); }
.team-codes { columns: 2; }
.team-said { min-height: 1.3em; margin: 6px 0 0; flex: none; }
.team-fold { margin-top: 10px; }
.team-sub { margin: 16px 0 6px; font-size: 13.5px; }
#ask-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid #d97706; background: #fef3c7; color: #92400e; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
#ask-chip[hidden] { display: none; }
dialog.team .team-section button.danger { background: #b91c1c; color: #fff; }
#me-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; border: 1px solid rgba(127,127,127,.3); background: none; color: inherit; cursor: pointer; font: inherit; }

/* Files: looking inside a machine's disk image (the Files pane) */
.files-bar { align-items: center; gap: 10px; }
.spacer { flex: 1 1 auto; }
.files-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 8px 0; font-size: 13px; }
.files-crumbs .crumb { background: none; border: none; color: var(--accent, #2563eb); cursor: pointer; font: inherit; padding: 2px 4px; border-radius: 4px; }
.files-crumbs .crumb:hover { background: rgba(127,127,127,.12); text-decoration: underline; }
.files-crumbs .crumb::after { content: "/"; color: var(--muted); margin-left: 4px; }
.files-crumbs .crumb:first-child::after, .files-crumbs .crumb:last-child::after { content: ""; }
.files-rows { max-height: 46vh; overflow: auto; border: 1px solid rgba(127,127,127,.2); border-radius: 8px; }
.file-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-bottom: 1px solid rgba(127,127,127,.08); }
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: rgba(127,127,127,.07); }
.file-name { flex: 1 1 auto; text-align: left; background: none; border: none; color: inherit; cursor: pointer; font: inherit; padding: 2px 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name:hover { text-decoration: underline; }
.file-meta { flex: 0 0 auto; }
.files-view { margin-top: 12px; border: 1px solid rgba(127,127,127,.2); border-radius: 8px; padding: 10px; }
.files-view textarea { width: 100%; min-height: 240px; margin-top: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; box-sizing: border-box; resize: vertical; }

/* File Explorer: the flagship image operation - first, and in a warning (amber) theme, because
   editing a VM's disk from outside it is an advanced, higher-risk job. */
#tabs button.flagship { background: var(--warn, #b45309); color: #fff; font-weight: 600; border-radius: 6px; }
#tabs button.flagship:hover { filter: brightness(1.08); }
#tabs button.flagship.on { background: var(--warn, #b45309); color: #fff; box-shadow: var(--shadow); }
#tabs button.flagship [data-icon], #tabs button.flagship::before { opacity: 1; }
.files-caution { color: var(--warn, #b45309); font-weight: 600; }

/* File Explorer window: modified-date column, Windows accounts. The window's own layout (a standalone
   page, not a dialog) is in explorer.html's inline <style>. */
.file-when { flex: 0 0 auto; min-width: 84px; text-align: right; }
.acct-row { gap: 10px; padding: 8px 10px; }
.acct-row b { min-width: 150px; }
.acct-tags { flex: 0 0 auto; }
button.warn { background: var(--warn); color: #fff; border-color: var(--warn); }
button.warn:hover { filter: brightness(1.08); }
/* in dark mode --warn is a lighter amber; white text on it fails contrast, so use dark text */
@media (prefers-color-scheme: dark) { button.warn { color: #1a1205; } }

/* inline file-row actions (rename/copy/cut/delete), revealed on hover */
.file-act { flex: 0 0 auto; opacity: 0; padding: 1px 6px; }
.file-row:hover .file-act, .file-row:focus-within .file-act { opacity: .85; }
.file-act:hover, .file-act:focus-visible { opacity: 1; }
.file-act.danger { color: var(--bad); }

/* A small spinner: the File Explorer button while its window opens, and the window while the helper boots. */
@keyframes vmspin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: vmspin .8s linear infinite; flex: 0 0 auto; vertical-align: -3px; }
button .spinner { width: 14px; height: 14px; margin-right: 6px; border-top-color: currentColor; }
button.is-opening { opacity: .85; }
/* the search box draws its own ring (.search:focus-within): the field inside draws none */
.search input:focus { outline: none; }
td > .pill.away { cursor: default; }

/* ---- a machine's network cards: a line a card - what it is attached to, and what that means */
.adapters { display: grid; gap: 10px; margin-bottom: 12px; }
.adapter { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.adapter-line { display: flex; align-items: center; gap: 10px; }
.adapter-line > b { flex: none; min-width: 78px; }
.adapter-line > span { flex: none; font-size: 12.5px; }
.adapter-line > select { flex: 1 1 auto; min-width: 0; }
.adapter > .small { margin-top: 6px; }
.small.bad { color: var(--bad); }
details.adv { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.adv > summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details.adv[open] > summary { margin-bottom: 10px; color: var(--text); }

/* ---- the Network manager: tools, the list, the one chosen below it - as VirtualBox's */
.nm-tools { display: flex; gap: 8px; margin: 10px 0 8px; }
.nm-list { border: 1px solid var(--line); border-radius: 8px; min-height: 132px; max-height: 30vh; overflow: auto; }
.nm-list .hv-table { margin: 0; }
.nm-list tbody tr { cursor: pointer; }
.nm-list tbody tr.on td { background: var(--accent-soft); }
.nm-list td.bad { color: var(--bad); }
.nm-props { margin-top: 12px; }
.nm-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.nm-tabs button { border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: none; box-shadow: none; padding: 6px 14px; color: var(--muted); font-weight: 600; margin-bottom: -1px; }
.nm-tabs button.on { border-color: var(--line); background: var(--card); color: var(--accent); }
.nm-pane { display: grid; gap: 10px; padding: 14px 4px 2px; min-height: 150px; align-content: start; }
.nm-field { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; }
.nm-field > span { color: var(--muted); font-size: 12.5px; }
.nm-radio, .nw-card { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; cursor: pointer; }
.nm-radio > input, .nw-card > input { margin-top: 3px; }
.nm-radio > span, .nw-card > span { display: grid; gap: 3px; }
.nm-radio select { margin-top: 6px; max-width: 420px; }
.nm-facts { display: grid; grid-template-columns: 170px 1fr; gap: 6px 10px; margin: 0; }
.nm-facts dt { color: var(--muted); font-size: 12.5px; }
.nm-facts dd { margin: 0; }
.note.bad { color: var(--bad); }
/* the wizard: a question a step */
#dlg-netwiz { width: min(560px, 94vw); }
.nw-body { display: grid; gap: 10px; min-height: 230px; align-content: start; margin-top: 6px; }
.nw-q { margin: 0 0 2px; font-weight: 600; }
.nw-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.nw-card.on { border-color: var(--accent); background: var(--accent-soft); }
.nw-card.off { opacity: .55; cursor: default; }
.nw-sum { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--side); }
#nw-step { margin-left: 10px; font-weight: 400; }
/* the manager where it is a computer's tab; its tools' Apply at the right; the machines of a network; the cards */
.nm { display: block; }
.hv-tab.nm { padding: 4px 2px 10px; }
.nm-tools { align-items: center; }
.nm-tools .grow { flex: 1; }
.nm-machines { display: grid; gap: 6px; }
.nm-machines > div { display: flex; align-items: center; gap: 10px; }
.nm-cards { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.nm-cards > summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.nm > .note { margin-top: 10px; }
.nm-vlan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.nm-vlan select { margin-top: 0; flex: 1 1 260px; max-width: 420px; }
.nm-vlan input[type="number"] { width: 92px; }
.nm-vlan .small { flex: 1 1 100%; }
#ns-list select { max-width: 320px; }
#ns-list td:first-child { width: 28px; }
.nm-vlan input[type="text"] { flex: 1 1 260px; min-width: 0; }
