:root {
  --bg: #121418;
  --card: #1c1f26;
  --line: #2c313c;
  --text: #e8eaed;
  --muted: #8b919c;
  --green: #2ecc71;
  --red: #e74c3c;
  --gray: #5b6270;
  --accent: #4c8dff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 860px; margin: 0 auto; padding: 20px; }
h1, h2 { margin: 0 0 14px; }
.muted { color: var(--muted); font-size: 13px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
input[type="text"], input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101318;
  color: var(--text);
  margin: 6px 0 12px;
  font: inherit;
}
.btn {
  border: 0;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  background: #2a3140;
  color: var(--text);
  font: inherit;
  text-transform: uppercase;
  
}
.btn-green { background: var(--green); color: #08210f; font-weight: 700; }
.btn-red { background: var(--red); color: #fff; font-weight: 700; }
.btn-gray { background: var(--gray); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.list { list-style: none; padding: 0; margin: 0; }
.item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.flash {
  display: none;
  position: fixed;
  left: 50%;
  top: 25px;
  transform: translateX(-50%);
  z-index: 50;
  max-width: calc(100% - 24px);
  background: #3a1d1d;
  color: #ffb4b4;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  text-align: center;
}
.dock { min-height: 100vh; padding: 12px; }
.stream-btn { width: 100%; padding: 10px; text-transform:uppercase; font-size: 18px; border-radius: 5px; }
.status { text-align: center; margin: 10px 0 16px; color: var(--muted); }
.status b { color: var(--text); }
.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
}
.event-name { font-weight: 600; }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gray);
  margin-right: 6px;
}
.dot.on { background: var(--green); }
.link-box {
  background: #101318;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  word-break: break-all;
}

.events-box {
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}
.back-link { margin: 16px 0 8px; }