    html, body {
      margin: 0; padding: 0;
      height: 100vh;
      font-family: Arial, sans-serif;
      display: flex;
      flex-direction: column;
    }
    #map {
      flex-grow: 1;
      width: 100%;
      position: relative;
    }
    /* Panel ostrzeżeń po lewej */
    #alertsPanel {
      position: fixed;
      top: 80px;
      left: 200px;
      width: 400px;
      max-height: 80vh;
      overflow-y: auto;
      background: white;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
      padding: 15px;
      z-index: 7000;
      font-size: 15px;
    }
    #alertsPanel h4 {
      margin-top: 0;
      margin-bottom: 10px;
      font-weight: bold;
      font-size: 18px;
      color: #004080;
      text-align: center;
    }
    .alertItem {
      padding: 10px 12px;
      border-radius: 6px;
      margin-bottom: 12px;
      box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
      cursor: default;
    }
    .alertItem:hover {
      box-shadow: inset 0 0 12px rgba(0,0,0,0.15);
    }
    .alertTitle {
      font-weight: bold;
      font-size: 16px;
      margin-bottom: 6px;
      color: #004080;
    }
    .scale1 { background-color: #adebad; color: #000; }
    .scale2 { background-color: #ffff7d; color: #000; }
    .scale3 { background-color: #ffbb33; color: #000; }
    .scale4 { background-color: #ef5350; color: white; }
    .scale4 strong { color: white !important; }

    #legend {
      position: fixed;
      bottom: 60px;
      right: 15px;
      background: white;
      padding: 10px 15px;
      border-radius: 6px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      font-size: 14px;
      z-index: 5000;
      max-width: 220px;
    }
    #legend h4 {
      margin-bottom: 8px;
      color: #0077cc;
    }
    .legend-item {
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .color-box {
      width: 20px;
      height: 20px;
      border-radius: 3px;
      flex-shrink: 0;
    }
    /* Pasek z datami */
    #dateFilter {
      position: fixed;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      background: white;
      padding: 6px 10px;
      border-radius: 6px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      font-size: 14px;
      z-index: 6000;
      display: flex;
      gap: 8px;
      max-width: 90vw;
      overflow-x: auto;
      white-space: nowrap;
    }
    #dateFilter button {
      cursor: pointer;
      background: #0077cc;
      border: none;
      color: white;
      padding: 6px 12px;
      border-radius: 4px;
      font-weight: bold;
      flex-shrink: 0;
      white-space: nowrap;
      user-select: none;
      transition: background-color 0.3s;
    }
    #dateFilter button:hover {
      background-color: #005fa3;
    }
    #dateFilter button.active {
      background-color: #004080;
      box-shadow: 0 0 5px #004080;
    }
    /* Popup styling */
    .leaflet-popup-content-wrapper {
      border-radius: 12px !important;
      box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
      font-family: Arial, sans-serif !important;
      font-size: 14px !important;
      color: #333 !important;
      background: #fafafa !important;
      padding: 15px !important;
      min-width: 500px !important;
      max-width: 700px !important;
      box-sizing: border-box;
      animation: fadeInPop 0.3s ease forwards;
    }
    .leaflet-popup-content {
      width: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      box-sizing: border-box;
      white-space: normal !important;
    }
    .leaflet-popup-content p {
      margin: 4px 0;
    }
    .leaflet-popup-content > div > p > strong,
    .leaflet-popup-content li > p > strong {
        display: inline-block;
        font-weight: 600;
        color: #0077cc;
    }
    .leaflet-popup-content ul {
      padding-left: 1em !important;
      margin: 0 !important;
      list-style-type: none;
      width: 100% !important;
      box-sizing: border-box;
    }
    .leaflet-popup-content li {
      width: 100% !important;
      box-sizing: border-box;
      padding: 8px 0;
      border-bottom: 1px solid #ddd;
    }
    .leaflet-popup-content li:last-child {
      border-bottom: none;
    }
    .leaflet-popup-content li > div {
      margin-top: 4px;
      font-size: 13px;
      color: #555;
    }
    .leaflet-popup-tip-container {
      filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
    }
    @keyframes fadeInPop {
      from {opacity: 0; transform: translateY(10px);}
      to {opacity:1; transform: translateY(0);}
    }