
  body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
  }

  #map {
    position: absolute;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
  }

  #searchBar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    padding: 5px 10px;
    z-index: 999;
    max-width: 500px;
    width: calc(100% - 40px);
  }

  #searchBar input {
    border: none;
    outline: none;
    padding: 10px;
    border-radius: 50px;
    font-size: 14px;
    flex: 1;
  }

  #searchBar button {
    background: #2E8BFD;
    border: none;
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
  }

  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0px;

    /* Tambahkan ini: */
    overflow-y: auto;
    max-height: 100vh;
  }

  #sidebar::-webkit-scrollbar {
    width: 6px;
  }
  #sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }


  #sidebar h2 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #sidebar button, #sidebar input, #sidebar select, #sidebar a {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    display: block;
  }

  .btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
  }

  .btn-danger {
    background-color: #e74c3c;
    color: white;
    border: none;
  }

  #toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 9999;
    display: none;
  }

  .sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .sidebar-bottom {
    margin-top: auto;
    text-align: center;
    border-top: 1px solid #eee;
    padding: 15px 0 0 0;
    cursor: pointer;
    font-size: 13px;
    color: #555;
  }

  .sidebar-bottom img {
    width: 20px;
    vertical-align: middle;
    margin-right: 8px;
  }

  /* Modal container (background hitam semi-transparan) */
  #popupModal {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    overflow-y: auto; /* INI YANG PENTING */
    z-index: 9999;
    padding: 20px 10px;
    box-sizing: border-box;
  }

  /* Isi modal */
  .popup-content {
    max-width: 600px;
    margin: auto;
    background: #fff;
    border-radius: 10px;
    padding: 25px 20px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-height: unset; /* jangan batasi tinggi */
  }


  .popup-content h3 {
    margin-bottom: 10px;
  }

  .popup-content p {
    color: gray;
  }

  .popup-content button {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    background: #3498db;
    color: white;
    border-radius: 6px;
    cursor: pointer;
  }

  #toggleSidebar {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background-color: white;
    border: none;
    font-size: 24px;
    padding: 6px 12px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: none;
  }

  #aksesSayaBtn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    padding: 9px 18px;
    border-radius: 50px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 14px;
  }


  .popup-content-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 50, 0.4); /* Biru gelap semi transparan */
    z-index: 10001;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
  }

  .popup-box {
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    max-height: 80vh;
    overflow-y: auto;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  }

  .popup-box h3 {
    text-align: left;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #2E2E2E;
  }

  .akses-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .akses-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 14px;
    font-size: 15px;
  }

  .akses-list li img {
    width: 18px;
    margin-right: 10px;
  }

  .akses-list li button {
    background: #e0e0e0;
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    color: #333;
    font-weight: 500;
    transition: background 0.2s;
  }

  .akses-list li button:hover {
    background: #d0d0d0;
  }

  .close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
  }

  .popup-scrollable {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 10px;
  }

  .modal-footer-total {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 12px 0;
    font-weight: bold;
    text-align: right;
    font-size: 15px;
    border-top: 1px solid #eee;
  }

  .popup-scrollable ul {
    list-style-position: inside;
    padding-left: 0;
  }


  .loader-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11000;
    display: none;
  }

  .loader-spinner .spinner {
    width: 44px;
    height: 44px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2e8bfd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  #selectTahun{
    position: absolute;
    top: 20px;
    right: 160px;
    z-index: 999;
    width: 100px;
    padding: 10px 10px;
    border-radius: 50px;
    border: 1px solid #ccc;
    font-size: 13px;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    appearance: none;
    text-align: center;
  }

  #selectTahun:focus {
    border-color: #2E8BFD;
    box-shadow: 0 0 5px rgba(46, 139, 253, 0.4);
    outline: none;
  }

  /* --- RESPONSIVE --- */
  @media (max-width: 768px) {
    #map {
      left: 0 !important;
      top: 60px;
    }

    #searchBar {
      max-width: 70%;
      left: 60%; /* geser ke kanan */
      transform: translateX(-50%);
      padding-left: 20px;
      padding-right: 10px;
      top: 10px;
    }

    #aksesSayaBtn {
      position: fixed;
      top: 70px !important;
      right: 10px !important;
      background: #3498db;
      color: white;
      padding: 10px 18px;
      border-radius: 40px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      font-size: 13px;
      display: block !important;
      z-index: 1001;
      line-height: 1.2;
      white-space: nowrap;
    }


    #searchBar input {
      font-size: 16px;         
      padding: 6px 8px;   
      height: 10px;       
    }


    #searchBar button {
      width: 30px;
      height: 30px;
      font-size: 14px;
    }


    #toggleSidebar {
      display: block;
      top: 10px;
      left: 20px;
      padding: 4px 10px;
      border-radius: 50px;
    }

    #sidebar {
      position: fixed;
      left: -100%;
      top: 0;
      bottom: 0;
      width: 260px;
      background: white;
      transition: left 0.3s ease-in-out;
      z-index: 2000;
    }

    #sidebar.active {
      left: 0;
    }
    
    #selectTahun {
      position: fixed;
      top: 70px;
      left: 70px; /* JAUH DARI tombol menu */
      width: 100px;
      font-size: 13px;
      padding: 10px 10px;
      z-index: 1002;
      background-color: white;
      border-radius: 40px;
      border: 1px solid #ccc;
      box-shadow: 0 2px 6px rgba(0,0,0,0.15);
      appearance: none;
      -webkit-appearance: none;  /* Untuk Safari iOS */
      -moz-appearance: none;     /* Untuk Firefox */
      text-align: center;
    }


  }

  .menu-modern {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .menu-modern li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0px;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .menu-modern li:hover {
    background-color: rgba(0, 0, 0, 0.03); /* ringan, hanya efek sentuh */
  }

  .menu-modern li img {
    width: 26px;
    height: 26px;
  }

  .menu-modern .menu-title {
    font-size: 14px;
    font-weight: 600;
    color: #2E2E2E;
  }

  .menu-modern .menu-desc {
    font-size: 13px;
    color: #555;
    display: block;
    margin-top: 2px;
  }

  .menu-modern li.active {
    background-color: #dceeff;
    border-left: 4px solid #2E8BFD;
  }

  .menu-modern li + li {
    border-top: 1px solid #eee;
  }



