:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --card: #141820;
  --line: #2a3140;
  --text: #f3f5f8;
  --muted: #9aa3b2;
  --accent: #7aa2ff;
  --on: #3dd68c;
  --off: #f07178;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; }
button, input { font: inherit; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 650; letter-spacing: 0.02em; }
.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.lead { color: var(--muted); margin: 28px 0 18px; }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
}
.mark { width: 48px; height: 5px; border-radius: 99px; background: var(--accent); margin-bottom: 22px; }
h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.1; }
.sub { margin: 0 0 24px; color: var(--muted); }
label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 14px; }
input {
  width: 100%;
  background: #0d1015;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  background: var(--accent);
  color: #0b0d10;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.login .btn { width: 100%; }
.note { min-height: 1.2em; color: var(--off); margin: 14px 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding-bottom: 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
h2 { margin: 0; font-size: 22px; }
.role, .host { margin: 8px 0 0; color: var(--muted); }
.host { font-size: 13px; }
dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 4px 0 0; }
.pill { border-radius: 999px; padding: 4px 8px; font-size: 12px; }
.pill.on { color: var(--on); background: rgba(61, 214, 140, 0.12); }
.pill.off { color: var(--off); background: rgba(240, 113, 120, 0.12); }
.empty { color: var(--muted); }
#term { height: calc(100vh - 58px); padding: 8px 12px 12px; }
.term-bar { height: 58px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); }
.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.frame { width: min(680px, 100%); }
.frame-bar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.board {
  background: #2b2b2f;
  border-radius: 28px;
  padding: 22px 16px 16px;
}
.board-title {
  margin: 2px 10px 14px;
  color: #cfcfcf;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.server {
  background: #070707;
  border-radius: 22px;
  padding: 20px 18px 6px;
  margin-bottom: 12px;
}
.server:last-child { margin-bottom: 0; }
.server-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}
.server-ico { width: 34px; height: 34px; color: #3dd68c; }
.server h2 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 750; }
.meta { margin: 6px 0 0; color: #a7a7a7; font-size: 16px; }
.badge {
  background: #12331f;
  color: #3dd68c;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
}
.badge.off { background: #3a1719; color: #ff8b92; }
.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #2a2a2a;
  margin-top: 18px;
}
.actions.single { grid-template-columns: 1fr; }
.act {
  appearance: none;
  background: transparent;
  border: 0;
  color: #dedede;
  padding: 16px 8px 18px;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
}
.act svg { width: 26px; height: 26px; }
.act span { font-size: 15px; }
.act:hover { color: #fff; }
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  padding: 20px;
}
.dialog {
  width: min(440px, 100%);
  background: #141414;
  border-radius: 18px;
  padding: 22px;
}
.dialog h2 { margin: 0 0 8px; font-size: 22px; }
.dialog p { margin: 0; color: #b5b5b5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog .ghost, .dialog .danger {
  margin: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.danger { background: #3dd68c; color: #07140c; border: 0; font-weight: 700; }
.backup-list { list-style: none; margin: 16px 0 0; padding: 0; }
.backup-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #2a2a2a;
}