:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1a2e;
  --panel-2: #111f36;
  --panel-3: #172842;
  --line: #233a5d;
  --line-soft: rgba(137, 177, 227, 0.18);
  --text: #e9f2ff;
  --muted: #8ea7c7;
  --cyan: #38bdf8;
  --blue: #2677ff;
  --green: #33d69f;
  --yellow: #f6b94b;
  --red: #ff5b6e;
  --paper: #f7f9fc;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(38, 119, 255, 0.16), transparent 28%),
    linear-gradient(135deg, #07111f 0%, #0a1425 44%, #08101c 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  background: linear-gradient(180deg, #0a1b32, #07101f);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 24px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #32b8e8, #2357d7);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 1px;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.18), rgba(38, 119, 255, 0.08));
  border-color: rgba(56, 189, 248, 0.3);
}

.nav-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.1);
  border-radius: 5px;
}

.sidebar-footer {
  position: absolute;
  right: 16px;
  bottom: 18px;
  left: 16px;
  padding: 14px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 6px;
}

.sidebar-footer span,
.sidebar-footer strong {
  display: block;
}

.sidebar-footer span {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-footer strong {
  margin-top: 4px;
  font-size: 24px;
}

.workspace {
  min-width: 0;
  padding: 18px 22px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
  margin-bottom: 18px;
  padding: 0 4px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 2px;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  width: 320px;
  height: 40px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(13, 26, 46, 0.82);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.search input {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.search span {
  margin-right: 8px;
}

.icon-button,
.user-chip,
.toolbar-buttons button,
.tabs button,
.segmented button,
.doc-toolbar button,
.preset-list button,
.panel-title > button {
  height: 36px;
  color: var(--text);
  background: rgba(23, 40, 66, 0.88);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.icon-button {
  width: 38px;
  color: #fff;
  background: rgba(255, 91, 110, 0.18);
  border-color: rgba(255, 91, 110, 0.34);
  font-weight: 900;
}

.user-chip {
  padding: 0 14px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) 380px;
  gap: 18px;
}

.map-panel,
.panel {
  background: linear-gradient(180deg, rgba(17, 31, 54, 0.96), rgba(10, 22, 40, 0.96));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-panel {
  overflow: hidden;
}

.map-toolbar,
.panel-title,
.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.map-toolbar strong,
.map-toolbar span {
  display: block;
}

.map-toolbar span,
.panel-title span,
.doc-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.segmented button {
  border: 0;
  border-radius: 0;
  padding: 0 13px;
}

.segmented .active,
.tabs .active,
.primary {
  background: linear-gradient(135deg, #249ce2, #2466f2) !important;
  border-color: transparent !important;
}

.map-canvas {
  position: relative;
  height: calc(100vh - 178px);
  min-height: 610px;
  overflow: hidden;
  background: #cddfdc;
}

.mock-map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.map-canvas.satellite {
  background: #101922;
}

.map-canvas.satellite .mock-map-canvas {
  filter: saturate(0.65) brightness(0.58) contrast(1.18);
}

.map-canvas.satellite .map-pin {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.28), 0 10px 26px rgba(0,0,0,0.34);
}

.map-canvas.list-mode .mock-map-canvas,
.map-canvas.list-mode .map-base-label,
.map-canvas.list-mode .station-dot,
.map-canvas.list-mode .map-pins,
.map-canvas.list-mode .map-legend,
.map-canvas.list-mode .map-card,
.map-canvas.list-mode .map-project-list {
  display: none;
}

.map-list-view {
  position: absolute;
  inset: 18px;
  z-index: 5;
  display: none;
  overflow: hidden;
  background: rgba(7, 17, 31, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-canvas.list-mode .map-list-view {
  display: block;
}

.map-list-view table {
  min-width: 900px;
}

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

.map-base-label {
  position: absolute;
  z-index: 1;
  color: rgba(20, 62, 89, 0.28);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 4px;
  display: none;
}

.label-sh { right: 19%; top: 42%; }
.label-sz { left: 48%; top: 48%; }
.label-wx { left: 35%; top: 46%; }
.label-cz { left: 21%; top: 42%; }

.station-dot {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(23, 48, 68, 0.82);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.station-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  background: #fff;
  border: 3px solid #2563eb;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

.station-a { left: 64%; top: 46%; }
.station-b { left: 54%; top: 48%; }
.station-c { left: 43%; top: 50%; }
.station-d { left: 33%; top: 51%; }

.map-pins {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.map-pin {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  color: #07111f;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(7, 17, 31, 0.08);
  border-radius: 5px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  transform: translate(-10px, -26px);
}

.map-pin span {
  width: 11px;
  height: 15px;
  background: var(--green);
  clip-path: polygon(50% 0, 100% 35%, 50% 100%, 0 35%);
}

.map-pin.warning span { background: var(--yellow); }
.map-pin.danger span { background: var(--red); }

.map-pin.active {
  color: #fff;
  background: rgba(7, 17, 31, 0.9);
  border-color: rgba(56, 189, 248, 0.5);
}

.map-pin.active::after {
  position: absolute;
  inset: -8px;
  content: "";
  border: 1px solid rgba(56, 189, 248, 0.56);
  border-radius: 10px;
  animation: mapPulse 1.8s ease-out infinite;
}

.map-pin em {
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}

.map-legend {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(7, 17, 31, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 7px;
  backdrop-filter: blur(12px);
  font-size: 12px;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-legend b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.map-legend .normal { background: var(--green); }
.map-legend .warning { background: var(--yellow); }
.map-legend .danger { background: var(--red); }

.map-card {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 4;
  width: 326px;
  padding: 16px;
  background: rgba(7, 17, 31, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.map-card small {
  color: var(--cyan);
}

.map-card h3 {
  margin: 8px 0;
}

.map-card p {
  color: var(--text);
}

.map-card div,
.stat-card small {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.map-card .map-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
  color: var(--text);
}

.map-card .map-card-metrics span {
  padding: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: 6px;
}

.map-card .map-card-metrics b {
  display: block;
  margin-bottom: 3px;
  font-size: 18px;
}

.map-project-list {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 4;
  width: 292px;
  max-height: 246px;
  overflow: auto;
  padding: 12px;
  background: rgba(7, 17, 31, 0.84);
  border: 1px solid rgba(137, 177, 227, 0.22);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.map-project-list > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.map-project-list strong {
  font-size: 13px;
}

.map-project-list span {
  color: var(--muted);
  font-size: 12px;
}

.map-project-list ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-project-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  padding: 8px;
  color: var(--text);
  background: rgba(23, 40, 66, 0.72);
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
}

.map-project-list button.active {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.14);
}

.map-project-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

@keyframes mapPulse {
  from {
    opacity: 0.9;
    transform: scale(0.96);
  }
  to {
    opacity: 0;
    transform: scale(1.35);
  }
}

.dashboard-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  min-height: 122px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(23, 40, 66, 0.96), rgba(9, 22, 41, 0.96));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin: 9px 0 6px;
  font-size: 34px;
}

.stat-card.hot strong {
  color: var(--red);
}

.compact {
  padding-bottom: 14px;
}

.panel-title h2 {
  margin: 0;
  font-size: 17px;
}

.risk-bars {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.risk-bars div {
  display: grid;
  grid-template-columns: 44px 1fr 42px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.risk-bars b {
  height: 8px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-radius: 99px;
}

.alert-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 16px 0;
  list-style: none;
}

.alert-list li {
  display: grid;
  grid-template-columns: 8px 1fr 44px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.alert-list b {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

.project-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
}

.project-profile {
  position: relative;
  padding: 22px;
}

.status-ribbon {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 9px;
  color: #001b2c;
  background: var(--green);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.project-profile h2 {
  max-width: 190px;
  margin-bottom: 24px;
}

dl {
  margin: 0;
}

dt {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 5px 0 0;
  color: var(--text);
}

.project-main {
  display: grid;
  gap: 18px;
}

.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.small-map {
  position: relative;
  height: 260px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.72) 9%, transparent 9% 100%),
    linear-gradient(140deg, #b9d2df, #e8f0f4);
}

.flag {
  position: absolute;
  top: 42%;
  left: 54%;
  color: var(--red);
  font-size: 34px;
}

.road {
  position: absolute;
  height: 9px;
  background: #f5b957;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 10px;
}

.road-one {
  top: 42%;
  left: -10%;
  width: 120%;
  transform: rotate(-10deg);
}

.road-two {
  top: 63%;
  left: 20%;
  width: 80%;
  transform: rotate(17deg);
}

.small-map em {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 10px;
  color: #07111f;
  background: rgba(255,255,255,0.82);
  border-radius: 4px;
  font-style: normal;
  font-size: 12px;
}

.video-black {
  position: relative;
  display: grid;
  height: 260px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(56,189,248,0.08), transparent),
    #02070d;
}

.video-black span {
  position: absolute;
  top: 12px;
  left: 12px;
  color: var(--muted);
  font-size: 12px;
}

.video-black button,
.camera-card button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.44);
  border-radius: 50%;
}

.data-table-wrap {
  overflow: auto;
  max-width: 100%;
}

.data-table-wrap.tall {
  max-height: calc(100vh - 260px);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: 13px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(137, 177, 227, 0.12);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #b9d5f6;
  background: #142744;
  font-weight: 600;
}

td {
  color: #d4e4f7;
  background: rgba(13, 26, 46, 0.56);
}

tbody tr:nth-child(even) td {
  background: rgba(23, 40, 66, 0.58);
}

.bad {
  color: var(--red);
  font-weight: 700;
}

.warn {
  color: var(--yellow);
  font-weight: 700;
}

.ok {
  color: var(--green);
  font-weight: 700;
}

.page-panel {
  min-height: calc(100vh - 112px);
}

.toolbar-buttons,
.tabs {
  display: flex;
  gap: 8px;
}

.toolbar-buttons button,
.tabs button,
.panel-title > button {
  padding: 0 13px;
}

.filters {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filters select,
.filters input {
  height: 34px;
  color: var(--text);
  background: rgba(7, 17, 31, 0.9);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.raw-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px;
}

.raw-summary article {
  padding: 14px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 6px;
}

.raw-summary span,
.raw-summary strong {
  display: block;
}

.raw-summary span {
  color: var(--muted);
  font-size: 12px;
}

.raw-summary strong {
  margin-top: 6px;
  font-size: 16px;
}

.files-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.file-tree {
  min-height: calc(100vh - 112px);
}

.file-tree ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 16px;
  list-style: none;
}

.file-tree li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  color: #c8dbf2;
  background: rgba(23, 40, 66, 0.58);
  border: 1px solid rgba(137, 177, 227, 0.12);
  border-radius: 6px;
  font-size: 13px;
}

.file-tree .folder {
  color: #fff;
  background: rgba(56, 189, 248, 0.1);
}

.file-tree time {
  color: var(--muted);
  font-size: 12px;
}

.document-viewer {
  min-height: calc(100vh - 112px);
  background: #17212f;
}

.doc-toolbar button {
  min-width: 38px;
}

.paper {
  position: relative;
  width: 620px;
  min-height: 780px;
  margin: 30px auto;
  padding: 64px 70px;
  color: #263241;
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
}

.paper h2 {
  color: #111827;
  text-align: center;
  line-height: 1.5;
}

.paper p {
  margin-top: 22px;
  color: #334155;
  line-height: 2;
  text-indent: 2em;
}

.stamp {
  position: absolute;
  right: 70px;
  bottom: 90px;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  color: rgba(17, 148, 90, 0.82);
  border: 8px solid rgba(17, 148, 90, 0.72);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  transform: rotate(-14deg);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.camera-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  background: #050910;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.camera-card div {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(20deg, rgba(51, 214, 159, 0.18), transparent 32%),
    linear-gradient(160deg, rgba(56, 189, 248, 0.16), transparent 48%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 40px),
    linear-gradient(#263423, #615f4a 42%, #25324a);
  opacity: 0.86;
}

.camera-card:nth-child(2) div {
  background:
    linear-gradient(160deg, rgba(56, 189, 248, 0.15), transparent),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 42px),
    linear-gradient(#26435a, #7b8c91 45%, #303b23);
}

.camera-card:nth-child(3) div {
  background: linear-gradient(#202d38, #695943 48%, #252c18);
}

.camera-card:nth-child(4) div {
  background: linear-gradient(14deg, #2c3642, #7f7a68 48%, #202a35);
}

.camera-card span {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  background: rgba(2, 7, 13, 0.72);
  border-radius: 4px;
  font-size: 12px;
}

.camera-card button {
  position: absolute;
  right: 14px;
  bottom: 14px;
}

.camera-card.live::after {
  position: absolute;
  top: 12px;
  right: 12px;
  content: "LIVE";
  padding: 4px 7px;
  color: #fff;
  background: var(--red);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-width: 220px;
  max-width: 360px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(7, 17, 31, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 7px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ptz-console {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  padding: 0 16px 16px;
}

.ptz-console > div {
  padding: 16px;
  background: rgba(7, 17, 31, 0.58);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.ptz-console h3 {
  margin-bottom: 12px;
  font-size: 15px;
}

.ptz-pad {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-areas:
    ". up ."
    "left center right"
    ". down .";
  gap: 8px;
}

.ptz-pad button,
.preset-list button {
  height: 42px;
  color: var(--text);
  background: rgba(23, 40, 66, 0.88);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ptz-pad button:nth-child(1) { grid-area: up; }
.ptz-pad button:nth-child(2) { grid-area: left; }
.ptz-pad button:nth-child(3) { grid-area: center; }
.ptz-pad button:nth-child(4) { grid-area: right; }
.ptz-pad button:nth-child(5) { grid-area: down; }

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

.preset-list button {
  padding: 0 14px;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .brand div:not(.brand-mark),
  .nav-item span:last-child,
  .sidebar-footer {
    display: none;
  }

  .home-layout,
  .project-layout,
  .files-layout,
  .split-row,
  .video-grid,
  .ptz-console {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    height: auto;
    flex-direction: column;
  }

  .search {
    width: min(100%, 320px);
  }
}
