:root {
  --bg: #eef1e8;
  --panel: rgba(255, 250, 241, 0.92);
  --panel-border: rgba(50, 60, 44, 0.12);
  --text: #1d2a1d;
  --muted: #5f6d5f;
  --accent: #255f4a;
  --accent-soft: #dcebe4;
  --warn: #9f4d37;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(53, 126, 91, 0.18), transparent 26%),
    linear-gradient(135deg, #f7f1e7, #e6ede2);
}

body {
  min-height: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--panel-border);
  overflow-y: auto;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
}

.panel-header h1,
.side-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.subtle {
  color: var(--muted);
}

.device-list,
.device-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.device-card {
  border: 1px solid rgba(37, 95, 74, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.device-card:hover,
.device-card.active {
  transform: translateY(-1px);
  border-color: rgba(37, 95, 74, 0.5);
  box-shadow: 0 12px 30px rgba(26, 52, 36, 0.12);
}

.device-card .title-row,
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.label {
  color: var(--muted);
}

.value.strong {
  font-weight: 600;
}

.empty-state {
  color: var(--muted);
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.map-panel {
  position: relative;
}

#map {
  width: 100%;
  height: 100vh;
}

.map-overlay {
  position: absolute;
  z-index: 500;
  top: 18px;
  left: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(29, 42, 29, 0.75);
  color: #fff;
  backdrop-filter: blur(12px);
}

.history-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 50vh;
  }

  .side-panel {
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
  }

  #map {
    height: 50vh;
  }
}
