body { margin: 0; font-family: system-ui, sans-serif; display: flex; }

#location-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#location-list li {
  padding: 16px;
  margin: 8px 0;
  background-color: #3a6a9e;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
#location-list li:hover {
  background-color: #4a7aae;
}
#location-list li.selected {
  background-color: #41b883;
  color: white;
}
#sidebar {
  width: 280px;
  height: 97.3vh;
  overflow-y: auto;
  background-color: #000000;
  padding: 15px;
  border-right: 1px solid #333;
  transition: width 0.3s ease, transform 0.3s ease, padding 0.3s ease, border 0.3s ease;
  transform: translateX(0);
}
#sidebar h3 {
  margin-top: 0;
  color: #ffffff;
  font-size: 18px;
}
#sidebar.collapsed {
  width: 0;
  overflow: hidden;
  padding: 0;
  border: none;
  transform: translateX(-100%);
}
#sidebar.collapsed + #map-container {
  width: 100%;
}
#sidebar-toggle {
  position: fixed;
  top: 10px;
  left: 315px;
  z-index: 1000;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: left 0.3s ease;
}
#sidebar-toggle.hidden {
  left: 10px;
}
#sidebar-toggle:hover {
  background: #f0f0f0;
}
#map-container {
  flex: 1;
  height: 100vh;
  transition: margin-left 0.3s ease;
}
#map { height: 100%; width: 100%; }
#sidebar-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 8px;
}
.sidebar-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: #1a1a1a;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: #999;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.sidebar-tab-btn:hover {
  color: #fff;
  background: #2a2a2a;
}
.sidebar-tab-btn.active {
  color: #fff;
  background: #333;
  border-bottom-color: #41b883;
}
.tab-heading {
  color: #ffffff;
}

#locations-content {
  display: block;
}

#history-content {
  display: none;
}

#sidebar.history-active #locations-content {
  display: none;
}

#sidebar.history-active #history-content {
  display: block;
}

#sidebar.history-active .locations-heading {
  display: none;
}

#sidebar:not(.history-active) .history-heading {
  display: none;
}
.history-card {
  background: #3a6a9e;
  border-radius: 12px;
  padding: 8px;
  margin: 8px 0;
  border-bottom: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.history-card.skipped {
  background: #a8314f;
  color: #888;
  font-style: italic;
}
.history-card-date {
  font-weight: 600;
  font-size: 15px;
  color: #e0e0e0;
  margin-bottom: 6px;
}
.history-card-payer {
  font-weight: 500;
  font-size: 15px;
  color: #ffb53e;
  margin-bottom: 4px;
}
.history-card-restaurant {
  font-size: 17px;
  font-weight: bold;
  color: #ffffff;
}
.history-month-header {
  font-weight: 600;
  font-size: 15px;
  color: #e0e0e0;
  margin: 12px 0 6px 16px;
}
.history-year-header {
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  margin: 16px 0 8px 0;
  padding-left: 4px;
}
.history-empty {
  color: #ccc;
}