body {
    font-family: Raleway, sans-serif;
    margin: 30px;
    background: #ffffff;
    overflow-x: hidden;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.header-left {
    flex: 1;
}
.header-center {
    flex: 1;
    text-align: center;
}
.header-center h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: #003051;
}
.header-right {
    text-align: right;
    flex: 1;
}
.header-btn {
    background: #ffcc00;
    color: #000;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: background 0.3s ease;
}
.header-btn:hover {
    background: #ffdb4d;
}
.logos {
    height: 50px;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        text-align: center;
        gap: 25px;
        padding-bottom: 30px;
    }
    .logos {
        height: 50px;
    }
    .header-right {
        text-align: center;
    }
    .header-center h1 {
        font-size: 20px;
    }
}


.permit-list {
    margin-top: 20px;
}
.permit-item {
    list-style: none;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.permit-item li {
    margin: 5px 0;
}
.stats {
    background: #d4dae6;
    padding: 10px 20px;
    border: 1px solid #d4dae6;
    margin-bottom: 15px;
    border-radius: 6px;
}
.pagination {
    text-align: center;
    padding: 20px 0;
}
.pagination a {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #e4e4e4;
    text-decoration: none;
    color: #666;
    border-radius: 5px;
}
.pagination a.active,
.pagination a.active:hover {
    background: #333;
    border: 1px solid #333;
    color: #fff;
}
.pagination a:hover {
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
}

.no-results {
    text-align: center;
    padding: 40px;
    font-weight: 700;
}


.permit-card {
  position: relative;
  background: #f9f9f9;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  padding: 30px;
  margin: 30px 0;
  border: 1px solid #f1f1f1;
}
.permit-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.20);
  background: #ffffff;
}

.permit-badge {
  position: absolute;
  top: 10px;
  right: 15px;
  background: #eee;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 13px;
  color: #333;
}

.permit-body {
  display: flex;
  align-items: center;
  gap: 20px;
}

.permit-icon {
  min-width: 60px;
  min-height: 60px;
  border-radius: 50%;
}
.permit-icon::after {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 395.2' style='enable-background:new 0 0 512 395.2;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M44,362.8c-13,0.1-20.5-11.5-15.7-22.9c8.8-20.8,17.8-41.6,26.7-62.4c33.3-77.7,66.6-155.3,99.8-233 c2.6-6.1,6.2-10.7,13-11.9c6-1,11.3,0.7,15.2,5.5c4.1,5.1,4.8,10.8,2.2,16.9c-8.4,19.7-16.9,39.5-25.3,59.2 c-33.7,78.6-67.4,157.1-101,235.7C55.7,357.3,51.4,362.5,44,362.8z'/%3E%3Cpath class='st0' d='M342.5,32.4c6.7,0.2,11.4,4.5,14.5,11.6c13.6,32,27.3,63.9,41,95.9c28.2,65.7,56.3,131.5,84.5,197.2 c1,2.3,2,4.6,2.4,7c1.4,8.1-3.2,15.6-10.8,18c-7.6,2.4-15.7-0.9-19.2-8.5c-5.4-11.8-10.3-23.8-15.5-35.7 C402.2,231.1,365,144.2,328,57.3c-1.7-3.9-2.4-8.7-1.9-12.9C327.1,37.2,333.8,32.4,342.5,32.4z'/%3E%3Cpath class='st0' d='M272,69.8c0,6.8,0.1,13.6,0,20.5c-0.1,9.7-7,16.6-16.2,16.5c-8.9-0.1-15.7-7-15.7-16.5 c-0.1-13.8-0.1-27.6,0-41.4c0.1-9.7,6.9-16.6,16.2-16.5c9,0.1,15.6,7,15.8,16.5C272.1,55.8,272,62.8,272,69.8z'/%3E%3Cpath class='st0' d='M240,197.6c0-7-0.1-14,0-21c0.1-9.5,6.9-16.2,15.9-16.3c9,0,15.9,6.8,16,16.2c0.1,14,0.1,27.9,0,41.9 c-0.1,9.4-7,16.3-15.9,16.3c-9,0-15.8-6.9-16-16.2C239.9,211.6,240,204.6,240,197.6z'/%3E%3Cpath class='st0' d='M240,325.7c0-7-0.1-14,0-21c0.1-9.5,6.8-16.3,15.8-16.4c9-0.1,16,6.7,16.1,16.1c0.1,14.1,0.2,28.3,0,42.4 c-0.1,9.1-7,15.8-15.8,15.9c-9,0.1-15.9-6.8-16.1-16.1C239.9,339.7,240,332.7,240,325.7z'/%3E%3C/g%3E%3C/svg%3E");
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 66%;
    position: absolute;
    left: 0;
    top: 0;
}

/* Different colors per closure type */
.closure-nus { 
    background: #8b2fff;
    border: 4px solid #8231e8;
}
.closure-olc { 
    background: #ffa94d;
    border: 4px solid #e99558;
}
.closure-frc { 
    background: #ec4c4e;
    border: 4px solid #dd4244;
}
.closure-ns  { 
    background: #868e96;
    border: 4px solid #797f86;
}
.closure-nrc { 
    background: #49ce7c;
    border: 4px solid #4ac077;
}
.closure-default { 
    background: #faa356;
    border: 4px solid #e99558; 
}


.permit-details {
  flex: 1;
}

.permit-details p {
  margin: 11px 0;
  color: #000;
  font-size: 15px;
  font-weight: 600;
}

.permit-details .label,
.permit-dates .label {
  color: #666;
  font-size: 14px;
  display: flex;
  font-weight: 400;
}
.permit-dates .label {
    justify-content: flex-end;
}

.permit-details .street strong {
  font-size: 18px;
  color: #000;
  font-weight: 800;
}

.permit-dates {
  text-align: right;
  font-size: 15px;
  color: #000;
  min-width: 200px;
  font-weight: 600;
}


/* --- Responsive mobile layout --- */
@media (max-width: 768px) {
    .permit-body {
        flex-direction: column;
        text-align: center;
         gap: 0px;
    }
    .permit-badge {
        position: static;
        display: flex;
        margin-bottom: 10px;
        justify-content: center;
    }
    .permit-icon {
        margin: 0 auto 10px;
    }
    .permit-dates {
        text-align: center;
    }
    .permit-details .label,
    .permit-dates .label {
        justify-content: center;
    }
    .permit-card {
        padding: 10px;
    }
}



.permit-legend {
    background: #fff;
    padding: 10px 20px;
    margin-bottom: 20px;
    border: 1px solid #f1f1f1;
    border-radius: 6px;
    text-align: center;
}
.permit-legend h3 {
    margin-top: 0;
    font-size: 15px;
    margin-bottom: 10px;
}
.permit-legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: center;
}
.permit-legend li {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #333;
}
.legend-circle {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border-width: 3px;
}



.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.tooltiptext {
    visibility: hidden;
    width: 170px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    font-size: 13px;
    top: 11px;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
}





.filters-container {
    margin-bottom: 10px;
    padding: 10px 20px;
    background: #f1f2f7;
    border: 1px solid #f1f2f7;
    border-radius: 6px;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.filters-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.filters-header .arrow {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  color: #666;
}

.filters-header.open .arrow {
  transform: rotate(90deg);
}

.filters-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1.2rem;
}

.filters-form.open {
  padding: 20px 0 0 0;
  max-height: 1000px; /* Enough to fit all filters */
  overflow:visible;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dates-row .form-group {
  flex: 1 1 220px;
}

.full-width {
  flex: 1 1 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #333;
}

.form-group input,
.form-group select {
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
      width: auto;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 2px rgba(0,120,212,0.2);
}

.form-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: #002f50;
  color: #fff;
}
.btn-primary:hover {
  background-color: #005ea6;
}

.btn-secondary {
  background-color: #eaeaea;
  color: #333;
}

.btn-secondary:hover {
  background-color: #d5d5d5;
}

/* Responsive */
@media (max-width: 600px) {
  .dates-row {
    /*flex-direction: column;*/
  }
}


.field-note {
    font-size: 13px;
    padding: 5px 0 0 5px;
    color: #666;
}




.multiselect-dropdown{
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  border: solid 1px #d8d8d8;
  background-color: white;
  position: relative;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 16px 12px;
  width: auto !important;
}
.multiselect-dropdown span.optext, .multiselect-dropdown span.placeholder{
  margin:5px;
  padding:1px 0; 
  border-radius: 5px; 
  display:inline-block;
}
.multiselect-dropdown span.optext{
    background-color:#e7e7e7;
    padding: 5px 10px;
    font-size: 15px;
}
.multiselect-dropdown span.optext .optdel {
  float: right;
  margin: 0 -6px 1px 5px;
  font-size: 0.7em;
  margin-top: 2px;
  cursor: pointer;
  color: #666;
}
.multiselect-dropdown span.optext .optdel:hover { color: #c66;}
.multiselect-dropdown span.placeholder{
  color:#ced4da;
}
.multiselect-dropdown-list-wrapper{
  box-shadow: #d5d5d5  0 3px 8px;
  z-index: 100;
  padding:5px;
  border-radius: 10px;
  border: solid 1px #28bb80;
  display: none;
  margin: -1px;
  position: absolute;
  top:0;
  left: 0;
  right: 0;
  background: white;
}
.multiselect-dropdown-list-wrapper .multiselect-dropdown-search{
  margin-bottom:5px;
  padding: 7px;
  border: 1px solid #d8d8d8;
  box-sizing: border-box;
}
.multiselect-dropdown-list{
  padding:2px;
  height: 15rem;
  overflow-y:auto;
  overflow-x: hidden;
}
.multiselect-dropdown-list::-webkit-scrollbar {
  width: 6px;
}
.multiselect-dropdown-list::-webkit-scrollbar-thumb {
  background-color: #bec4ca;
  border-radius:3px;
}

.multiselect-dropdown-list div{
  padding: 5px;
}
.multiselect-dropdown-list input{
  height: 1.15em;
  width: 1.15em;
  margin-right: 0.35em;  
}
.multiselect-dropdown-list div.checked{
}
.multiselect-dropdown-list div:hover{
  background-color: #ced4da;
}
.multiselect-dropdown span.maxselected {width:100%;}
.multiselect-dropdown-all-selector {border-bottom:solid 1px #999;}