:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #0e0f13;
  color: #e7e7ea;
}
a { color: #6ea8fe; text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #15171d;
  border-bottom: 1px solid #23262f;
}
.brand { font-weight: 600; }
header nav { display: flex; align-items: center; gap: 1rem; flex: 1; }
header nav .spacer { flex: 1; }
.who { color: #9aa0ad; }

main { padding: 1rem; max-width: 1100px; margin: 0 auto; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; margin-top: 1.6rem; }
.muted { color: #9aa0ad; }
.empty { color: #9aa0ad; padding: 2rem 0; }

button {
  background: #2a2e3a; color: #e7e7ea; border: 1px solid #3a3f4c;
  border-radius: 6px; padding: 0.45rem 0.8rem; cursor: pointer; font: inherit;
}
button:hover { background: #343a48; }
button.logout, button.small { padding: 0.3rem 0.6rem; font-size: 0.85rem; }
button.danger { background: #5b2330; border-color: #7a2e3f; }
button.danger:hover { background: #6e2a3a; }
input, select {
  background: #0e0f13; color: #e7e7ea; border: 1px solid #3a3f4c;
  border-radius: 6px; padding: 0.5rem 0.7rem; font: inherit;
}
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.6rem 0; }
.inline { display: inline; }

pre.cmd {
  background: #0b0c10; border: 1px solid #23262f; border-radius: 8px;
  padding: 0.9rem; overflow-x: auto; white-space: pre; color: #cfe1ff;
}

ul.feedlist { list-style: none; padding: 0; }
ul.feedlist li { padding: 0.4rem 0; border-bottom: 1px solid #1c1f27; }

table.users { width: 100%; border-collapse: collapse; }
table.users th, table.users td { text-align: left; padding: 0.5rem; border-bottom: 1px solid #23262f; }
table.users td.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* live grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 10px;
}
.tile { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile .label {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,0.55); font-size: 0.85rem;
}

/* login / register */
body.login { display: grid; place-items: center; min-height: 100vh; }
.loginbox {
  display: flex; flex-direction: column; gap: 0.8rem;
  width: min(92vw, 320px); padding: 1.6rem;
  background: #15171d; border: 1px solid #23262f; border-radius: 12px;
}
.loginbox h1 { margin: 0 0 0.4rem; font-size: 1.2rem; text-align: center; }
.loginbox button { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.loginbox button:hover { background: #2f6fe0; }
.loginbox .alt { text-align: center; font-size: 0.9rem; }
.err { color: #ff6b6b; margin: 0; font-size: 0.9rem; text-align: center; }
.notice { color: #7ee0a0; margin: 0; font-size: 0.9rem; text-align: center; }
