* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  background: #0f1419;
  color: #e8eef5;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #1a2129;
  border-bottom: 1px solid #2a3340;
}
header h1 { margin: 0; font-size: 20px; }
.meta { display: flex; gap: 16px; align-items: center; font-size: 14px; color: #9aa6b3; }
.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}
.pill-on { background: #1f6f3d; color: #d4ffd6; }
.pill-off { background: #6b1f1f; color: #ffd4d4; }

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px;
}
.card {
  background: #1a2129;
  border: 1px solid #2a3340;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.card .label { color: #9aa6b3; font-size: 14px; margin-bottom: 6px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.card .value { font-size: 36px; font-weight: 700; }
.mini-btn {
  background: transparent;
  color: #66bb6a;
  border: 1px solid #2a8a4d;
  border-radius: 4px;
  cursor: pointer;
  padding: 0 6px;
  font-size: 12px;
  line-height: 1.6;
}
.mini-btn:hover { background: #1f6f3d; color: white; }
.card.occupied .value { color: #ffb74d; }
.card.available .value { color: #66bb6a; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 24px 24px;
}
.single-panel {
  padding: 0 24px 24px;
}
.single-panel .panel { max-width: 100%; }
.single-panel .panel img {
  max-height: 75vh;
  object-fit: contain;
}
@media (max-width: 900px) {
  .summary { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}
.panel {
  background: #1a2129;
  border: 1px solid #2a3340;
  border-radius: 12px;
  padding: 16px;
}
.panel h2 { margin: 0 0 12px; font-size: 16px; color: #cfd8e3; }
.panel video, .panel img {
  width: 100%;
  background: #000;
  border-radius: 8px;
  display: block;
}
.hint { margin-top: 8px; font-size: 12px; color: #6b7785; }
footer { padding: 12px 24px; color: #6b7785; }

.vehicles-section {
  padding: 0 24px 16px;
}
.section-title {
  font-size: 16px;
  color: #cfd8e3;
  margin: 0 0 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.over-warn { color: #ef5350; font-size: 13px; }
.vehicles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.vehicle-card {
  background: #1a2129;
  border: 1px solid #2a3340;
  border-left: 5px solid #ffb74d;
  border-radius: 10px;
  padding: 10px 14px;
}
.vehicle-card.long-stay { border-left-color: #ef5350; background: #2a1f18; }
.vc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.vc-id { font-size: 14px; color: #9aa6b3; font-weight: bold; }
.vc-cls { font-size: 13px; color: #cfd8e3; }
.vc-duration {
  font-size: 28px;
  font-weight: 700;
  color: #ffb74d;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.vehicle-card.long-stay .vc-duration { color: #ef5350; }
.vc-since { font-size: 11px; color: #6b7785; margin-top: 2px; }

.spaces {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 24px 16px;
}
@media (max-width: 900px) {
  .spaces { grid-template-columns: repeat(2, 1fr); }
}
.space-card {
  background: #1a2129;
  border: 1px solid #2a3340;
  border-left: 6px solid #2a3340;
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 110px;
}
.space-card.is-occupied { border-left-color: #ef5350; background: #2a1a1a; }
.space-card.is-empty { border-left-color: #66bb6a; background: #1a241a; }
.space-card.is-undef { border-left-color: #6b7785; opacity: 0.7; }
.space-card .space-name { font-size: 13px; color: #9aa6b3; margin-bottom: 4px; }
.space-card .space-status { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.space-card.is-occupied .space-status { color: #ef5350; }
.space-card.is-empty .space-status { color: #66bb6a; }
.space-card .space-vehicle { font-size: 14px; color: #cfd8e3; }
.space-card .space-duration {
  font-size: 22px;
  font-weight: 700;
  color: #ffb74d;
  font-variant-numeric: tabular-nums;
}
.space-card .space-since { font-size: 11px; color: #6b7785; }
.empty-msg {
  grid-column: 1 / -1;
  padding: 16px;
  background: #2a2418;
  border: 1px solid #5a4a20;
  border-radius: 8px;
  color: #ffd54f;
  font-size: 14px;
  text-align: center;
}
.edit-link {
  color: #66bb6a;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #2a8a4d;
  border-radius: 6px;
  font-size: 13px;
}
.edit-link:hover { background: #1f6f3d; color: white; }
