:root {
  color: #f0f5fa;
  background: #07090d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #07090d;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  padding: 28px 20px;
  background: #0a0d12;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  letter-spacing: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #d6ff3f;
}

.venue-selector,
.edge-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  border-radius: 12px;
  padding: 12px 14px;
}

.venue-selector {
  background: #11161e;
}

.venue-selector span,
.edge-status span,
.metric-card span,
.current-event .eyebrow {
  color: #7a879c;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.venue-selector strong {
  margin-top: 4px;
  font-size: 14px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  color: #a6b0bf;
  font-size: 13px;
}

.nav-item.active {
  color: #f0f7e5;
  background: #1f262e;
  font-weight: 700;
}

.nav-item span,
.live-label::before,
.metric-card small::before,
.edge-status strong::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #607086;
  content: "";
}

.nav-item.active span,
.live-label::before,
.metric-card small::before,
.edge-status strong::before {
  background: #45e894;
}

.sidebar-spacer {
  flex: 1;
}

.edge-status {
  gap: 5px;
  background: #0c1c16;
}

.edge-status span {
  color: #73cca1;
}

.edge-status strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #bdf2d1;
  font-size: 12px;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1256px;
  padding: 24px 32px 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

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

.topbar h1 {
  font-size: 24px;
  line-height: 1.2;
}

.topbar p {
  margin-top: 3px;
  color: #7a879c;
  font-size: 11px;
}

.actions {
  display: flex;
  gap: 10px;
}

.actions button,
.event-actions a {
  min-height: 35px;
  border-radius: 8px;
  padding: 10px 14px;
  background: #11161e;
  color: #d4dbe5;
  font-size: 12px;
  font-weight: 700;
}

.actions .command,
.event-actions a:first-child {
  background: #d6ff3f;
  color: #0d1208;
}

.current-event,
.venue-overview,
.metric-card,
.system-card,
.activity-panel {
  border: 1px solid #1a212a;
  border-radius: 8px;
  background: #0c1015;
}

.current-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px;
}

.current-event .eyebrow {
  color: #d6ff3f;
}

.current-event h2 {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.15;
}

.event-meta,
.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.event-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  background: #11161e;
  color: #aeb8c7;
  font-size: 12px;
}

.event-status {
  align-self: stretch;
  min-width: 144px;
  border-radius: 8px;
  padding: 14px;
  background: #11161e;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: #2b2030;
  color: #f5ad4a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill[data-status="live"] {
  background: #0c2d1d;
  color: #45e894;
}

.event-status strong {
  display: block;
  margin-top: 18px;
  font-size: 38px;
  line-height: 1;
}

.event-status small {
  display: block;
  margin-top: 5px;
  color: #7d8a9c;
  font-size: 11px;
}

.event-actions {
  grid-column: 1 / -1;
}

.venue-overview {
  padding: 18px 20px;
}

.live-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8ce8b0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.venue-overview h2 {
  margin-top: 10px;
  font-size: 21px;
}

.venue-overview p:last-child {
  margin-top: 10px;
  color: #9ca8ba;
  font-size: 12px;
}

.metrics-grid,
.systems-grid,
.activity-grid {
  display: grid;
  gap: 12px;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  min-height: 112px;
  padding: 14px 16px;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.metric-card small {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: #63d194;
  font-size: 10px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: 16px;
}

.section-heading span {
  color: #738094;
  font-size: 11px;
}

.systems-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-card {
  min-height: 160px;
  padding: 16px;
}

.system-card header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.system-card h3 {
  font-size: 14px;
}

.system-card header span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.system-card p {
  margin-top: 10px;
  color: #808c9e;
  font-size: 10px;
}

.system-card strong {
  display: block;
  margin-top: 22px;
  color: #d1e0e8;
  font-size: 18px;
}

.system-card div {
  height: 4px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--accent);
}

.audio { --accent: #946bff; }
.lighting { --accent: #d6ff3f; }
.video { --accent: #2eb8f2; }
.network { --accent: #45e894; }
.power { --accent: #f5ad4a; }
.building { --accent: #38d1c7; }

.activity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-panel {
  padding: 16px;
}

.activity-panel h2 {
  font-size: 14px;
}

.activity-panel ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.activity-panel li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  min-height: 49px;
  border-radius: 8px;
  padding: 8px 10px;
  background: #0f131a;
}

.activity-panel strong {
  overflow: hidden;
  color: #dee5f0;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-panel span,
.activity-panel small {
  color: #6e7a8c;
  font-size: 9px;
}

.activity-panel small {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-spacer {
    display: none;
  }

  .main {
    padding: 20px;
  }

  .metrics-grid,
  .systems-grid,
  .activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .current-event,
  .metrics-grid,
  .systems-grid,
  .activity-grid,
  .nav-list {
    grid-template-columns: 1fr;
  }

  .event-status {
    min-width: 0;
  }
}
