:root {
  --bg: #07090c;
  --panel: #0c1016;
  --panel-2: #10161e;
  --fg: #d6e2ee;
  --muted: #7d8b99;
  --dim: #5b6774;
  --line: #1c2530;
  --line-2: #2a3542;
  --ok: #3dffb0;
  --ok-dim: rgba(61, 255, 176, 0.14);
  --warn: #ffb020;
  --lock: #7aa2ff;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.45;
}

body.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.universe {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #020308 url("/assets/universe.jpg?v=2") center / cover no-repeat;
}
.universe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(7, 9, 12, 0.62) 0%, rgba(7, 9, 12, 0.86) 100%);
}

a { color: inherit; text-decoration: none; }

.grid-bg,
.scan { display: none; }

.shell {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.1rem 3rem;
  width: 100%;
}

body.home .shell {
  padding: 1.25rem 1.1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.7rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

body.home .topbar,
body.home .layout {
  background: rgba(12, 16, 22, 0.88);
  backdrop-filter: blur(10px);
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  margin: 0 auto 1.15rem;
  text-decoration: none;
  text-align: center;
  width: 100%;
}
.masthead img {
  height: 72px;
  width: auto;
  display: block;
}
.tagline {
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #d6e2ee;
  line-height: 1.1;
}

.topbar .status { margin-left: auto; }


.status {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  display: inline-block;
}

.btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  padding: 0.45rem 0.7rem;
  color: var(--fg);
  background: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { border-color: var(--ok); color: var(--ok); }
.btn.lock { color: var(--lock); border-color: #2c3d63; }
.btn.lock:hover { color: #c5d4ff; border-color: var(--lock); }

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--panel);
}

@media (min-width: 860px) {
  .layout { grid-template-columns: 250px 1fr; }
}

body.home .layout {
  grid-template-columns: 1fr;
}

.meta {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0.95rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}
@media (min-width: 860px) {
  .meta { border-bottom: 0; border-right: 1px solid var(--line); }
}

.meta h2 {
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.kv { display: grid; gap: 0.45rem; }
.kv div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.35rem;
}
.kv dt { color: var(--dim); }
.kv dd { margin: 0; color: var(--fg); text-align: right; word-break: break-all; }

.main { padding: 1.25rem 1.1rem 1.4rem; }

.prompt {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
}
.prompt span { color: var(--ok); }

h1 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 0.7rem;
}

.lede {
  margin: 0 0 1.4rem;
  color: var(--muted);
  max-width: 46rem;
  font-size: 0.98rem;
}

.table-wrap { overflow-x: auto; }

table.slots {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.78rem;
}

table.slots .col-name { width: 42%; }
table.slots .col-status { width: 18%; }
table.slots .col-path { width: 40%; }
table.slots td,
table.slots th { overflow: hidden; text-overflow: ellipsis; }

table.slots th {
  text-align: left;
  color: var(--dim);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line);
}

table.slots td {
  padding: 0.85rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.slots tr.clickable { cursor: pointer; }
table.slots tr.clickable:hover td { background: var(--panel-2); }

table.slots a.row {
  display: contents;
  color: inherit;
}

.pill {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line-2);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill.stub { color: var(--warn); border-color: rgba(255, 176, 32, 0.4); }
.pill.auth { color: var(--lock); border-color: #2c3d63; }
.pill.ok { color: var(--ok); border-color: rgba(61, 255, 176, 0.4); background: var(--ok-dim); }

.path { color: var(--ok); }
.note { color: var(--muted); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--dim);
}

.page {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem 1.1rem 3rem;
}

.page .panel {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.2rem 1.1rem 1.4rem;
}

.page h1 { margin-top: 1.4rem; }
.back { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.back:hover { color: var(--ok); }

pre.term {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1rem;
  background: #05070a;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
}
pre.term .ok { color: var(--ok); }
pre.term .warn { color: var(--warn); }

.list-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ok);
  margin: 1.15rem 0 0.55rem;
}
.list-title:first-child { margin-top: 0; }

.flash {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--warn);
  margin: 0 0 1rem;
}

form.login {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

input[type="text"],
input[type="password"],
input[name="user"],
input[name="name"],
input[name="pass"] {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg);
  background: #05070a;
  border: 1px solid var(--line-2);
  padding: 0.4rem 0.5rem;
  min-width: 0;
  width: 8.5rem;
}

button.btn {
  cursor: pointer;
  background: transparent;
}

.stack { display: grid; gap: 0.7rem; max-width: 28rem; }
.row { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.row input { flex: 1; min-width: 8rem; width: auto; }

.checks {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.checks legend {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0 0.3rem;
}
.checks label {
  font-family: var(--mono);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.guest-card {
  border: 1px solid var(--line);
  padding: 0.8rem 0.9rem 1rem;
  margin-bottom: 0.7rem;
}
.guest-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  font-family: var(--mono);
}
