* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: #070b12;
  color: #eef5ff;
}
.app { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.hidden { display: none !important; }
.login-card {
  width: min(420px, 100%);
  background: #101827;
  border: 1px solid #223047;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-card h1 { margin: 0 0 8px; }
.login-card p { color: #9fb0ca; }
input, button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
}
input { background: #0b1220; color: white; border: 1px solid #26364f; margin: 12px 0; }
button { background: #2f80ed; color: white; cursor: pointer; font-weight: 700; }
button:hover { opacity: .92; }
#loginMsg { display: block; color: #ff8f8f; margin-top: 10px; }
.viewer { width: min(1280px, 100%); }
.topbar, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #101827;
  border: 1px solid #223047;
  padding: 14px 16px;
}
.topbar { border-radius: 18px 18px 0 0; }
.footer { border-radius: 0 0 18px 18px; color: #9fb0ca; }
.actions { display: flex; gap: 10px; }
.actions button { width: auto; padding: 10px 14px; }
.badge { margin-left: 10px; font-size: 12px; padding: 5px 10px; border-radius: 999px; }
.online { background: rgba(28, 200, 138, .16); color: #42e6a4; }
.offline { background: rgba(255, 82, 82, .14); color: #ff8f8f; }
.screen-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #02050a;
  border-left: 1px solid #223047;
  border-right: 1px solid #223047;
  overflow: hidden;
}
video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7f8ea8;
  pointer-events: none;
}
video[srcObject] + .empty-state { display: none; }
