/* Computer Management - console styles (light + dark) */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Ubuntu", "Cantarell", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Ubuntu Mono", "DejaVu Sans Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --fs: 12.5px;
  --row: 22px;
  --bg: #f3f3f3;
  --pane: #ffffff;
  --text: #1b1b1b;
  --muted: #5f6368;
  --faint: #8a8f96;
  --border: #a7a7a7;
  --border-soft: #e3e3e3;
  --hover: #e5f3ff;
  --sel: #cce8ff;
  --sel-border: #99d1ff;
  --sel-blur: #e2e2e2;
  --accent: #005fb8;
  --accent-text: #ffffff;
  --head: #f0f0f0;
  --titlebar: rgb(226, 226, 226);
  --section: #b9cfe9;
  --section-text: #102a43;
  --menu: #f9f9f9;
  --shadow: 0 10px 28px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12);
  --input: #ffffff;
  --input-border: #8d8d8d;
  --btn: #fdfdfd;
  --btn-border: #cfcfcf;
  --btn-hover: #f2f2f2;
  --code: #f6f7f8;
  --danger: #c42b1c;
  --warn: #9d5d00;
  --ok: #107c10;
  --warn-bg: #fff4ce;
  --err-bg: #fde7e9;
  --ok-bg: #dff6dd;
  --info-bg: #eaf3fc;
  --grid: #e8e8e8;
  --chart-bg: #ffffff;
  --part-primary: #1f4e8c;
  --part-lvm: #6b3fa0;
  --part-unalloc: #1b1b1b;
  --part-other: #2c8a3a;
  --overlay: rgba(0, 0, 0, .28);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #202020; --pane: #2b2b2b; --text: #e8e8e8; --muted: #b0b0b0; --faint: #8b8b8b; --border: #4a4a4a;
    --border-soft: #3a3a3a; --hover: #33414e; --sel: #1f4b74; --sel-border: #2f6aa0; --sel-blur: #3d3d3d;
    --accent: #4cc2ff; --accent-text: #000; --head: #2f2f2f; --titlebar: #2c2c2c; --section: #2f4560; --section-text: #e6f0fa;
    --menu: #2c2c2c; --input: #1f1f1f; --input-border: #6b6b6b; --btn: #373737; --btn-border: #4f4f4f;
    --btn-hover: #424242; --code: #1e1e1e; --danger: #ff99a4; --warn: #fce100; --ok: #6ccb5f;
    --warn-bg: #433519; --err-bg: #442726; --ok-bg: #1f3a1d; --info-bg: #1f3347; --grid: #3a3a3a;
    --chart-bg: #242424; --part-primary: #4a8fe0; --part-lvm: #a77be0; --part-unalloc: #9a9a9a; --part-other: #5cc26b;
    --overlay: rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #202020; --pane: #2b2b2b; --text: #e8e8e8; --muted: #b0b0b0; --faint: #8b8b8b; --border: #4a4a4a;
  --border-soft: #3a3a3a; --hover: #33414e; --sel: #1f4b74; --sel-border: #2f6aa0; --sel-blur: #3d3d3d;
  --accent: #4cc2ff; --accent-text: #000; --head: #2f2f2f; --titlebar: #2c2c2c; --section: #2f4560; --section-text: #e6f0fa;
  --menu: #2c2c2c; --input: #1f1f1f; --input-border: #6b6b6b; --btn: #373737; --btn-border: #4f4f4f;
  --btn-hover: #424242; --code: #1e1e1e; --danger: #ff99a4; --warn: #fce100; --ok: #6ccb5f;
  --warn-bg: #433519; --err-bg: #442726; --ok-bg: #1f3a1d; --info-bg: #1f3347; --grid: #3a3a3a;
  --chart-bg: #242424; --part-primary: #4a8fe0; --part-lvm: #a77be0; --part-unalloc: #9a9a9a; --part-other: #5cc26b;
  --overlay: rgba(0, 0, 0, .5); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: var(--fs)/1.4 var(--font); color: var(--text); background: var(--bg); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.ico { display: inline-flex; width: 16px; height: 16px; flex: none; align-items: center; justify-content: center; }
.ico svg { display: block; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- application frame ---------- */
#app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.titlebar { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; flex: none; user-select: none; background: var(--titlebar); }
.titlebar .title { font-size: 12px; }
.titlebar .title b { font-weight: 400; }
.titlebar .who { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.titlebar .who button { border: 1px solid transparent; background: none; border-radius: 4px; padding: 3px 8px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.titlebar .who button:hover { background: var(--btn-hover); border-color: var(--btn-border); }
.menubar { height: 26px; display: flex; align-items: stretch; padding: 0 4px; flex: none; background: var(--pane); border-top: 1px solid var(--border-soft); user-select: none; }
.menubar > button { border: 1px solid transparent; background: none; padding: 0 9px; cursor: default; margin: 1px 0; border-radius: 3px; }
.menubar > button:hover, .menubar > button.open { background: var(--hover); border-color: var(--sel-border); }
.toolbar { height: 32px; display: flex; align-items: center; gap: 1px; padding: 0 6px; flex: none; background: var(--pane); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.tb-btn { width: 28px; height: 26px; border: 1px solid transparent; border-radius: 3px; background: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tb-btn:hover:not(:disabled) { background: var(--hover); border-color: var(--sel-border); }
.tb-btn.on { background: var(--sel); border-color: var(--sel-border); }
.tb-btn:disabled { opacity: .38; cursor: default; }
.tb-btn .ico { color: #6f7b88; }
.tb-btn:not(:disabled) .ico { color: #5d6b7a; }
.tb-sep { width: 1px; height: 20px; background: var(--border-soft); margin: 0 5px; }
.workspace { flex: 1; display: flex; min-height: 0; padding: 5px 5px 0; position: relative; }
.pane { background: var(--pane); border: 1px solid var(--border); min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.tree-pane { width: 300px; flex: none; }
.content-pane { flex: 1; }
.actions-pane { width: 238px; flex: none; }
.vsplit { width: 5px; flex: none; cursor: col-resize; }
.hsplit { height: 5px; flex: none; cursor: row-resize; background: var(--bg); }
.statusbar { height: 24px; flex: none; display: flex; align-items: center; padding: 0 10px; gap: 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border-soft); margin-top: 5px; background: var(--bg); }
.statusbar .sb-cell { border-left: 1px solid var(--border-soft); padding-left: 10px; white-space: nowrap; }
.statusbar .sb-main { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tree ---------- */
.tree { flex: 1; overflow: auto; padding: 3px 0; outline: none; }
.tn { display: flex; align-items: center; height: var(--row); padding-right: 10px; white-space: nowrap; cursor: default; border: 1px solid transparent; margin: 0 3px; user-select: none; }
.tn:hover { background: var(--hover); }
.tn.sel { background: var(--sel-blur); }
.tree:focus-within .tn.sel, .tree.focus .tn.sel { background: var(--sel); border-color: var(--sel-border); }
.tn .tw { width: 16px; height: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.tn .tw svg { width: 9px; height: 9px; transition: transform .1s; }
.tn.open > .tw svg { transform: rotate(90deg); }
.tn .ico { margin: 0 5px 0 2px; }
.tn .lbl { overflow: hidden; text-overflow: ellipsis; }
.tn.top > .lbl { font-weight: 700; }

/* ---------- actions pane ---------- */
.ap-title { font-weight: 600; padding: 4px 9px; background: var(--head); border-bottom: 1px solid var(--border); flex: none; }
.ap-body { overflow: auto; flex: 1; padding-bottom: 6px; }
.ap-sec { margin-top: 1px; }
.ap-sec-title { display: flex; align-items: center; gap: 6px; padding: 4px 9px; background: var(--section); color: var(--section-text); cursor: default; user-select: none; }
.ap-sec-title span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-sec-title .caret { font-size: 9px; opacity: .8; }
.ap-sec.collapsed .ap-items { display: none; }
.ap-item { display: flex; align-items: center; gap: 7px; padding: 3px 9px 3px 24px; cursor: pointer; white-space: nowrap; user-select: none; position: relative; }
.ap-item:hover { background: var(--hover); }
.ap-item.disabled { color: var(--faint); cursor: default; }
.ap-item.disabled:hover { background: none; }
.ap-item.disabled .ico { opacity: .45; }
.ap-item .sub { margin-left: auto; font-size: 9px; }
.ap-item .lbl { overflow: hidden; text-overflow: ellipsis; }

/* ---------- menus ---------- */
.menu { position: fixed; z-index: 1000; min-width: 200px; background: var(--menu); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 3px; border-radius: 6px; user-select: none; max-height: 80vh; overflow: auto; }
.mi { display: flex; align-items: center; gap: 9px; padding: 4px 22px 4px 8px; border-radius: 4px; white-space: nowrap; cursor: default; position: relative; }
.mi:hover:not(.disabled), .mi.active { background: var(--hover); }
.mi.disabled { color: var(--faint); }
.mi .ico { opacity: .95; }
.mi .check { width: 16px; text-align: center; }
.mi .kbd { margin-left: auto; padding-left: 24px; color: var(--muted); font-size: 11px; }
.mi .sub { position: absolute; right: 7px; font-size: 9px; }
.msep { height: 1px; background: var(--border-soft); margin: 3px 6px; }

/* ---------- content views ---------- */
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.view-head { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--border-soft); flex: none; flex-wrap: wrap; }
.view-head h2 { font-size: 14px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 7px; }
.view-head .sub { color: var(--muted); }
.view-head .spacer { flex: 1; }
.view-body { flex: 1; overflow: auto; min-height: 0; }
.filterbox { display: flex; align-items: center; gap: 6px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input); padding: 0 6px; height: 26px; min-width: 180px; }
.filterbox input[type=search], .filterbox input[type=search]:focus { -webkit-appearance: none; appearance: none; border: 0; outline: 0; background: none; flex: 1; min-width: 0; height: 24px; box-shadow: none; padding: 0 2px; }
.filterbox:focus-within { border-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.banner { display: flex; gap: 9px; align-items: flex-start; padding: 8px 11px; margin: 8px 10px 0; border-radius: 4px; border: 1px solid var(--border-soft); background: var(--info-bg); }
.banner.warn { background: var(--warn-bg); }
.banner.err { background: var(--err-bg); }
.banner.ok { background: var(--ok-bg); }
.banner .grow { white-space: pre-wrap; }
.empty { padding: 30px 20px; color: var(--muted); text-align: center; }
.loading { padding: 24px; color: var(--muted); display: flex; gap: 10px; align-items: center; justify-content: center; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 10px; font-size: 11px; line-height: 18px; background: var(--head); border: 1px solid var(--border-soft); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.err { background: var(--err-bg); color: var(--danger); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.c-ok { color: var(--ok); }
.c-err { color: var(--danger); }
.c-warn { color: var(--warn); }
.c-muted { color: var(--muted); }

/* tabs at bottom of a view (Extended / Standard) */
.vtabs { display: flex; gap: 0; border-top: 1px solid var(--border-soft); padding: 0 6px; flex: none; background: var(--pane); }
.vtabs button { border: 1px solid transparent; border-top: 0; background: none; padding: 3px 12px; cursor: pointer; color: var(--muted); margin-top: -1px; }
.vtabs button.on { background: var(--pane); border-color: var(--border-soft); color: var(--text); border-top: 1px solid var(--pane); }
.htabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--border-soft); flex: none; flex-wrap: wrap; }
.htabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 4px 12px; border-radius: 4px 4px 0 0; cursor: pointer; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: -1px; }
.htabs button:hover { color: var(--text); background: var(--hover); }
.htabs button.on { background: var(--pane); border-color: var(--border-soft); color: var(--text); }

/* ---------- data table ---------- */
.dt { position: relative; flex: 1; overflow: auto; outline: none; min-height: 0; background: var(--pane); }
.dt-inner { position: relative; min-width: 100%; }
.dt-head { position: sticky; top: 0; z-index: 2; display: grid; background: var(--pane); border-bottom: 1px solid var(--border-soft); height: 25px; }
.dt-th { padding: 0 7px; border-right: 1px solid var(--border-soft); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; position: relative; user-select: none; cursor: default; }
.dt-th:hover { background: var(--hover); }
.dt-th .t { overflow: hidden; text-overflow: ellipsis; }
.dt-th .arrow { font-size: 8px; color: var(--muted); margin-left: auto; }
.dt-th.r { justify-content: flex-end; }
.dt-th.r .arrow { margin-left: 0; order: -1; margin-right: auto; }
.dt-th .rs { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 3; }
.dt-body { position: relative; }
.dt-row { position: absolute; left: 0; right: 0; height: var(--row); display: grid; align-items: center; cursor: default; border: 1px solid transparent; }
.dt-row:hover { background: var(--hover); }
.dt-row.sel { background: var(--sel-blur); }
.dt:focus .dt-row.sel, .dt.focus .dt-row.sel { background: var(--sel); border-color: var(--sel-border); }
.dt-row.dim { color: var(--faint); }
.dt-row.bad { color: var(--danger); }
.dt-td { padding: 0 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; min-width: 0; }
.dt-td > .txt { overflow: hidden; text-overflow: ellipsis; }
.dt-td.r { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.dt-empty { padding: 16px; color: var(--muted); text-align: center; }
.bar { height: 6px; background: var(--border-soft); border-radius: 3px; overflow: hidden; flex: 1; min-width: 30px; }
.bar > i { display: block; height: 100%; background: var(--accent); }

/* ---------- forms & buttons ---------- */
.btn { min-width: 80px; height: 28px; padding: 0 12px; border: 1px solid var(--btn-border); background: var(--btn); border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--btn-hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.1); }
.btn.danger { color: var(--danger); }
.btn.small { height: 24px; min-width: 0; padding: 0 9px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], input[type=datetime-local], select, textarea {
  border: 1px solid var(--input-border); border-radius: 3px; background: var(--input); padding: 0 7px; height: 26px; min-width: 0; outline: none; }
textarea { padding: 6px 8px; height: auto; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: inset 0 -1px 0 var(--accent); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); margin: 0; width: 14px; height: 14px; }
.form { display: grid; grid-template-columns: max-content 1fr; gap: 8px 12px; align-items: center; }
.form > label { color: var(--text); }
.form .full { grid-column: 1 / -1; }
.form .hint { grid-column: 2; color: var(--muted); font-size: 11.5px; margin-top: -4px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.radio-group { display: flex; flex-direction: column; gap: 6px; }
.fieldset { border: 1px solid var(--border-soft); border-radius: 4px; padding: 10px 12px; margin: 0; }
.fieldset legend { padding: 0 5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; align-items: baseline; }
.kv > dt { color: var(--muted); white-space: nowrap; }
.kv > dd { margin: 0; overflow-wrap: anywhere; }
pre.out, .codebox { margin: 0; font-family: var(--mono); font-size: 12px; background: var(--code); border: 1px solid var(--border-soft); border-radius: 3px; padding: 8px 10px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.list-box { border: 1px solid var(--input-border); background: var(--input); height: 150px; overflow: auto; border-radius: 2px; }
.list-box .li { padding: 2px 6px; display: flex; gap: 6px; align-items: center; cursor: default; user-select: none; }
.list-box .li:hover { background: var(--hover); }
.list-box .li.sel { background: var(--sel); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }

/* ---------- dialogs ---------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 12px; }
.dialog { background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 8px; display: flex; flex-direction: column; max-width: 100%; max-height: 100%; min-width: 0; overflow: hidden; }
.dlg-title { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; user-select: none; cursor: move; flex: none; }
.dlg-title .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-x { width: 40px; height: 28px; border: 0; background: none; border-radius: 4px; cursor: pointer; font-size: 15px; }
.dlg-x:hover { background: #c42b1c; color: #fff; }
.dlg-body { padding: 4px 14px 12px; overflow: auto; flex: 1; min-height: 0; }
.dlg-body.flush { padding: 0; display: flex; flex-direction: column; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border-soft); background: var(--pane); flex: none; align-items: center; }
.dlg-foot .left { margin-right: auto; display: flex; gap: 8px; align-items: center; }
.dlg-err { margin: 0 14px 10px; padding: 7px 10px; border-radius: 4px; background: var(--err-bg); color: var(--danger); white-space: pre-wrap; max-height: 160px; overflow: auto; font-size: 12px; }
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-soft); margin: 0 -14px 12px; padding: 0 12px; flex-wrap: wrap; }
.ptabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 5px 12px; border-radius: 4px 4px 0 0; cursor: pointer; margin-bottom: -1px; color: var(--muted); }
.ptabs button.on { border-color: var(--border-soft); background: var(--pane); color: var(--text); }
.ppage { display: none; }
.ppage.on { display: block; }
.prop-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.prop-head .big { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.prop-head .big svg { width: 32px; height: 32px; }
.prop-head .name { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.msgbox { display: flex; gap: 14px; align-items: flex-start; padding: 8px 2px; max-width: 520px; }
.msgbox .big svg { width: 32px; height: 32px; }
.msgbox .text { white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 6px; }

/* wizard */
.wizard { display: flex; min-height: 340px; }
.wiz-steps { width: 170px; flex: none; background: var(--pane); border-right: 1px solid var(--border-soft); padding: 12px 0; }
.wiz-steps div { padding: 5px 14px; color: var(--muted); }
.wiz-steps div.on { color: var(--text); font-weight: 600; background: var(--hover); }
.wiz-page { flex: 1; padding: 14px 18px; min-width: 0; overflow: auto; }
.wiz-page h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }

/* ---------- login ---------- */
.login-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #0b3d6e 0%, #145da0 55%, #2f8fd8 100%); padding: 16px; }
.login { width: 380px; max-width: 100%; background: var(--bg); border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.35); overflow: hidden; }
.login .lt { display: flex; gap: 12px; align-items: center; padding: 22px 24px 8px; }
.login .lt svg { width: 40px; height: 40px; }
.login h1 { font-size: 18px; font-weight: 600; margin: 0; }
.login .lb { padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.login label { display: flex; flex-direction: column; gap: 4px; }
.login input { height: 32px; }
.login .btn { height: 32px; margin-top: 6px; }
.login .note { color: var(--muted); font-size: 11.5px; }
.login .remember { flex-direction: row; gap: 8px; align-items: center; font-size: 12.5px; }
.login .remember input { width: 15px; height: 15px; }

/* ---------- root / folder / summary ---------- */
.summary { padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--border-soft); border-radius: 6px; padding: 12px 14px; background: var(--pane); }
.card h3 { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; display: flex; gap: 7px; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 10px; }
.tile { border: 1px solid var(--border-soft); border-radius: 6px; padding: 9px 11px; background: var(--pane); }
.tile .k { color: var(--muted); font-size: 11.5px; }
.tile .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .s { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- services extended pane ---------- */
.ext { width: 230px; flex: none; padding: 12px; border-right: 1px solid var(--border-soft); overflow: auto; }
.ext h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.ext a { display: block; margin-bottom: 4px; cursor: pointer; text-decoration: none; }
.ext a:hover { text-decoration: underline; }
.ext .d { margin-top: 14px; overflow-wrap: anywhere; }

/* ---------- details pane (event viewer, tasks) ---------- */
.details { flex: none; height: 38%; min-height: 80px; display: flex; flex-direction: column; border-top: 1px solid var(--border-soft); }
.details-head { padding: 5px 10px; font-weight: 600; background: var(--head); border-bottom: 1px solid var(--border-soft); display: flex; gap: 8px; align-items: center; }
.details-body { flex: 1; overflow: auto; padding: 10px 12px; }
.evmsg { border: 1px solid var(--border-soft); background: var(--code); padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 10px; max-height: 160px; overflow: auto; font-family: var(--mono); font-size: 12px; }
.evgrid { display: grid; grid-template-columns: max-content 1fr max-content 1fr; gap: 4px 14px; }
.evgrid dt { color: var(--muted); }
.evgrid dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- perf charts ---------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px; padding: 0 10px 10px; }
.chart-card { border: 1px solid var(--border-soft); border-radius: 6px; background: var(--pane); display: flex; flex-direction: column; overflow: hidden; }
.chart-card .ch-head { display: flex; align-items: baseline; gap: 8px; padding: 7px 10px 2px; }
.chart-card .ch-head b { font-weight: 600; }
.chart-card .ch-head .v { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.chart-card canvas { width: 100%; height: 150px; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 4px 10px 8px; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 4px 10px; padding: 0 10px 10px; font-size: 11px; color: var(--muted); }
.cores .bar { height: 5px; margin-top: 2px; }

/* ---------- device manager tree ---------- */
.dtree { padding: 4px 0; outline: none; flex: 1; overflow: auto; }
.dtree .tn { margin: 0 4px; }
.dtree .bang { position: relative; }
.dtree .bang::after { content: "!"; position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; background: #f4c21b; color: #000; font-size: 8px; line-height: 9px; text-align: center; font-weight: 700; }

/* ---------- disk management ---------- */
.dm-graph { flex: 1; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.dm-disk { display: flex; flex: none; min-height: 88px; border: 1px solid var(--border-soft); background: var(--pane); }
.dm-label { width: 140px; flex: none; padding: 6px 9px; background: var(--head); border-right: 1px solid var(--border-soft); font-size: 12px; display: flex; flex-direction: column; gap: 1px; }
.dm-label b { display: flex; align-items: center; gap: 6px; }
.dm-parts { flex: 1; display: flex; min-width: 0; padding: 3px; gap: 3px; }
.dm-part { min-width: 90px; border: 1px solid var(--border-soft); display: flex; flex-direction: column; cursor: default; overflow: hidden; position: relative; }
.dm-part::before { content: ""; height: 9px; background: var(--part-primary); flex: none; }
.dm-part.lvm::before { background: var(--part-lvm); }
.dm-part.unalloc::before { background: var(--part-unalloc); }
.dm-part.other::before { background: var(--part-other); }
.dm-part.unalloc { background: repeating-linear-gradient(45deg, transparent 0 6px, var(--border-soft) 6px 7px); }
.dm-part .pi { padding: 3px 7px; font-size: 11.5px; line-height: 1.35; overflow: hidden; }
.dm-part .pi b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-part .pi span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-part.sel { outline: 2px solid var(--accent); outline-offset: -2px; background: repeating-linear-gradient(45deg, transparent 0 5px, var(--sel) 5px 6px); }
.dm-legend { display: flex; gap: 16px; padding: 5px 10px; border-top: 1px solid var(--border-soft); font-size: 11.5px; flex: none; flex-wrap: wrap; }
.dm-legend i { display: inline-block; width: 12px; height: 10px; margin-right: 5px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 16px; }

/* ---------- jobs / editor ---------- */
.jp { gap: 10px; padding: 6px 2px 2px; }
.jp-head { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-height: 22px; }
.jp-bar { position: relative; height: 12px; border-radius: 6px; background: var(--border-soft); overflow: hidden; }
.jp-bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: var(--accent); transition: width .5s ease; }
.jp-bar.done > i { background: var(--ok); }
.jp-bar.failed > i { background: var(--danger); }
.jp-bar.indeterminate > i { width: 28%; transition: none; animation: jp-slide 1.5s ease-in-out infinite; }
@keyframes jp-slide { 0% { left: -28%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .jp-bar.indeterminate > i { animation: none; left: 0; width: 100%; opacity: .45; } }
.jp-pct { color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -4px; }
.jp-item { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 17px; }
.jobdlg .joblog { height: 260px; margin-top: 4px; }
.joblog { height: 340px; width: 100%; font-family: var(--mono); font-size: 12px; background: #0f1720; color: #d6e2ee; padding: 8px 10px; overflow: auto; white-space: pre-wrap; border-radius: 4px; }
.editor { display: flex; flex: 1; min-height: 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--input); }
.editor .gutter { width: 52px; flex: none; text-align: right; padding: 8px 8px 8px 0; color: var(--faint); font-family: var(--mono); font-size: 12.5px; line-height: 18px; overflow: hidden; user-select: none; background: var(--code); border-right: 1px solid var(--border-soft); white-space: pre; }
.editor textarea { flex: 1; border: 0; border-radius: 0; font-family: var(--mono); font-size: 12.5px; line-height: 18px; padding: 8px 10px; resize: none; white-space: pre; overflow: auto; tab-size: 4; background: var(--input); box-shadow: none; }
.ed-bar { display: flex; gap: 6px; padding: 6px 10px; align-items: center; flex: none; flex-wrap: wrap; }
.ed-status { display: flex; gap: 18px; padding: 4px 10px; font-size: 11.5px; color: var(--muted); flex: none; }

/* file browser */
.fb { display: flex; flex: 1; min-height: 0; }
.fb-tree { width: 240px; flex: none; border-right: 1px solid var(--border-soft); overflow: auto; padding: 4px 0; }
.fb-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 2px; padding: 5px 10px; border-bottom: 1px solid var(--border-soft); flex: none; overflow: auto; white-space: nowrap; }
.crumbs button { border: 1px solid transparent; background: none; padding: 1px 6px; border-radius: 3px; cursor: pointer; }
.crumbs button:hover { background: var(--hover); border-color: var(--sel-border); }
.crumbs .sep { color: var(--faint); font-size: 10px; }

/* status code colours for logs */
.s2 { color: var(--ok); }
.s3 { color: var(--accent); }
.s4 { color: var(--warn); }
.s5 { color: var(--danger); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .actions-pane { position: absolute; right: 5px; top: 5px; bottom: 0; z-index: 50; box-shadow: var(--shadow); }
  .actions-pane + .vsplit, .vsplit.for-actions { display: none; }
  .ext { display: none; }
}
@media (max-width: 680px) {
  :root { --fs: 13px; --row: 26px; }
  .tree-pane { position: absolute; left: 5px; top: 5px; bottom: 0; z-index: 50; width: min(300px, 85vw) !important; box-shadow: var(--shadow); }
  .vsplit.for-tree { display: none; }
  .titlebar .title b { display: none; }
  .menubar > button { padding: 0 7px; }
  .details { height: 45%; }
  .evgrid { grid-template-columns: max-content 1fr; }
  .wiz-steps { display: none; }
  .dm-label { width: 96px; }
  .fb-tree { display: none; }
  .form { grid-template-columns: 1fr; }
  .form .hint { grid-column: 1; }
  .dialog { width: 100% !important; }
}

/* System Tools › Terminal */
.term-tabs button { position: relative; }
.term-tabs button.dim { color: var(--muted); font-style: italic; }
.term-tabs .term-x { margin-left: 4px; padding: 0 3px; border-radius: 3px; font-size: 11px; color: var(--muted); }
.term-tabs .term-x:hover { background: var(--hover); color: var(--danger); }
.term-holder { flex: 1; min-height: 0; position: relative; background: #14191f; margin: 0 8px 8px; border-radius: 0 4px 4px 4px; overflow: hidden; }
.term-pane { position: absolute; inset: 0; padding: 6px 4px 4px 8px; }
.term-pane .xterm { height: 100%; }
.term-pane .xterm-viewport { background: #14191f !important; }
.term-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 16px; }
.term-empty > svg { width: 40px; height: 40px; }
.term-hint { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 900px) { .term-hint { display: none; } }
.tn-badge { margin-left: 5px; font-weight: 700; flex: none; }
