* { box-sizing: border-box; }
body {
  margin: 0;
  background: #0b0d10;
  color: #e6e6e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #14171b;
  border-bottom: 1px solid #23272e;
}
header h1 { font-size: 16px; margin: 0; font-weight: 600; }
header nav a {
  color: #9aa4b2;
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}
header nav a.active, header nav a:hover { color: #fff; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
  padding: 8px;
}
.cam {
  position: relative;
  background: #14171b;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
}
.cam video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.cam .label {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 12px;
  background: rgba(0,0,0,0.55);
  padding: 2px 8px;
  border-radius: 4px;
}
.cam .status {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 11px;
  color: #ff6666;
  background: rgba(0,0,0,0.55);
  padding: 2px 8px;
  border-radius: 4px;
  display: none;
}

.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.fullscreen-overlay.open { display: flex; }
.fullscreen-overlay video { max-width: 100%; max-height: 100%; }
.fullscreen-overlay .close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: #14171b;
  padding: 32px;
  border-radius: 8px;
  width: 300px;
}
.login-box h1 { font-size: 18px; margin-bottom: 20px; }
.login-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 4px;
  border: 1px solid #2a2f37;
  background: #0b0d10;
  color: #fff;
}
.login-box button {
  width: 100%;
  padding: 10px;
  border-radius: 4px;
  border: none;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.login-error { color: #ff6666; font-size: 13px; margin-bottom: 12px; }

.panel {
  max-width: 720px;
  margin: 20px auto;
  padding: 0 16px;
}
.panel form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #14171b;
  padding: 16px;
  border-radius: 8px;
}
.panel label { font-size: 12px; color: #9aa4b2; display: block; margin-bottom: 4px; }
.panel input, .panel select {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #2a2f37;
  background: #0b0d10;
  color: #fff;
}
.panel button {
  grid-column: span 2;
  padding: 10px;
  border-radius: 4px;
  border: none;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.task-list { margin-top: 16px; }
.task-item {
  background: #14171b;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 13px;
}
.task-item video { width: 100%; margin-top: 8px; border-radius: 4px; }
