* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2c3e50;
  --secondary: #e74c3c;
  --accent: #3498db;
  --success: #27ae60;
  --warning: #f39c12;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --border: #bdc3c7;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: var(--dark);
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.header-logo {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header-text {
  flex: 1;
  text-align: left;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0.3rem 0;
}

.initiative {
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.85;
  margin-top: 0.5rem;
}

.content-wrapper {
  display: flex;
  flex: 1;
  gap: 1px;
  overflow: hidden;
}

.map-section {
  flex: 1;
  position: relative;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

#searchInput {
  flex: 1;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
}

#searchInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-search,
.btn-clear {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-search {
  background-color: var(--accent);
  color: white;
}

.btn-search:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-clear {
  background-color: var(--border);
  color: var(--dark);
}

.btn-clear:hover {
  background-color: #95a5a6;
}

#map {
  flex: 1;
  width: 100%;
  min-height: 500px;
}

.sidebar {
  width: 350px;
  background-color: white;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.form-section,
.points-section {
  padding: 1.5rem;
  border-bottom: 1px solid var(--light);
}

.form-section {
  flex-shrink: 0;
}

.points-section {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

.coordinates {
  background-color: var(--light);
  padding: 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--dark);
  text-align: center;
}

.coordinates.active {
  background-color: #d5f4e6;
  color: var(--success);
  font-weight: 600;
}

.btn-submit {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--secondary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit:enabled {
  background-color: var(--secondary);
}

.btn-submit:enabled:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-submit:disabled {
  background-color: var(--border);
  cursor: not-allowed;
  opacity: 0.6;
}

.points-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.point-item {
  background-color: var(--light);
  padding: 1rem;
  border-radius: 4px;
  border-left: 4px solid var(--accent);
  transition: all 0.3s;
  cursor: pointer;
}

.point-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateX(4px);
}

.point-item.high {
  border-left-color: var(--secondary);
}

.point-item.medium {
  border-left-color: var(--warning);
}

.point-item.low {
  border-left-color: var(--success);
}

.point-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.point-description {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 0.3rem;
}

.point-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--border);
  margin-top: 0.5rem;
}

.severity-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-badge.high {
  background-color: #fadbd8;
  color: var(--secondary);
}

.severity-badge.medium {
  background-color: #fdebd0;
  color: var(--warning);
}

.severity-badge.low {
  background-color: #d5f4e6;
  color: var(--success);
}

.loading {
  text-align: center;
  color: var(--border);
  padding: 1rem;
  font-style: italic;
}

.btn-delete {
  background-color: var(--secondary);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s;
}

.btn-delete:hover {
  background-color: #c0392b;
}

/* Leaflet customizations */
.leaflet-popup-content {
  margin: 0;
  padding: 10px;
}

.leaflet-popup-content p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

.custom-marker {
  background: none;
  border: none;
}

.marker-pin {
  width: 35px;
  height: 35px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  border: 3px solid white;
  position: relative;
}

.marker-emoji {
  transform: rotate(45deg);
  font-size: 18px;
  display: block;
}

.search-marker {
  background: none;
  border: none;
  font-size: 30px;
  text-align: center;
  line-height: 30px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Point item styles */
.point-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.point-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.point-type {
  font-size: 0.85rem;
  color: #7f8c8d;
  font-style: italic;
  margin-bottom: 0.3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: 40vh;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .header-logo {
    width: 120px;
  }

  .header-text {
    text-align: center;
  }

  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 1rem;
  }
}
