:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #677187;
  --line: #dfe5ef;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --green: #059669;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #eaf1ff 0, var(--bg) 340px);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.panel,
.camera-tag img {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(223, 229, 239, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

small,
.section-heading span {
  color: var(--muted);
}

main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 34px 28px 48px;
}

.page-header {
  margin-bottom: 20px;
}

.panel {
  padding: 20px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(170px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

button {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 18px;
}

.table-panel {
  padding-bottom: 0;
}

.table-wrap {
  overflow: auto;
  max-height: 72vh;
  margin: 0 -20px;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 1380px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.94rem;
}

th,
td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fbff;
  color: #374151;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

th:nth-child(1),
td:nth-child(1) {
  width: 128px;
  white-space: nowrap;
}

th:nth-child(2),
td:nth-child(2) {
  line-height: 1.45;
}

th:nth-child(3),
td:nth-child(3) {
  width: 150px;
}

th:nth-child(4),
td:nth-child(4) {
  width: 150px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 170px;
}

th:nth-child(6),
td:nth-child(6) {
  width: 175px;
}

th:nth-child(7),
td:nth-child(7) {
  width: 190px;
}

.camera-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.camera-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1d4ed8;
  padding: 5px 9px 5px 5px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.camera-tag img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 999px;
  background: white;
  box-shadow: none;
}

.empty {
  padding: 42px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .controls {
    grid-template-columns: 1fr;
  }
}
