/* FixLA Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #f5f5f5;
  color: #1f2937;
  line-height: 1.5;
}

/* Header */
.header {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  height: 60px;
}

.header-content {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #3b82f6;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-small {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

#userName {
  font-size: 14px;
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.profile-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, transform 0.1s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2563eb;
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #d1d5db;
}

.btn-success {
  background-color: #22c55e;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background-color: #16a34a;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  padding: 8px 12px;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-icon:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.btn-icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-icon.btn-primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.btn-icon.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

/* Desktop/Mobile visibility */
.mobile-only {
  display: none;
}

@media (max-width: 600px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }

  .btn-icon .btn-text {
    display: none;
  }

  .btn-icon {
    padding: 8px;
  }

  .btn-icon-svg {
    width: 20px;
    height: 20px;
  }
}

/* Report button - always show text */
.btn-report {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
}

.btn-text-always {
  font-size: 14px;
  font-weight: 500;
}

/* Mobile Drawer */
.drawer-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.show {
  display: block;
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: white;
  z-index: 1001;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.drawer.show {
  left: 0;
}

/* Menu button on left side of header */
.menu-btn-left {
  margin-right: 4px;
  flex-shrink: 0;
}

/* On mobile, logo sits right next to menu button */
@media (max-width: 600px) {
  .logo {
    margin-right: auto;
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.drawer-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.drawer-close:hover {
  color: #374151;
}

.drawer-nav {
  padding: 12px 0;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: none;
  font-size: 16px;
  color: #374151;
  cursor: pointer;
  text-align: left;
}

.drawer-item:hover {
  background: #f3f4f6;
}

.drawer-item:active {
  background: #e5e7eb;
}

.drawer-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.drawer-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-footer-link {
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
}

.drawer-footer-link:hover {
  color: #374151;
}

/* Main Content */
.main {
  padding-top: 60px;
  height: 100vh;
  position: relative;
}

/* Map */
#map {
  width: 100%;
  height: calc(100vh - 60px);
}

/* Custom Markers */
.custom-marker {
  background: transparent;
  border: none;
}

.marker-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.marker-pin.temp {
  animation: pulse 1.5s infinite;
}

.verified-check {
  transform: rotate(45deg);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Filter Bar */
.filter-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: white;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 500;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100% - 32px);
}

.filter-btn {
  padding: 8px 12px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.filter-btn:hover {
  background: #e5e7eb;
}

.filter-btn.active {
  background: #3b82f6;
  color: white;
}

.marker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.marker-dot.red { background-color: #ef4444; }
.marker-dot.yellow { background-color: #eab308; }
.marker-dot.green { background-color: #22c55e; }
.marker-dot.blue { background-color: #3b82f6; }

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
}

.modal-close:hover {
  color: #374151;
}

/* Form */
#reportForm {
  padding: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Category Select */
.category-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.category-option {
  cursor: pointer;
}

.category-option input {
  display: none;
}

.category-label {
  display: block;
  padding: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s, background-color 0.2s;
}

.category-option input:checked + .category-label {
  border-width: 2px;
}

.category-label.red {
  color: #dc2626;
}
.category-option input:checked + .category-label.red {
  background: #fef2f2;
  border-color: #ef4444;
}

.category-label.yellow {
  color: #ca8a04;
}
.category-option input:checked + .category-label.yellow {
  background: #fefce8;
  border-color: #eab308;
}

.category-label.green {
  color: #16a34a;
}
.category-option input:checked + .category-label.green {
  background: #f0fdf4;
  border-color: #22c55e;
}

.category-label.blue {
  color: #2563eb;
}
.category-option input:checked + .category-label.blue {
  background: #eff6ff;
  border-color: #3b82f6;
}

/* Photo Upload */
.photo-upload {
  position: relative;
}

.photo-buttons {
  display: flex;
  gap: 8px;
}

.photo-buttons .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Hide capture button on desktop */
.photo-buttons .mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .photo-buttons .mobile-only {
    display: flex;
  }
}

.photo-preview {
  margin-top: 8px;
}

.photo-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
}

/* Location Input */
.location-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Address Input with Autocomplete */
.address-input-wrapper {
  position: relative;
}

.address-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f3f4f6;
}

.suggestion-item.no-results {
  color: #6b7280;
  font-style: italic;
  cursor: default;
}

.suggestion-item.no-results:hover {
  background: white;
}

.location-status {
  font-size: 13px;
  color: #6b7280;
  word-break: break-word;
  margin-top: 6px;
}

.location-status.success {
  color: #16a34a;
}

.location-status.error {
  color: #dc2626;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

/* Report Detail Panel */
.report-detail {
  position: fixed;
  top: 60px;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: white;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow-y: auto;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: white;
}

.detail-header h3 {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.verified {
  background: #dcfce7;
  color: #166534;
}

.status-badge.resolved {
  background: #dbeafe;
  color: #1e40af;
}

.detail-content {
  padding: 16px;
}

.detail-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
}

.detail-info {
  margin-top: 16px;
}

.detail-info p {
  font-size: 14px;
  color: #374151;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.detail-reporter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

/* Verification Section */
.verification-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.verification-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.verification-counts {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
}

.verify-actions {
  display: flex;
  gap: 12px;
}

.verify-actions .btn {
  flex: 1;
}

.verify-message {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 640px) {
  .header-content {
    padding: 0 12px;
  }

  #userName {
    display: none;
  }

  .filter-bar {
    bottom: 16px;
    padding: 6px;
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .report-detail {
    width: 100%;
    max-width: none;
  }

  .modal-content {
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Leaflet Overrides */
.leaflet-container {
  font-family: inherit;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.leaflet-control-zoom {
  border-radius: 8px !important;
  overflow: hidden;
  margin-top: 70px !important;
}

.leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
}

/* County boundary label */
.county-label {
  background: transparent;
  border: none;
}

.county-label span {
  background: rgba(59, 130, 246, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Footer Links */
.footer-links {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #6b7280;
  z-index: 400;
}

.footer-links a {
  color: #6b7280;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links .separator {
  margin: 0 8px;
}

/* My Reports Modal */
.modal-wide {
  max-width: 600px;
}

.my-reports-list {
  padding: 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.my-report-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.my-report-item:hover {
  background: #f9fafb;
}

.my-report-item:last-child {
  margin-bottom: 0;
}

.my-report-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.my-report-info {
  flex: 1;
  min-width: 0;
}

.my-report-category {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  text-transform: capitalize;
}

.my-report-address {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-report-meta {
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  gap: 8px;
  align-items: center;
}

.my-reports-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.loading-text {
  text-align: center;
  color: #6b7280;
  padding: 20px;
}

/* Clickable elements */
.avatar.clickable,
.clickable {
  cursor: pointer;
  transition: opacity 0.2s;
}

.avatar.clickable:hover,
.clickable:hover {
  opacity: 0.8;
}

/* Profile Modal */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  margin: 16px;
  margin-bottom: 0;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e7eb;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-email {
  font-size: 14px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-privacy-note {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin: 12px 16px 0;
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 6px;
}

.profile-section {
  padding: 16px;
}

.profile-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

/* Profile Edit View */
.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  margin: 16px;
  margin-bottom: 0;
  background: #f9fafb;
  border-radius: 8px;
}

.profile-avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid #e5e7eb;
}

.profile-avatar-actions {
  display: flex;
  gap: 8px;
}

#editProfileForm .form-group {
  padding: 0 16px;
}

#editProfileForm .form-actions {
  margin: 16px;
  margin-top: 8px;
}

.form-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.form-group input[type="text"]:disabled,
.form-group input[type="email"]:disabled {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1f2937;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 4000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Reputation & Points */
.profile-reputation {
  margin-top: 4px;
  font-size: 14px;
  color: #6b7280;
}

.reputation-points {
  font-weight: 700;
  color: #3b82f6;
  font-size: 16px;
}

.profile-rank {
  margin-left: 12px;
  padding: 2px 8px;
  background: #fef3c7;
  border-radius: 12px;
  font-weight: 700;
  color: #92400e;
  font-size: 14px;
}

/* Profile Stats */
.profile-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 12px 0;
}

.stat-item {
  text-align: center;
  min-width: 70px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
}

/* Badges */
.badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 13px;
}

.badge-icon {
  font-size: 16px;
}

.badge-name {
  font-weight: 500;
  color: #374151;
}

.no-badges-text {
  color: #9ca3af;
  font-size: 14px;
  font-style: italic;
  padding: 12px 0;
}

/* Badge category colors */
.badge-item.reporting {
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.badge-item.verifying {
  background: #dcfce7;
  border: 1px solid #86efac;
}

.badge-item.fixing {
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

/* Rate Limit Warning */
.rate-limit-warning {
  padding: 10px 16px;
  background: #fef3c7;
  border-bottom: 1px solid #fcd34d;
  font-size: 13px;
  color: #92400e;
  text-align: center;
}

.rate-limit-warning.danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* Fix Section */
.fix-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.fix-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.fix-prompt {
  font-size: 14px;
  color: #374151;
  margin-bottom: 12px;
}

.fix-form .photo-upload {
  margin-bottom: 12px;
}

.fix-form .form-group {
  margin-bottom: 12px;
}

.fix-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.fix-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fix-info {
  background: #f0fdf4;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #86efac;
}

.fix-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #166534;
  margin-bottom: 12px;
}

.fix-date {
  margin-left: auto;
  color: #6b7280;
  font-size: 12px;
}

.fix-photo {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}

.fix-notes {
  font-size: 13px;
  color: #374151;
  font-style: italic;
}

.fix-message {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
  margin-top: 8px;
}

/* New Badge Toast */
.toast.badge-toast {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast .badge-icon {
  font-size: 24px;
}

/* Leaderboard */
.leaderboard-content {
  padding: 16px;
}

.leaderboard-list {
  max-height: 60vh;
  overflow-y: auto;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #f9fafb;
  transition: background-color 0.2s;
}

.leaderboard-item:hover {
  background: #f3f4f6;
}

.leaderboard-item.top-3 {
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  border: 1px solid #fcd34d;
}

.leaderboard-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #6b7280;
  background: #e5e7eb;
  border-radius: 50%;
  flex-shrink: 0;
}

.leaderboard-item.top-3 .leaderboard-rank {
  background: #f59e0b;
  color: white;
}

.leaderboard-item:first-child .leaderboard-rank {
  background: #fbbf24;
  font-size: 16px;
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
  background: #9ca3af;
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
  background: #cd7f32;
}

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-stats {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.leaderboard-points {
  font-weight: 700;
  font-size: 16px;
  color: #3b82f6;
  flex-shrink: 0;
}

.leaderboard-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

/* Stats Page */
.stats-content {
  padding: 16px;
}

.stats-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats-section {
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px;
}

.stats-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stats-grid.four-col {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 480px) {
  .stats-grid.four-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  border: 1px solid #e5e7eb;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  display: block;
}

.stat-card .stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.stat-card.encampment { border-left: 4px solid #ef4444; }
.stat-card.graffiti { border-left: 4px solid #eab308; }
.stat-card.trash { border-left: 4px solid #22c55e; }
.stat-card.pothole { border-left: 4px solid #3b82f6; }

.stat-card.pending { border-left: 4px solid #f59e0b; }
.stat-card.verified { border-left: 4px solid #22c55e; }
.stat-card.resolved { border-left: 4px solid #3b82f6; }

/* Stats Modal - Number cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* Stats Modal - Sections */
.stats-section {
  margin-bottom: 24px;
}

.stats-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

/* Stats Modal - Bar charts */
.stats-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-bar-label {
  width: 90px;
  font-size: 13px;
  color: #4b5563;
  flex-shrink: 0;
}

.stat-bar-container {
  flex: 1;
  height: 20px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  min-width: 2px;
}

.stat-bar.encampment { background: #ef4444; }
.stat-bar.graffiti { background: #eab308; }
.stat-bar.trash { background: #22c55e; }
.stat-bar.pothole { background: #3b82f6; }
.stat-bar.pending { background: #f59e0b; }
.stat-bar.verified { background: #22c55e; }
.stat-bar.resolved { background: #3b82f6; }

.stat-bar-value {
  width: 40px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-align: right;
  flex-shrink: 0;
}

/* Stats Modal - Activity */
.activity-stats {
  display: flex;
  gap: 24px;
}

.activity-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.activity-number {
  font-size: 24px;
  font-weight: 700;
  color: #2563eb;
}

.activity-label {
  font-size: 13px;
  color: #6b7280;
}

/* Stats Modal - Top Contributors */
.top-contributors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contributor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f9fafb;
  border-radius: 6px;
}

.contributor-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  background: #6b7280;
  border-radius: 50%;
  flex-shrink: 0;
}

.contributor-item:nth-child(1) .contributor-rank { background: #fbbf24; }
.contributor-item:nth-child(2) .contributor-rank { background: #9ca3af; }
.contributor-item:nth-child(3) .contributor-rank { background: #cd7f32; }

.contributor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.contributor-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.contributor-points {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
}

.stats-error {
  text-align: center;
  padding: 40px;
  color: #6b7280;
}

.mini-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-leader-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.mini-leader-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  background: #6b7280;
  border-radius: 50%;
  flex-shrink: 0;
}

.mini-leader-item:nth-child(1) .mini-leader-rank { background: #fbbf24; }
.mini-leader-item:nth-child(2) .mini-leader-rank { background: #9ca3af; }
.mini-leader-item:nth-child(3) .mini-leader-rank { background: #cd7f32; }

.mini-leader-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.mini-leader-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-leader-points {
  font-weight: 600;
  font-size: 14px;
  color: #3b82f6;
}
