body {
margin: 0;
font-family: 'Segoe UI', Arial, sans-serif;
background: #f8f9fa;
}

#main-layout {
display: flex;
height: 650px;
min-height: 500px;
}

#container {
display: flex;
flex-direction: row;
flex: 1;
min-width: 0;
height: 650px;
max-height: none;
}

#sidebar {
width: 300px;
background: #fff;
padding: 20px 18px 20px 18px;
border-right: 1px solid #e0e0e0;
box-shadow: 2px 0 8px rgba(0,0,0,0.04);
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
border-radius: 0 12px 12px 0;
}

#sidebar h2 {
margin-top: 0;
font-size: 1.3rem;
color: #2a3a4b;
letter-spacing: 1px;
margin-bottom: 18px;
}

#field-list {
flex: 1;
overflow-y: auto;
}

.field-item {
padding: 10px 14px;
margin: 7px 0;
background: #f6f8fc;
border: 1px solid #e3e7ed;
border-radius: 6px;
cursor: pointer;
box-shadow: 0 1px 2px rgba(0,0,0,0.03);
transition: background 0.2s, box-shadow 0.2s;
font-size: 1rem;
color: #2a3a4b;
display: flex;
align-items: center;
}

.field-item:hover {
background: #e6f0ff;
box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

#map {
flex: 1;
width: 100%;
height: 650px;
min-height: 0;
border-radius: 12px 0 0 12px;
box-shadow: 0 2px 12px rgba(0,0,0,0.04);
position: relative;
}

/* Info-Boxen unter der Karte */
#info-boxes {
display: flex;
justify-content: center;
gap: 24px;
margin: 24px auto 0 auto;
max-width: 1200px;
padding: 0 16px;
}

.info-box {
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 12px rgba(0,0,0,0.07);
border: 1px solid #e3e7ed;
min-width: 180px;
flex: 1;
padding: 18px 22px;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
font-size: 1.1rem;
color: #2a3a4b;
transition: box-shadow 0.2s;
}

.info-box-title {
font-size: 0.95rem;
color: #6c7a89;
margin-bottom: 7px;
font-weight: 500;
letter-spacing: 0.5px;
}

.info-box-value {
font-size: 1.35rem;
font-weight: 600;
color: #1a2a3a;
}

@media (max-width: 900px) {
#info-boxes {
    flex-direction: column;
    gap: 16px;
    max-width: 98vw;
}

.info-box {
    min-width: unset;
    width: 100%;
}
}

/* Notebook Panel rechts neben der Karte */
#notebook-panel {
  width: 420px;
  background: #fff;
  border-left: 1px solid #e0e0e0;
  box-shadow: -2px 0 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  border-radius: 12px 0 0 12px;
  padding: 0;
  min-width: 320px;
}
#notebook-tabs {
  display: flex;
  border-bottom: 1px solid #e3e7ed;
  background: #f6f8fc;
  border-radius: 0 12px 0 0;
}
.notebook-tab {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  cursor: pointer;
  font-size: 1.05rem;
  color: #2a3a4b;
  border: none;
  background: none;
  outline: none;
  transition: background 0.2s;
}
.notebook-tab.active {
  background: #fff;
  font-weight: 600;
  color: #1a2a3a;
  border-bottom: 2px solid #2a3a4b;
}
.notebook-content {
  padding: 18px 22px;
  flex: 1;
  overflow-y: auto;
}
@media (max-width: 1200px) {
  #notebook-panel {
    display: none;
  }
}
table.overview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
}
table.overview-table th, table.overview-table td {
  border: none;
  padding: 14px 18px;
  text-align: left;
  font-size: 1.05rem;
}
table.overview-table th {
  background: #f0f4fa;
  font-weight: 600;
  color: #2a3a4b;
  border-bottom: 2px solid #e3e7ed;
}
table.overview-table tbody tr {
  transition: background 0.2s;
}
table.overview-table tbody tr:hover {
  background: #e6f0ff;
}
table.overview-table td {
  color: #1a2a3a;
  border-bottom: 1px solid #e3e7ed;
}
table.overview-table tbody tr:last-child td {
  border-bottom: none;
}

/* Aktivitäten-Kästchen im Notebook */
.activities-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}
.activity-box {
  background: #f4f4f6;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border: 1px solid #e3e7ed;
  padding: 16px 22px;
  font-size: 1.08rem;
  color: #2a3a4b;
  font-weight: 500;
  transition: box-shadow 0.2s, background 0.2s;
}
.activity-box:hover {
  background: #e6f0ff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

/* Notification bell on the map */
#map { position: relative; }
.map-notification {
  position: absolute;
  top: 14px;
  left: 58px; /* placed to the right of Leaflet zoom controls */
  right: auto;
  z-index: 1400; /* above leaflet controls */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  border: 1px solid rgba(34,47,63,0.06);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.map-notification:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}
.map-notification .bell {
  display: block;
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-notification .badge {
  position: absolute;
  /* place badge near the top-right of the bell icon */
  top: -6px;
  left: calc(8px + 20px - 6px); /* padding-left (8px) + bell svg width (20px) - small overlap */
  right: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ff4d4f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.notification-panel {
  position: absolute;
  top: 54px;
  left: 58px; /* align panel under the bell */
  right: auto;
  z-index: 1400;
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: 380px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.14);
  border: 1px solid rgba(34,47,63,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notification-header {
  padding: 12px 14px;
  font-weight: 700;
  color: #1a2a3a;
  border-bottom: 1px solid #eef2f6;
  background: linear-gradient(180deg, #fbfdff, #ffffff);
}
.notification-list {
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notification-item {
  background: #f6f8fc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #22323f;
  border: 1px solid #e6eef6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.notification-item strong { display:block; font-weight:700; margin-bottom:4px; }
.notification-empty { color: #6c7a89; padding: 12px; text-align: center; }

/* Stylish primary button for Route berechnen in the sidebar */
#button_calculate_route {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 25%; /* full width of sidebar */
  margin-top: 12px; /* added top spacing */
  padding: 14px 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, #3b82f6 0%, #1e3a8a 100%); /* blue gradient */
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(30,58,138,0.18), inset 0 -2px 8px rgba(255,255,255,0.04);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  text-transform: none;
}
#button_calculate_route:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(30,58,138,0.20);
}
#button_calculate_route:active {
  transform: translateY(-1px) scale(0.998);
}
#button_calculate_route:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.18);
}

/* small screen tweak */
@media (max-width: 900px) {
  #button_calculate_route {
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: 8px;
  }
}

/* Weather info box styling */
#weather-box {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border: 1px solid rgba(34,47,63,0.06);
}
#weather-box .weather-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff7eb, #fff1c9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 6px 18px rgba(255,165,0,0.12);
}
#weather-temp {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a2a3a;
}
#weather-desc {
  margin-top: 2px;
}

@media (max-width: 900px) {
  #weather-box { order: 99; width: 100%; }
}

/* Styles for parcel control button */
.leaflet-parcel-control {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

.leaflet-parcel-control a {
  display: block;
  background: white;
  color: #333;
  transition: all 0.2s ease;
}

.leaflet-parcel-control a:hover {
  background: #f4f4f4;
  transform: scale(1.05);
}

/* Parcel tooltip styling */
.leaflet-tooltip.parcel-tooltip {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}