html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f0f2f5;
  padding: 1rem;
}

body {
  max-width: 1100px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

h1, h2 {
  font-family: serif;
  color: #377ba8;
  margin: 1rem 0;
}

a {
  color: #377ba8;
  transition: color 0.15s ease;
}

a:hover {
  color: #2a5f84;
}

code {
  background: #f4f6f8;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

hr {
  border: none;
  border-top: 1px solid lightgray;
}

nav {
  background: linear-gradient(to right, #4a5568, #2d3748);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-radius: 8px 8px 0 0;
}

nav h1 {
  flex: auto;
  margin: 0;
  color: white;
}

nav h1 a {
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  color: white;
}

nav ul  {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li a, nav ul li span, header .action {
  display: block;
  padding: 0.5rem 0.75rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.15s ease;
}

nav ul li a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #2d3748;
  border-radius: 0 0 6px 6px;
  padding: 0.25rem 0;
  min-width: 160px;
  z-index: 100;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu li a {
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
}

.content {
  padding: 0 1rem 1rem;
}

.content > header {
  border-bottom: 1px solid lightgray;
  display: flex;
  align-items: flex-end;
}

.content > header h1 {
  flex: auto;
  margin: 1rem 0 0.25rem 0;
}

.flash {
  margin: 1em 0;
  padding: 1em;
  background: #cae6f6;
  border: 1px solid #377ba8;
  border-radius: 4px;
}

ul {
  padding-left: 1.5em;
}

li {
  margin: 0.3em 0;
  line-height: 1.5;
}

.post > header {
  display: flex;
  align-items: flex-end;
  font-size: 0.85em;
}

.post > header > div:first-of-type {
  flex: auto;
}

.post > header h1 {
  font-size: 1.5em;
  margin-bottom: 0;
}

.post .about {
  color: slategray;
  font-style: italic;
}

.post .body {
  white-space: pre-line;
}

.content:last-child {
  margin-bottom: 0;
}

.content form {
  margin: 1em 0;
  display: flex;
  flex-direction: column;
}

.content label {
  font-weight: bold;
  margin-bottom: 0.5em;
}

.content input, .content textarea {
  margin-bottom: 1em;
  padding: 6px 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.content input:focus, .content textarea:focus {
  outline: none;
  border-color: #377ba8;
  box-shadow: 0 0 0 2px rgba(55,123,168,0.2);
}

.content textarea {
  min-height: 12em;
  resize: vertical;
}

input.danger {
  color: #cc2f2e;
}

input[type=submit] {
  align-self: start;
  min-width: 10em;
  background: #377ba8;
  color: white;
  border: 1px solid #2a5f84;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

input[type=submit]:hover {
  background: #2a5f84;
}

input, button {
  font-family: inherit;
}

button {
  height: 32px;
  padding: 0 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.custom-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-list-element {
  background-color: white;
  border-style: solid;
  padding: 2px;
  margin: 0;
}

.camera-list {
  display: flex;
  flex-direction: column;
}

.camera-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #eee;
}

.camera-row:hover {
  background: #f8f9fa;
}

.camera-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.camera-row .camera-id {
  font-weight: bold;
  min-width: 30px;
}

.camera-row .camera-desc {
  flex: 1;
  font-size: 0.9em;
  color: #333;
}

.camera-row .camera-mac {
  font-size: 0.75em;
  color: #999;
  font-family: monospace;
}

.camera-row .camera-ip {
  font-size: 0.75em;
  color: #999;
  font-family: monospace;
  min-width: 110px;
}

.camera-row .camera-version {
  font-size: 0.75em;
  color: #aaa;
}

.router-list {
  display: flex;
  flex-direction: column;
}

.router-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #eee;
}

.router-row:hover {
  background: #f8f9fa;
}

.router-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.router-row .router-id {
  font-weight: bold;
  min-width: 40px;
}

.router-row .router-hostname {
  font-size: 0.9em;
  color: #333;
  min-width: 180px;
}

.router-row .router-desc {
  flex: 1;
  font-size: 0.9em;
  color: #333;
}

.router-row .router-mac {
  font-size: 0.75em;
  color: #999;
  font-family: monospace;
}

.router-row .router-ip {
  font-size: 0.75em;
  color: #aaa;
  font-family: monospace;
  min-width: 110px;
}

.process-name {
  font-weight: bold;
  min-width: 80px;
}

.process-stat {
  font-size: 0.85em;
  color: #4a9;
  min-width: 60px;
}

.process-errors {
  color: #c66;
}

.process-uptime {
  font-size: 0.75em;
  color: #999;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.video-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  text-decoration: none;
  color: inherit;
  font-size: 0.85em;
  border: 1px solid #eee;
  border-radius: 3px;
}

.video-cell:hover {
  background: #f8f9fa;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 1px; /* Adjust gap as needed */
}
.grid-item {
  background-color: var(--bg-color);
  padding: 0px; /* Adjust padding as needed */
  text-align: center;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

th, td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

th {
  background: #f8f9fa;
  font-weight: 600;
}

tr:hover {
  background: #f8f9fa;
}

