:root {
    --pis-primary: #0b3b75;
    --pis-primary-dark: #062b59;
    --pis-accent: #087bc1;

    --pis-bg: #f4f7fb;
    --pis-white: #ffffff;

    --pis-border: #d8e3ed;
    --pis-border-soft: #e8eef4;

    --pis-text: #0b3264;
    --pis-text-secondary: #526b83;
    --pis-muted: #7c8da0;

    --pis-success: #198754;
    --pis-success-bg: #e8f7ef;

    --pis-danger: #c92a35;
    --pis-danger-bg: #fdecee;

    --pis-neutral: #68798b;
    --pis-neutral-bg: #eef2f5;

    --pis-shadow: 0 4px 18px rgba(11, 50, 100, .05);
}

.pis-page,
.pis-page *,
.pis-page *::before,
.pis-page *::after {
    box-sizing: border-box;
}

.pis-page {
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--pis-bg);
    font-family: "Open Sans", Arial, sans-serif;
    color: var(--pis-text);
}

.pis-container {
    width: calc(100% - 40px);
    max-width: 1450px;
    margin: 0 auto;
}

.pis-hero {
    position: relative;
    overflow: hidden;
    padding: 48px 0 46px;
    background:
        linear-gradient(
            135deg,
            var(--pis-primary-dark) 0%,
            var(--pis-primary) 100%
        );
    color: #ffffff;
}

.pis-hero::before {
    content: "";
    position: absolute;
    width: 410px;
    height: 410px;
    top: -190px;
    right: -80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .035);
}

.pis-hero::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: 230px;
    bottom: -230px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .025);
}

.pis-hero .pis-container {
    position: relative;
    z-index: 2;
}

.pis-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #7fd3ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.pis-hero h1 {
    max-width: 980px;
    margin: 0;
    color: #ffffff;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
}

.pis-hero p {
    max-width: 860px;
    margin: 13px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: 13px;
    line-height: 1.65;
}

.pis-content {
    padding: 40px 0 65px;
}

.pis-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.pis-section-heading > div:first-child > span {
    display: block;
    margin-bottom: 5px;
    color: var(--pis-accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.pis-section-heading h2 {
    position: relative;
    margin: 0;
    padding-bottom: 12px;
    color: var(--pis-text);
    font-size: 27px;
    font-weight: 800;
}

.pis-section-heading h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    border-radius: 20px;
    background: var(--pis-accent);
}

.pis-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid var(--pis-border);
    border-radius: 25px;
    background: #ffffff;
    color: var(--pis-muted);
    font-size: 10px;
    white-space: nowrap;
}

.pis-total-badge i,
.pis-total-badge strong {
    color: var(--pis-text);
}

.pis-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-bottom: 19px;
}

.pis-stat {
    min-width: 165px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 15px;
    border: 1px solid var(--pis-border);
    border-radius: 11px;
    background: #ffffff;
    box-shadow: var(--pis-shadow);
}

.pis-stat-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eaf4fb;
    color: var(--pis-primary);
    font-size: 15px;
}

.pis-stat-icon.healthy {
    background: var(--pis-success-bg);
    color: var(--pis-success);
}

.pis-stat-icon.unhealthy {
    background: var(--pis-danger-bg);
    color: var(--pis-danger);
}

.pis-stat-icon.neutral {
    background: var(--pis-neutral-bg);
    color: var(--pis-neutral);
}

.pis-stat span {
    display: block;
    margin-bottom: 1px;
    color: var(--pis-muted);
    font-size: 9px;
}

.pis-stat strong {
    display: block;
    color: var(--pis-text);
    font-size: 18px;
    font-weight: 800;
}

.pis-filter-card {
    display: grid;
    grid-template-columns:
        minmax(270px, 1fr)
        220px
        190px
        auto;
    gap: 9px;
    margin-bottom: 18px;
    padding: 13px;
    border: 1px solid var(--pis-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--pis-shadow);
}

.pis-search,
.pis-select {
    position: relative;
}

.pis-search > i,
.pis-select > i {
    position: absolute;
    z-index: 3;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7e90a2;
    font-size: 11px;
    pointer-events: none;
}

.pis-search input,
.pis-select select {
    width: 100%;
    height: 43px;
    padding: 7px 12px 7px 38px;
    border: 1px solid #d4dfe9;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: #344d65;
    font-size: 11px;
    transition: .18s ease;
}

.pis-search input::placeholder {
    color: #98a6b4;
}

.pis-search input:focus,
.pis-select select:focus {
    border-color: var(--pis-accent);
    box-shadow: 0 0 0 3px rgba(8, 123, 193, .08);
}

.pis-clear-btn {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 15px;
    border: 1px solid #d4dfe9;
    border-radius: 8px;
    background: #ffffff;
    color: var(--pis-text);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

.pis-clear-btn:hover {
    border-color: #b7c9da;
    background: #edf5fb;
}

.pis-autocomplete {
    position: absolute;
    z-index: 3000;
    left: 0;
    top: calc(100% + 5px);
    display: none;
    width: 100%;
    max-height: 290px;
    overflow-y: auto;
    border: 1px solid var(--pis-border);
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(11, 50, 100, .14);
}

.pis-autocomplete.show {
    display: block;
}

.pis-autocomplete-item {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
}

.pis-autocomplete-item:last-child {
    border-bottom: 0;
}

.pis-autocomplete-item:hover {
    background: #f3f8fc;
}

.pis-autocomplete-item strong {
    display: block;
    color: var(--pis-text);
    font-size: 10.5px;
}

.pis-autocomplete-item span {
    display: block;
    margin-top: 3px;
    color: var(--pis-muted);
    font-size: 9px;
}

.pis-autocomplete-empty {
    padding: 13px;
    color: var(--pis-muted);
    font-size: 10px;
}

.pis-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 15px;
    align-items: stretch;
}

.pis-map-card,
.pis-results-card {
    overflow: hidden;
    border: 1px solid var(--pis-border);
    border-radius: 13px;
    background: #ffffff;
    box-shadow: var(--pis-shadow);
}

.pis-map-header {
    min-height: 59px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 15px;
    border-bottom: 1px solid var(--pis-border-soft);
    background: #ffffff;
}

.pis-map-header strong {
    display: block;
    color: var(--pis-text);
    font-size: 11.5px;
}

.pis-map-header span {
    display: block;
    margin-top: 2px;
    color: var(--pis-muted);
    font-size: 9px;
}

.pis-map-tool {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d3deea;
    border-radius: 7px;
    background: #ffffff;
    color: var(--pis-primary);
    cursor: pointer;
    transition: .18s ease;
}

.pis-map-tool:hover {
    background: #edf5fb;
    border-color: #b9cbdb;
}

#map {
    position: relative;
    display: block;
    width: 100%;
    height: 610px;
    min-height: 610px;
    overflow: hidden;
    background: #e8edf1;
    z-index: 1;
}

.pis-results-card {
    height: 669px;
    display: flex;
    flex-direction: column;
}

.pis-results-header {
    min-height: 59px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--pis-border-soft);
    background: #fbfcfe;
}

.pis-results-header span {
    display: block;
    color: var(--pis-accent);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.pis-results-header strong {
    display: block;
    margin-top: 2px;
    color: var(--pis-text);
    font-size: 11px;
}

.pis-results-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.pis-results-list::-webkit-scrollbar {
    width: 6px;
}

.pis-results-list::-webkit-scrollbar-track {
    background: #f4f6f8;
}

.pis-results-list::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #c5d1dc;
}

.pis-result-item {
    display: block;
    width: 100%;
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid var(--pis-border-soft);
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    transition:
        background .15s ease,
        padding-left .15s ease;
}

.pis-result-item:hover {
    padding-left: 17px;
    background: #f3f8fc;
}

.pis-result-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 5px;
}

.pis-result-item > strong {
    display: block;
    color: var(--pis-text);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.4;
}

.pis-result-address {
    display: block;
    margin-top: 5px;
    color: #697d91;
    font-size: 9px;
    line-height: 1.4;
}

.pis-result-address i {
    margin-right: 3px;
    color: var(--pis-accent);
}

.pis-result-item small {
    display: block;
    margin-top: 4px;
    color: #8a98a7;
    font-size: 8.5px;
}

.pis-result-status {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 3px 7px;
    border-radius: 15px;
    font-size: 7.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.pis-result-status.success {
    background: var(--pis-success-bg);
    color: var(--pis-success);
}

.pis-result-status.danger {
    background: var(--pis-danger-bg);
    color: var(--pis-danger);
}

.pis-result-status.neutral {
    background: var(--pis-neutral-bg);
    color: var(--pis-neutral);
}

.pis-no-results {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    color: var(--pis-muted);
    text-align: center;
}

.pis-no-results i {
    margin-bottom: 9px;
    color: var(--pis-primary);
    font-size: 25px;
}

.pis-no-results strong {
    color: var(--pis-text);
    font-size: 12px;
}

.pis-no-results span {
    margin-top: 4px;
    font-size: 9px;
}

.pis-popup {
    min-width: 225px;
    max-width: 320px;
    font-family: "Open Sans", Arial, sans-serif;
}

.pis-popup-image {
    overflow: hidden;
    margin: -1px -1px 11px;
    border-radius: 7px;
    background: #eef3f7;
}

.pis-popup-image img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.pis-popup-state {
    display: inline-flex;
    margin-bottom: 7px;
    padding: 4px 7px;
    border-radius: 14px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.pis-popup-state.success {
    background: var(--pis-success-bg);
    color: var(--pis-success);
}

.pis-popup-state.danger {
    background: var(--pis-danger-bg);
    color: var(--pis-danger);
}

.pis-popup-state.neutral {
    background: var(--pis-neutral-bg);
    color: var(--pis-neutral);
}

.pis-popup h3 {
    margin: 0 0 10px;
    color: var(--pis-text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.pis-popup-data {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pis-popup-data > div {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #5e7185;
    font-size: 9px;
    line-height: 1.45;
}

.pis-popup-data i {
    width: 13px;
    flex: 0 0 13px;
    margin-top: 2px;
    color: var(--pis-accent);
}

.pis-popup-data strong {
    color: #344e68;
    font-weight: 700;
}

.pis-popup-extra {
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid #e1e8ef;
}

.pis-popup-extra-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: var(--pis-text);
    font-size: 9px;
    font-weight: 800;
}

.pis-popup-extra-title i {
    color: var(--pis-accent);
}

.pis-popup-extra-content {
    padding: 9px 10px;
    border-radius: 7px;
    background: #f5f8fb;
    color: #586f85;
    font-size: 9px;
    line-height: 1.55;
}

.pis-popup-extra-content p {
    margin: 0 0 6px;
}

.pis-popup-extra-content p:last-child {
    margin-bottom: 0;
}

.pis-popup-extra-content ul,
.pis-popup-extra-content ol {
    margin: 5px 0;
    padding-left: 18px;
}

.pis-map-card:fullscreen {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #ffffff;
}

.pis-map-card:fullscreen #map {
    height: calc(100vh - 59px);
    min-height: calc(100vh - 59px);
}

.pis-page .leaflet-control-zoom a {
    color: var(--pis-primary) !important;
}

.pis-page .leaflet-control-attribution {
    font-size: 8px !important;
}

@media (max-width: 991.98px) {

    .pis-filter-card {
        grid-template-columns: 1fr 1fr;
    }

    .pis-map-layout {
        grid-template-columns: 1fr;
    }

    #map {
        height: 520px;
        min-height: 520px;
    }

    .pis-results-card {
        height: 420px;
    }
}

@media (max-width: 575.98px) {

    .pis-container {
        width: calc(100% - 24px);
    }

    .pis-hero {
        padding: 31px 0;
    }

    .pis-hero h1 {
        font-size: 25px;
    }

    .pis-hero p {
        font-size: 11.5px;
    }

    .pis-content {
        padding: 29px 0 42px;
    }

    .pis-section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .pis-section-heading h2 {
        font-size: 22px;
    }

    .pis-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pis-stat {
        min-width: 0;
    }

    .pis-filter-card {
        grid-template-columns: 1fr;
    }

    .pis-clear-btn {
        width: 100%;
    }

    #map {
        height: 440px;
        min-height: 440px;
    }

    .pis-results-card {
        height: 370px;
    }
}

@media (max-width: 380px) {

    .pis-stats {
        grid-template-columns: 1fr;
    }

    .pis-hero h1 {
        font-size: 22px;
    }

    #map {
        height: 390px;
        min-height: 390px;
    }
}