* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #0f172a;
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 1rem 1.5rem;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1f2937;
}

header h1 {
  font-size: 1.2rem;
  font-weight: 600;
}

header span {
  font-size: 0.85rem;
  color: #9ca3af;
}

.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  width: 320px;
  max-width: 100%;
  border-right: 1px solid #1f2937;
  background: #020617;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #1f2937;
}

.sidebar-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sidebar-header input {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.85rem;
  outline: none;
}

.sidebar-header input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.camera-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.5rem 1rem;
}

.camera-item {
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.4rem;
  border-radius: 0.7rem;
  background: #020617;
  border: 1px solid #1f2937;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.camera-item:hover {
  border-color: #374151;
  background: #020617;
  transform: translateY(-1px);
}

.camera-item.active {
  border-color: #3b82f6;
  background: #0b1120;
  box-shadow: 0 0 0 1px #1d4ed8;
}

.camera-item-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.camera-item-location {
  font-size: 0.8rem;
  color: #9ca3af;
}

.badge-status {
  margin-top: 0.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}

.badge-status span.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.badge-online {
  background: rgba(22, 163, 74, 0.2);
  color: #bbf7d0;
}

.badge-online span.dot {
  background: #22c55e;
}

.badge-offline {
  background: rgba(220, 38, 38, 0.2);
  color: #fecaca;
}

.badge-offline span.dot {
  background: #ef4444;
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #1f2937;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  background: #1d4ed8;
  color: #e5e7eb;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #374151;
}

.btn-secondary:hover {
  background: #1f2937;
}

/* Main content */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  gap: 1rem;
  min-width: 0;
}

.main-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.card {
  background: #020617;
  border-radius: 1rem;
  border: 1px solid #1f2937;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #374151;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.status-dot.online {
  background: #22c55e;
}

.status-dot.offline {
  background: #ef4444;
}

.status-text-online {
  color: #bbf7d0;
}

.status-text-offline {
  color: #fecaca;
}

.
