:root {
  --primary-color: rgb(39, 68, 114);
  --secondary-color: rgb(100, 125, 153);
  --primary-gradient: linear-gradient(to top, rgb(39, 68, 114) 0%, rgb(100, 125, 153) 100%);
  --primary-gradient-hover: linear-gradient(135deg, rgb(147, 197, 253) 0%, rgb(30, 58, 138) 100%);
  --primary-gradient-header: linear-gradient(135deg, rgb(30, 58, 138) 0%, rgb(147, 197, 253) 100%);
  --primary-color-hover: rgb(147, 197, 253);
  --primary-button-color: rgb(1, 72, 152);
  --primary-button-gradient: linear-gradient(135deg, rgb(0, 50, 120) 0%, rgb(1, 72, 152) 100%);
  --dark-gradient: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --accent-color: rgb(147, 197, 253);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --info-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --glass-bg-header: rgba(255, 255, 255, 0.85);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    background-color: #f5f5f5;
  }

  .container-map-custom {
    max-width: 1444px;
    margin: 0 auto;
    position: relative;
  }
  

  
  .map-container {
    height: 130vh;
    max-height: 850px;
    position: relative;
  }
  
  .filters-container {
    overflow-y: auto;
  }
  

  .map-zoom-tooltip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    max-width: 90%;
    word-wrap: break-word;
  }
  
  .map-zoom-tooltip.show {
    opacity: 1;
  }
  
  .map-zoom-tooltip i {
    margin-right: 8px;
    color: var(--primary-color);
  }

  .submit_custom_map {
    display: none;
  }
  
  /* Responsive for mobile*/
  @media (max-width: 768px) {
    .map-zoom-tooltip {
      font-size: 0.9rem;
      padding: 12px 16px;
      max-width: 85%;
    }
    
    .zoom-controls {
      position: absolute;
      top: 10px;
      right: 5px;
      z-index: 1000;
    }
    
    .zoom-btn {
      font-size: 0.7rem;
      padding: 4px 8px;
      min-width: 80px;
    }
    
    .filters-container {
      max-height: 70vh;
    }
    
    .filter-group {
      max-height: 300px;
    }
    .submit_custom_map {
      display: block;
    }
  }
  
  /* Styles for statistics */
  .statistics-section {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .stat-card {
    transition: transform 0.2s ease;
  }
  
  .stat-card:hover {
    transform: translateY(-2px);
  }
  
  .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
  }
  
  .stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
  }
  
  .stats-categories,
  .stats-raions,
  .stats-localities {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e9ecef;
  }
  
  .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
  }
  
  .stat-item:last-child {
    border-bottom: none;
  }
  
  .stat-item-name {
    font-weight: 500;
    color: #495057;
    flex: 1;
  }
  
  .stat-item-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
  }
  
  .stat-item-percentage {
    color: #6c757d;
    font-size: 0.75rem;
    margin-left: 8px;
  }
  
  .statistics-loading {
    padding: 20px;
  }
  
  .statistics-loading .spinner-border {
    margin-bottom: 10px;
  }
  
  #leaflet-map {
    height: 100%;
    width: 100%;
  }

  
  .map-title {
    background-color: #edeff1;
    border: 1px solid #c4c5c7;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
  }
  
  .total-count {
    font-size: 2rem;
    font-weight: 900;
    color: #000000;
    
  }
  
  .zoom-controls {
    position: absolute;
    top: 60px;
    right: 10px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  
  .zoom-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
  }
  
  .zoom-btn:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-1px);
  }
  
  .zoom-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
  }
  
  .filters-header {
    background: var(--primary-gradient);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
  }
  
  .filter-section {
    background: #f8f9fa;
    border: 1px solid #c4c5c7;
  }
  
  .filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #495057;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  
  .filter-title .btn-clear {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 15px;
    transition: all 0.3s ease;
  }
  
  .filter-title .btn-clear:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    color: white;
  }
  
  .filter-group {
    max-height: 500px;
    overflow-y: auto;
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
  }
  
  /* Category Group Headers for filter*/
  .category-group-header {
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .category-group-header h6 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
  }
  
  .category-group-header h6 i {
    font-size: 1rem;
  }
  
  .category-group-header .text-primary {
    border-left-color: #0d6efd;
    color: #0d6efd !important;
  }
  
  .category-group-header .text-success {
    border-left-color: #198754;
    color: #198754 !important;
  }
  
  .category-main {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
  }
  
  .category-main:hover {
    background-color: #e9ecef;
  }
  
  .category-main.expanded {
    background-color: #e3f2fd;
    border-bottom: 2px solid var(--primary-color);
  }
  
  .category-checkbox {
    transform: scale(1.2);
    margin: 0;
  }
  
  .category-expand-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: #666;
    min-width: 12px;
  }
  
  .category-expand-icon.expanded {
    transform: rotate(90deg);
  }
  
  .category-label {
    flex: 1;
    font-weight: 600;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .category-count {
    background: var(--primary-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 30px;
    text-align: center;
  }
  
  .subcategories {
    display: none;
    background: white;
    border-bottom: 1px solid #e9ecef;
  }
  
  .subcategories.expanded {
    display: block;
  }
  
  .subcategory-item {
    display: flex;
    align-items: center;
    padding: 8px 15px 8px 45px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
  }
  
  .subcategory-item:last-child {
    border-bottom: none;
  }
  
  .subcategory-item:hover {
    background-color: #f8f9fa;
  }
  
  .subcategory-checkbox {
    margin-right: 10px;
    transform: scale(1.1);
  }
  
  .subcategory-label {
    flex: 1;
    font-size: 0.9rem;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .subcategory-count {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
  }
  
  .filter-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
  }
  
  .filter-item:last-child {
    border-bottom: none;
  }
  
  .filter-item:hover {
    background-color: #f8f9fa;
    border-radius: 6px;
  }
  
  .filter-checkbox {
    margin-right: 10px;
    transform: scale(1.2);
  }
  
  .filter-label {
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .filter-count {
    background: var(--primary-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 25px;
    text-align: center;
  }
  
  .btn-apply {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .btn-apply:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    color: white;
  }
  
  .btn-clear {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .btn-clear:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    color: white;
  }
  
  .stats-section {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    color: white;
    border-radius: 10px;
  }
  
  .stats-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
  }
  
  .stat-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    /* text-align: center; */
  }
  
  .stat-number {
    font-size: 1.5rem;
    font-weight: 900;
    display: block;
  }
  
  .stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
  }
  
  .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
  }
  
  .loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Custom marker clusters */
  /* .custom-cluster-small {
    background-color: rgba(220, 53, 69, 0.6);
    border: 2px solid rgba(220, 53, 69, 0.8);
  } */
  
  .custom-cluster-small div {

    color: white;
    font-weight: bold;
  }
  
  
  .custom-cluster-medium div {
    /* background-color: rgba(220, 53, 69, 0.9); */
    color: white;
    font-weight: bold;
  }

  
  .custom-cluster-large div {
    /* background-color: rgba(220, 53, 69, 1); */
    color: white;
    font-weight: bold;
  }

  .leaflet-control-attribution a[href*="leaflet"] {
    display: none !important;
  }
  
  /* Styles for incident modal */
  .incident-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
    transition: box-shadow 0.3s ease;
  }
  
  .incident-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  
  .incident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .incident-code {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
  }
  
  .incident-date {
    color: #6c757d;
    font-size: 0.85rem;
  }
  
  .incident-address {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
  
  .incident-description {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
  }
  
  .incident-details-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .incident-details-btn:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-1px);
    color: white;
  }
  
  .incident-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  .incident-status.new {
    background: #ffc107;
    color: #212529;
  }
  
  .incident-status.processed {
    background: #17a2b8;
    color: white;
  }
  
  .incident-status.validated {
    background: #28a745;
    color: white;
  }
  
  .incident-status.rejected {
    background: #dc3545;
    color: white;
  }
  
  #incidentDetailsModal .modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
  }
  
  #incidentDetailsModal .btn-close {
    filter: invert(1);
  }

  .banner-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 35px;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.banner-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.btn-observer {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-observer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-observer:hover::before {
    left: 100%;
}

.btn-observer:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(220, 53, 69, 0.4);
    color: white;
    text-decoration: none;
}

.btn-observer:active {
    transform: translateY(0);
}

.incident-category {
    color: var(--primary-color);
}