:root {
  --bg: #0f1418; --panel: #161d22; --panel2: #1c252b; --line: #27333b; --text: #dfe7ec; --muted: #8fa1ad;
  --accent: #5cc8c0; --accent-ink: #062523; --ok: #4fc27a; --warn: #e0b341; --bad: #e5675e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; }
.appmark { width: 28px; height: 28px; }
.who { display: flex; align-items: center; gap: 8px; color: var(--muted); }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 20px; margin: 0 0 8px; } h2 { font-size: 17px; margin: 18px 0 8px; } h3 { font-size: 15px; margin: 12px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.narrow { max-width: 380px; margin: 8vh auto; }
label { display: block; margin: 8px 0; color: var(--muted); font-size: 13px; }
label input:not([type=checkbox]), label select, label textarea { display: block; width: 100%; margin-top: 4px; }
input:not([type=checkbox]), select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label.row { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
button { border: 1px solid var(--line); background: var(--panel2); border-radius: 7px; padding: 7px 12px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.error { color: var(--bad); min-height: 1.2em; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 9px 12px; color: var(--muted); }
.tabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.srv { display: flex; flex-direction: column; gap: 6px; }
.srv .name { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px #4fc27a22; } .dot.off { background: var(--bad); }
.srv .open { margin-top: 6px; align-self: flex-start; }
.mine { border-color: #5cc8c055; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: start; }
.item .btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.tag.ok { color: var(--ok); border-color: #4fc27a55; } .tag.bad { color: var(--bad); border-color: #e5675e55; } .tag.warn { color: var(--warn); border-color: #e0b34155; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.form-row label { flex: 1 1 160px; margin: 0; }
.code { font: 600 20px/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; background: var(--bg);
  border: 1px dashed var(--accent); border-radius: 8px; padding: 12px; text-align: center; user-select: all; word-break: break-all; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.scroll { overflow-x: auto; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 16px; width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: #0009; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 8px; z-index: 20; max-width: calc(100vw - 32px); }
.toast.bad { border-color: var(--bad); }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
@media (max-width: 600px) {
  .item { grid-template-columns: 1fr; } .item .btns { justify-content: flex-start; }
  .who #whoName { display: none; }
}

.notes ul { margin: 4px 0 8px 18px; padding: 0; }
.notes b { display: block; margin-top: 6px; }
code { font: 12px ui-monospace, Menlo, Consolas, monospace; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
textarea { min-height: 70px; resize: vertical; }

/* live numbers on a server card (JP 11-13) */
.meters { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 2px; }
.meters.stale { opacity: 0.55; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.meter-top > span:first-child { color: var(--muted); }
.meter-val { font-variant-numeric: tabular-nums; }
.meter-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--accent, #5cc8c0); border-radius: 3px; transition: width 0.4s ease; }
.meter-bar i.warm { background: #e0a23a; } .meter-bar i.hot { background: var(--bad); } .meter-bar i.none { width: 0 !important; }

/* shop (JP 11-13) */
.price-line { margin: 12px 0 4px; font-size: 16px; }
.srv .name .tag { margin-left: 6px; }
td button { margin: 0 4px 4px 0; }
/* a client's PC and its issues, under the server list (JP 11-14) */
details.pc { margin-top: 8px; }
details.pc > summary { cursor: pointer; font-size: 13px; }
details.pc h4 { margin: 10px 0 4px; font-size: 13px; }
dl.spec { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0 0; font-size: 13px; }
dl.spec dt { opacity: .7; }
dl.spec dd { margin: 0; overflow-wrap: anywhere; }
ul.probs, ul.issues { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
ul.issues li { margin-bottom: 4px; }
ul.issues li.err b { color: #e5484d; }
ul.probs li { color: #d9822b; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }

/* JP 11-14: make and model next to each bar */
.meter-label { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1 1 auto; color: var(--muted); }
.meter-model { color: var(--text); opacity: 0.8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.meter-top > span:first-child { color: var(--muted); }
.meter-val { flex: none; }
.meter-pc { font-size: 12.5px; }

/* My account (/account, the customer's side of the website, 11-15): the hub page's look with the site's links */
a.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.sitelinks { display: flex; gap: 14px; margin-left: 18px; }
.sitelinks a { color: var(--muted); text-decoration: none; }
.sitelinks a:hover { color: var(--text); }
@media (max-width: 560px) { .sitelinks { display: none; } }

/* Support tickets (JP 2026-11-15) */
.bar { margin-bottom: 12px; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; max-height: 50vh; overflow-y: auto; }
.thread .msg { max-width: 85%; padding: 8px 11px; border-radius: 10px; }
.thread .msg.them { align-self: flex-start; background: #f1f3f5; }
.thread .msg.me { align-self: flex-end; background: #e3f3f1; }
.thread .mbody { white-space: pre-wrap; word-break: break-word; margin-top: 3px; }
