html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

#atlas-app {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 46px 1fr;
    background: #08111f;
    position: relative;
}

#topbar {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 18px;
    background: #12243a;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 1000;
}

.topbar-brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.topbar-brand strong {
    display: block;
    color: white;
    font-size: 20px;
    line-height: 1;
}

.topbar-project-name {
    color: #9fb0c3;
    font-size: 12px;
    white-space: nowrap;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-status {
    display: flex;
    flex-direction: column;
    text-align: right;
    line-height: 1.4;
}

.account-status-label {
    color: #9fb0c3;
    font-size: 14px;
}

.account-status-name {
    color: white;
    font-size: 17px;
}

.projekty-btn {
    --color: #2f80ed;
    font-family: inherit;
    display: inline-block;
    width: auto;
    padding: 0 14px;
    white-space: nowrap;
    height: 2.6em;
    line-height: 2.5em;
    overflow: hidden;
    cursor: pointer;
    margin: 0;
    font-size: 13px;
    z-index: 1;
    color: var(--color);
    background: transparent;
    border: 2px solid var(--color);
    border-radius: 6px;
    position: relative;
}

.projekty-btn::before {
    position: absolute;
    content: "";
    background: var(--color);
    width: 150px;
    height: 200px;
    z-index: -1;
    border-radius: 50%;
    top: 100%;
    left: 100%;
    transition: 0.3s all;
}

.projekty-btn:hover {
    color: white;
}

.projekty-btn:hover::before {
    top: -30px;
    left: -30px;
}

.topbar-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 230px;
}

.topbar-search input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    background: #0b1624;
    color: white;
    font-size: 13px;
    outline: none;
}

.topbar-search input:focus {
    border-color: #2f80ed;
}

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #12243a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    overflow-y: auto;
    max-height: 260px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    z-index: 1001;
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    padding: 8px 14px;
    color: #c7d3df;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #2f80ed;
    color: white;
}

#sidebar {
    grid-column: 1;
    grid-row: 2;
    width: 360px;
    justify-self: start;
    background: rgba(18, 36, 58, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 18px 14px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    margin: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    z-index: 50;
}

#sidebar h2,
.project-name {
    display: none;
}

.panel-section {
    margin-bottom: 20px;
}

.road-tool-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.panel-section h3 {
    color: white;
    margin: 0 0 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* ==== Grupa WMS (zwijalna) ==== */
.wms-group summary {
    cursor: pointer;
    color: #c7d3df;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    list-style: none;
}

.wms-group summary::-webkit-details-marker {
    display: none;
}

.wms-group summary::before {
    content: "▸";
    display: inline-block;
    width: 12px;
    transition: transform 0.15s;
}

.wms-group[open] summary::before {
    transform: rotate(90deg);
}

.wms-group .checkbox-container {
    display: block;
    margin-left: 18px;
}

/* ==== Zagnieżdżone podgrupy WMS: wcięcie + mniejsza czcionka ==== */
.wms-group .wms-group {
    margin-left: 18px;
}

.wms-group .wms-group summary {
    font-size: 12px;
}

.wms-group .wms-group .checkbox-container {
    font-size: 12px;
}

.panel-section > .checkbox-container {
    display: block;
}

/* ==== Rozwijana legenda pod pojedynczą warstwą WMS (trójkąt za nazwą warstwy) ==== */
.layer-legend {
    margin-bottom: 0;
}

.layer-legend > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    margin-bottom: 0;
    font-weight: 400;
}

.layer-legend > summary::-webkit-details-marker {
    display: none;
}

.layer-legend > summary::before {
    content: none;
}

.layer-legend > summary::after {
    content: "▸";
    color: #8fa3ba;
    font-size: 11px;
    margin-left: 8px;
    margin-right: 4px;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.layer-legend[open] > summary::after {
    transform: rotate(90deg);
}

.layer-legend-img {
    display: block;
    max-width: calc(100% - 30px);
    margin: 6px 0 6px 30px;
    border-radius: 6px;
    background: white;
    padding: 4px;
}

/* ==== Filtr kategorii w obrębie warstwy (odznaczanie pojedynczych klas obiektów) ==== */
.layer-legend-filter {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 4px 30px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255,255,255,0.12);
}

.legend-filter-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: #c7d3df;
    cursor: pointer;
}

.legend-filter-checkbox {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: #2196F3;
    cursor: pointer;
    flex-shrink: 0;
}

.legend-filter-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.legend-filter-label {
    flex: 1;
}

/* ==== Podkłady: material checkbox (niebieski, rozmiar jak checkboxy warstw) ==== */
.material-checkbox {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #c7d3df;
    cursor: pointer;
    margin-bottom: 6.75px;
}

.material-checkbox input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.material-checkmark {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 14.06px;
    height: 14.06px;
    margin-right: 8.4px;
    border: 1.5px solid #2196F3;
    border-radius: 2.8px;
    transition: all 0.3s;
}

.material-checkbox input[type="radio"]:checked ~ .material-checkmark {
    background-color: #2196F3;
    border-color: #2196F3;
}

.material-checkbox input[type="radio"]:checked ~ .material-checkmark:after {
    content: "";
    position: absolute;
    top: 1.4px;
    left: 4.2px;
    width: 2.8px;
    height: 7px;
    border: solid white;
    border-width: 0 1.4px 1.4px 0;
    transform: rotate(45deg);
}

.material-checkbox input[type="radio"]:focus ~ .material-checkmark {
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.35);
}

.material-checkbox:hover input[type="radio"] ~ .material-checkmark {
    border-color: #64b5f6;
}

#map {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ==== Odsunięcie kontrolek Leaflet po lewej, żeby nie chowały się pod panelem warstw ==== */
.leaflet-top.leaflet-left {
    margin-left: 269px;
}

/* ==== Skalówka + atrybucja: tuż obok panelu warstw (szerokość panelu 360px + margines 12px + odstęp 12px) ==== */
.leaflet-bottom.leaflet-left {
    margin-left: 384px;
}

#right-tools {
    position: absolute;
    right: 14px;
    top: 90px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    padding: 0;
}

#right-tools button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    background: rgba(18, 36, 58, 0.95);
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

#right-tools button:hover {
    background: #2f80ed;
}

#right-tools button.active {
    background: #2f80ed;
    box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.45);
}

#app-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9fb0c3;
    font-size: 13px;
}

.sidebar-contact {
    line-height: 1.4;
    font-size: 12px;
}
/* ==== Warstwy: checkbox (Uiverse.io by DaniloMGutavo) ==== */
.checkbox-container {
    display: inline-block;
    position: relative;
    padding-left: 19.5px;
    margin-bottom: 6.75px;
    cursor: pointer;
    font-size: 13px;
    color: #c7d3df;
    user-select: none;
}

.custom-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 14.06px;
    width: 14.06px;
    background-color: #eee;
    border-radius: 2.25px;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5.06px;
    top: 2.81px;
    width: 2.81px;
    height: 5.625px;
    border: solid white;
    border-width: 0 1.69px 1.69px 0;
    transform: rotate(45deg);
}

.custom-checkbox:checked ~ .checkmark {
    background-color: #2196F3;
    box-shadow: 0 3px 7px rgba(33, 150, 243, 0.3);
}

.custom-checkbox:checked ~ .checkmark:after {
    display: block;
}

@keyframes checkAnim {
    0% {
        height: 0;
    }

    100% {
        height: 5.625px;
    }
}

.custom-checkbox:checked ~ .checkmark:after {
    animation: checkAnim 0.2s forwards;
}

/* ==== Narzędzie rysowania ==== */
.tool-wrapper {
    position: relative;
}

/* ==== Rozsuwana wyszukiwarka (ikona lupy w prawym pasku) ==== */
.quick-search {
    position: absolute;
    right: 54px;
    top: 0;
    width: 0;
    overflow: hidden;
    transition: width 0.25s ease;
}

.quick-search.open {
    width: 220px;
}

.quick-search input {
    width: 220px;
    height: 44px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    background: rgba(18, 36, 58, 0.95);
    color: white;
    font-size: 13px;
    outline: none;
}

.quick-search input:focus {
    border-color: #2f80ed;
}

#quick-search-results {
    position: absolute;
    right: 54px;
    left: auto;
    top: 50px;
    width: 220px;
}

.draw-menu {
    position: absolute;
    right: 54px;
    top: 0;
    background: rgba(18, 36, 58, 0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}

.draw-menu.hidden {
    display: none;
}

#pin-menu,
#draw-menu,
#lead-type-menu {
    flex-direction: row;
}

#pin-menu button,
#draw-menu button,
#lead-type-menu button {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lead-type-menu button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#lead-type-menu button:disabled:hover {
    background: transparent;
}

/* ==== Pole "Punkt przyłączeniowy" w formularzu Lead - wyświetla współrzędne wskazane na mapie ==== */
.lead-point-display {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 7px;
    background: #0b1624;
    color: #7e93a8;
    font-size: 12.5px;
}

.lead-point-display.has-value {
    color: white;
}

.lead-turbine-result {
    color: #6fcf97;
    font-size: 12px;
    line-height: 1.4;
}

.lead-turbine-result.hidden {
    display: none;
}

#lead-wiatrak-top-fields.hidden,
#lead-pv-fields.hidden {
    display: none;
}

/* #lead-turbine-submit też niesie .uldk-search-btn (wspólny styl przycisków), a
   "#lead-turbine-panel .uldk-search-btn { display: block }" zdefiniowane niżej w tym
   pliku ma tę samą specyficzność (1 id + 1 klasa) i jako późniejsza reguła wygrywa
   kaskadę - stąd dodatkowy selektor z id rodzica, żeby .hidden było silniejsze */
#lead-turbine-panel #lead-turbine-submit.hidden {
    display: none;
}

.lead-turbine-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lead-turbine-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 12px;
    color: #dfe7ef;
}

.lead-turbine-list-row button {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #e57373;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.lead-turbine-list-row button.road-round-btn {
    color: white;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lead-turbine-list-row button.road-round-btn.active {
    background: #f39c12;
    border-color: #f39c12;
}

.lead-turbine-list-row button.road-round-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.35);
}

.road-end-marker-icon {
    background: none;
    border: none;
}

.road-end-marker-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(243, 156, 18, 0.9);
    border: 2px solid #ffffff;
    cursor: pointer;
    animation: road-end-marker-pulse 1.6s ease-in-out infinite;
}

@keyframes road-end-marker-pulse {
    0%, 100% { box-shadow: 0 0 4px 1px rgba(243, 156, 18, 0.6); }
    50% { box-shadow: 0 0 10px 5px rgba(243, 156, 18, 0.85); }
}

.lead-turbine-list-row button:hover {
    background: rgba(229,115,115,0.18);
}

.lead-pv-icon-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.lead-pv-icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    cursor: pointer;
}

.lead-pv-icon-btn:hover {
    background: rgba(255,255,255,0.16);
}

.lead-pv-icon-btn.active {
    background: #8e24aa;
    border-color: #8e24aa;
}

.lead-pv-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.lead-pv-icon-btn:disabled:hover {
    background: rgba(255,255,255,0.08);
}

.sketch-menu {
    padding: 6px;
}

.sketch-menu-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 32px;
    overflow: hidden;
}


.sketch-menu-row button {
    width: 38px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sketch-menu-row button:hover,
.sketch-menu-row button.active-mode {
    background: rgba(255,255,255,0.1);
}

#sketch-color-picker {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    margin-left: 4px;
    align-self: center;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    background: none;
    overflow: hidden;
}

#sketch-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

#sketch-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

#sketch-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.sketch-text-label {
    display: inline-block;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    text-shadow:
        -2px -2px 0 #fff,
         2px -2px 0 #fff,
        -2px  2px 0 #fff,
         2px  2px 0 #fff,
         0px  2px 0 #fff,
         0px -2px 0 #fff,
         2px  0px 0 #fff,
        -2px  0px 0 #fff;
}

/* ==== Okienko dodawania notatki tekstowej (szkicowanie) ==== */
.sketch-text-popup .leaflet-popup-content-wrapper {
    background: rgba(18, 36, 58, 0.97);
    color: white;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.sketch-text-popup .leaflet-popup-tip {
    background: rgba(18, 36, 58, 0.97);
}

.sketch-text-popup .leaflet-popup-content {
    margin: 10px 12px;
}

.sketch-text-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.sketch-text-form input[type="text"] {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 7px;
    background: #0b1624;
    color: white;
    font-size: 13px;
    outline: none;
}

.sketch-text-form input[type="text"]:focus {
    border-color: #2f80ed;
}

.sketch-text-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.sketch-text-actions button {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

#sketch-text-cancel {
    background: rgba(255,255,255,0.08);
    color: #c7d3df;
}

#sketch-text-cancel:hover {
    background: rgba(255,255,255,0.15);
}

#sketch-text-confirm {
    background: #2f80ed;
    color: white;
}

#sketch-text-confirm:hover {
    background: #1c6fdb;
}

/* ==== Dymek podpowiedzi "Google Maps" ==== */
.gmaps-hint {
    position: absolute;
    right: 54px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 36, 58, 0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.gmaps-hint::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(18, 36, 58, 0.95);
}

.gmaps-hint.hidden {
    display: none;
}

/* ==== Podpowiedź "przybliż mapę" pod warstwami z limitem skali ==== */
.zoom-hint {
    font-size: 11px;
    font-style: italic;
    color: #8a9bb0;
    margin: -3px 0 6.75px 19.5px;
}

.zoom-hint.hidden {
    display: none;
}

.draw-menu button {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: white;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.draw-menu button:hover {
    background: #2f80ed;
}

/* ==== Ikony w menu rysowania ==== */
.draw-menu button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* ==== Etykiety pomiarowe na linii ==== */
.leaflet-marker-icon.measure-label-icon {
    background: transparent !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

.measure-label {
    display: inline-block;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    color: #12243a;
    font-size: 13px;
    font-weight: 700;
    text-shadow:
        -2px -2px 0 #fff,
         2px -2px 0 #fff,
        -2px  2px 0 #fff,
         2px  2px 0 #fff,
         0px  2px 0 #fff,
         0px -2px 0 #fff,
         2px  0px 0 #fff,
        -2px  0px 0 #fff;
}

.measure-label-total {
    color: #1857c9;
    font-size: 14px;
    font-weight: 800;
}

/* ==== Etykiety numerów działek (zgodnie ze stylem QGIS) ==== */
.dzialka-label-icon {
    background: transparent;
    border: none;
}

.dzialka-label {
    display: inline-block;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    color: #323232;
    font-size: 11px;
    font-family: Arial, sans-serif;
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
}

/* ==== Strzałka północy (kontrolka Leaflet, styl jak zoom +/-) ==== */
.leaflet-control-north-arrow a {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* ==== Notatka do działki (popup, zapis w localStorage) ==== */
.dzialka-komentarz {
    display: block;
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    padding: 4px 6px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
}

/* ==== Minimapa ==== */
.leaflet-control-minimap {
    border-radius: 10px !important;
    border: 3px solid #fff !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.leaflet-control-minimap-toggle-display {
    border-radius: 4px;
}

/* ==== Trasa do stacji GPZ ==== */
.gpz-route-popup .leaflet-popup-content-wrapper {
    background: rgba(18, 36, 58, 0.97);
    color: white;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.gpz-route-popup .leaflet-popup-tip {
    background: rgba(18, 36, 58, 0.97);
}

.gpz-route-popup .leaflet-popup-content {
    margin: 10px 12px;
}

.gpz-route-form {
    display: flex;
    flex-direction: column;
    min-width: 190px;
}

.gpz-route-select {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 7px;
    background: #0b1624;
    color: white;
    font-size: 13px;
    outline: none;
}

.gpz-route-select:focus {
    border-color: #2f80ed;
}

.gpz-route-panel {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(18, 36, 58, 0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    padding: 8px 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.gpz-route-panel.hidden {
    display: none;
}

.gpz-route-status {
    color: white;
    font-size: 13px;
    white-space: nowrap;
    padding: 0 4px;
}

.gpz-route-panel button {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpz-route-panel button:hover {
    background: #2f80ed;
}

.gpz-route-panel button.hidden {
    display: none;
}

/* ==== Zestawienie tras GPZ (do kopiowania) ==== */
.gpz-route-summary-panel {
    position: absolute;
    left: 50%;
    bottom: 72px;
    transform: translateX(-50%);
    z-index: 1200;
    background: rgba(18, 36, 58, 0.97);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    padding: 10px 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    min-width: 260px;
    max-width: 360px;
}

.gpz-route-summary-panel.hidden {
    display: none;
}

.gpz-route-summary-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.gpz-route-summary-item {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.gpz-route-summary-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#gpz-route-summary-copy {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    background: #2f80ed;
    color: white;
}

#gpz-route-summary-copy:hover {
    background: #1c6fdb;
}

.gpz-route-summary-hint {
    color: #6fcf97;
    font-size: 12px;
}

.gpz-route-summary-hint.hidden {
    display: none;
}

.gpz-route-filter-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 220px;
    overflow-y: auto;
}

.gpz-route-filter-list .checkbox-container {
    margin-bottom: 4px;
}

/* ==== Znacznik stacji GPZ na końcu trasy ==== */
.leaflet-marker-icon.gpz-station-pin {
    background: transparent !important;
    border: none !important;
}

.gpz-station-pin svg {
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
}

.gpz-route-distance-label {
    display: inline-block;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 800;
    text-shadow:
        -2px -2px 0 #fff,
         2px -2px 0 #fff,
        -2px  2px 0 #fff,
         2px  2px 0 #fff,
         0px  2px 0 #fff,
         0px -2px 0 #fff,
         2px  0px 0 #fff,
        -2px  0px 0 #fff;
}

.gpz-route-label {
    display: inline-block;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    text-shadow:
        -2px -2px 0 #fff,
         2px -2px 0 #fff,
        -2px  2px 0 #fff,
         2px  2px 0 #fff,
         0px  2px 0 #fff,
         0px -2px 0 #fff,
         2px  0px 0 #fff,
        -2px  0px 0 #fff;
}

/* ==== Etykieta dzialki ULDK (obreb/numer, na srodku dzialki) ==== */
.uldk-parcel-label {
    display: inline-block;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    text-align: center;
    line-height: 1.25;
    color: #6a1b9a;
    font-size: 12px;
    font-weight: 700;
    text-shadow:
        -1.5px -1.5px 0 #fff,
         1.5px -1.5px 0 #fff,
        -1.5px  1.5px 0 #fff,
         1.5px  1.5px 0 #fff,
         0px  1.5px 0 #fff,
         0px -1.5px 0 #fff,
         1.5px  0px 0 #fff,
        -1.5px  0px 0 #fff;
}

body.uldk-labels-hidden .uldk-parcel-label-icon {
    display: none;
}

/* ==== Popup dzialki ULDK ==== */
.uldk-popup-wrapper .leaflet-popup-content-wrapper {
    background: rgba(18, 36, 58, 0.97);
    color: white;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.uldk-popup-wrapper .leaflet-popup-tip {
    background: rgba(18, 36, 58, 0.97);
}

.uldk-popup {
    font-size: 13px;
    line-height: 1.5;
    min-width: 190px;
}

.uldk-popup strong {
    color: white;
    font-size: 14px;
}

.uldk-download-btn {
    margin-top: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    background: #2f80ed;
    color: white;
    width: 100%;
}

.uldk-download-btn:hover {
    background: #1c6fdb;
}

/* ==== Popup identyfikacji obiektów (tabela atrybutów) ==== */
.identify-popup .leaflet-popup-content-wrapper {
    background: rgba(18, 36, 58, 0.97);
    color: white;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.identify-popup .leaflet-popup-tip {
    background: rgba(18, 36, 58, 0.97);
}

.identify-popup .leaflet-popup-content {
    margin: 10px 12px;
    max-height: 320px;
    overflow-y: auto;
}

/* popup działek PTI z formularzem edycji - okno o 50% większe (maxWidth ustawiony w JS) */
.pti-dzialka-popup .leaflet-popup-content {
    max-height: 480px;
}

.identify-popup .leaflet-popup-close-button {
    color: rgba(255,255,255,0.7);
}

.identify-popup .leaflet-popup-close-button:hover {
    color: white;
}

.lead-kompleks-popup-wrap .leaflet-popup-content-wrapper {
    background: rgba(18, 36, 58, 0.97);
    color: white;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.lead-kompleks-popup-wrap .leaflet-popup-tip {
    background: rgba(18, 36, 58, 0.97);
}

.lead-kompleks-popup-wrap .leaflet-popup-content {
    margin: 12px 14px;
    max-height: 720px;
    overflow-y: auto;
}

.lead-kompleks-popup-wrap .leaflet-popup-close-button {
    color: rgba(255,255,255,0.7);
}

.lead-kompleks-popup-wrap .leaflet-popup-close-button:hover {
    color: white;
}

.lead-kompleks-popup-title {
    font-weight: 700;
    font-size: 13px;
    color: #ffd54f;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.lead-info-row {
    font-size: 12.5px;
    line-height: 1.55;
    margin-bottom: 2px;
    padding: 4px 6px;
    border-radius: 4px;
}

.lead-info-row-alt {
    background: rgba(255,255,255,0.045);
}

.lead-info-label {
    color: #9fb0c3;
}

.lead-info-list {
    margin: 2px 0 4px 16px;
    padding: 0;
}

.lead-info-list li {
    margin-bottom: 2px;
}

.lead-info-clearance {
    font-size: 10px;
    font-style: italic;
    color: #b7f0cf;
}

.lead-info-clearance.lead-info-negative {
    color: #f2a89a;
    font-weight: 600;
}

.lead-info-clearance.lead-info-clearance-normal {
    font-size: inherit;
}

.lead-info-inside-alert,
.lead-info-inside-alert .lead-info-clearance,
.lead-info-inside-alert .lead-info-label {
    color: #ff5252;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(255, 82, 82, 0.75);
}

.zrid-row-total,
.zrid-row-total .lead-info-label {
    color: #6fcf97;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(111, 207, 151, 0.6);
}

.zrid-pie-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.zrid-pie-legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.zrid-pie-legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #dfe7ef;
}

.zrid-pie-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.zrid-group-legend-wrap {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.15);
    max-height: 170px;
    overflow-y: auto;
}

.zrid-group-legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.lead-bdot-tag {
    font-size: 10px;
    font-style: italic;
    color: #8a99ab;
}

/* ==== Etykiety działek PTI (obręb + nr działki), znikają poniżej PTI_LABEL_MIN_ZOOM ==== */
.pti-dzialka-label.leaflet-tooltip {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    color: white;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 3px #000;
}

.pti-dzialka-label.leaflet-tooltip::before {
    display: none;
}

.pti-labels-hidden .pti-dzialka-label {
    display: none;
}

/* ==== Etykiety turbin (EW id + moc), znikają poniżej PTI_LABEL_MIN_ZOOM ====
   celowo inny wygląd niż etykiety działek (.pti-dzialka-label) - granatowa otoczka
   zamiast płaskiego tekstu z czarnym cieniem, żeby na pierwszy rzut oka było widać,
   że to inna kategoria etykiet */
.pti-turbine-label.leaflet-tooltip {
    background: rgba(13, 27, 74, 0.9);
    border: 1px solid #3949ab;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    padding: 3px 7px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    text-shadow: none;
}

.pti-turbine-label.leaflet-tooltip-right::before {
    border-right-color: #3949ab;
}

.pti-labels-hidden .pti-turbine-label {
    display: none;
}

/* ==== Piktogram turbiny (maszt + 3 łopaty), stały rozmiar niezależny od zoomu ==== */
.pti-turbine-icon {
    background: transparent;
    border: none;
    pointer-events: auto;
}

.pti-turbine-icon svg {
    display: block;
    filter: drop-shadow(0 0 1.5px rgba(255,255,255,0.9));
}

.osd-operator-svg-label {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
}

.identify-loading,
.identify-empty {
    font-size: 13px;
    color: #c7d3df;
    min-width: 170px;
}

.identify-group + .identify-group {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.identify-group-title {
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.identify-attr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.identify-attr-table th,
.identify-attr-table td {
    text-align: left;
    padding: 3px 6px 3px 0;
    vertical-align: top;
}

.identify-attr-table th {
    color: #8fa3ba;
    font-weight: 400;
    white-space: normal;
    max-width: 118px;
    line-height: 1.25;
    text-transform: capitalize;
}

.identify-attr-table td {
    color: white;
    word-break: break-word;
}

.identify-attr-table td a {
    color: #6cb4ff;
    text-decoration: none;
    white-space: nowrap;
}

.identify-attr-table td a:hover {
    text-decoration: underline;
}

/* co drugi wiersz odrobinę jaśniejszy - łatwiej wzrokiem rozdzielić kolejne atrybuty */
.identify-attr-table tr:nth-child(even) {
    background: rgba(255,255,255,0.045);
}

.identify-sep {
    border: none;
    border-top: 1px dashed rgba(255,255,255,0.15);
    margin: 8px 0;
}

/* ==== Edycja pól "Działki (akwizycja)" w popupie warstw PTI ==== */
/* formularz jest teraz pierwszym elementem popupu (edytowalne pola na samej górze) -
   separator więc idzie pod nim, oddzielając go od tabeli z resztą atrybutów */
.pti-edit-form {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pti-edit-heading {
    font-size: 11.5px;
    font-weight: 700;
    color: #8fa3ba;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.pti-edit-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11.5px;
    color: #8fa3ba;
}

.pti-edit-input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 5px;
    color: white;
    font-size: 12.5px;
    padding: 4px 6px;
    font-family: inherit;
}

textarea.pti-edit-input {
    resize: vertical;
}

.pti-edit-input:focus {
    outline: none;
    border-color: #2f80ed;
}

.pti-edit-input-locked,
.pti-edit-input-locked:focus {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
    color: #6b7a8c;
    cursor: not-allowed;
}

/* lista rozwijana select-a dziedziczy jasny kolor tekstu z .pti-edit-input (potrzebny na
   ciemnym tle samego pola) - ale system rysuje rozwiniętą listę na jasnym tle, więc bez
   tego nadpisania opcje byłyby białym tekstem na białym tle */
.pti-edit-input option {
    color: #000;
    background: #fff;
}

.pti-edit-save {
    margin-top: 4px;
    background: rgba(47,128,237,0.18);
    border: 1px solid #2f80ed;
    color: #2f80ed;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.pti-edit-save:hover {
    background: rgba(47,128,237,0.3);
}

.pti-edit-save:disabled {
    opacity: 0.6;
    cursor: default;
}

.pti-edit-status {
    font-size: 11.5px;
    color: #6fcf97;
    min-height: 14px;
}

.pti-edit-status.pti-edit-error {
    color: #eb5757;
}

/* ==== Plakietka projektu PTI (obok nazwy w DPTI) + menu narzędzi + statystyki ==== */
.pti-project-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin-left: 7px;
    border-radius: 50%;
    background: rgba(47,128,237,0.18);
    border: 1px solid #2f80ed;
    color: #2f80ed;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    vertical-align: middle;
}

.pti-project-badge:hover {
    background: #2f80ed;
    color: white;
}

.pti-project-menu {
    position: fixed;
    z-index: 1400;
    background: rgba(18, 36, 58, 0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    padding: 5px;
    display: flex;
    flex-direction: column;
    min-width: 175px;
}

.pti-project-menu.hidden {
    display: none;
}

.pti-project-menu button {
    background: none;
    border: none;
    color: white;
    text-align: left;
    padding: 7px 9px;
    font-size: 12.5px;
    border-radius: 6px;
    cursor: pointer;
}

.pti-project-menu button:hover {
    background: rgba(47,128,237,0.2);
}

.pti-stats-modal {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    background: rgba(18, 36, 58, 0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 11px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    padding: 14px 16px;
    min-width: 280px;
    max-width: 340px;
    max-height: 70vh;
    overflow-y: auto;
}

.pti-stats-modal.hidden {
    display: none;
}

.pti-stats-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    cursor: move;
    user-select: none;
}

.pti-stats-modal-header h4 {
    margin: 0;
    font-size: 13.5px;
    color: white;
}

.pti-stats-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}

.pti-stats-modal-close:hover {
    color: white;
}

.pti-stat-section-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #8fa3ba;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px 0 6px;
}

.pti-stat-section-title:first-child {
    margin-top: 0;
}

.pti-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 12.5px;
}

.pti-stat-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.pti-stat-label {
    color: white;
    flex: 1;
}

.pti-stat-count {
    color: #8fa3ba;
    font-weight: 600;
    min-width: 26px;
    text-align: right;
}

.pti-stat-pct {
    color: #6cb4ff;
    font-size: 11px;
    min-width: 32px;
    text-align: right;
}

.pti-stat-total-power {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255,255,255,0.15);
    font-size: 12.5px;
    color: #c7d3df;
}

.pti-stat-total-power strong {
    color: #6fcf97;
}

.pti-pie-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0 12px;
}

.pti-pie-chart {
    display: block;
}

.pti-pie-total {
    fill: white;
    font-size: 22px;
    font-weight: 700;
}

/* ==== Wiersz checkbox warstwy + przycisk etykiet (żeby oba usiąść po lewej stronie
   summary, a strzałka rozwijania ▸ zostać przy prawej krawędzi) ==== */
.layer-legend-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.pti-label-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #7e93a8;
    cursor: pointer;
}

.pti-label-toggle-btn:hover {
    color: #cfe0f0;
    background: rgba(255,255,255,0.08);
}

.pti-label-toggle-btn .pti-label-toggle-strike {
    display: none;
}

.pti-label-toggle-btn.pti-labels-off {
    color: #e57373;
}

.pti-label-toggle-btn.pti-labels-off .pti-label-toggle-strike {
    display: block;
}

/* ==== Filtr "czyje projekty pokazać" (tylko admin) - ikonka obok "DPTI" ==== */
.pti-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #9fb0c3;
    cursor: pointer;
}

.pti-filter-btn:hover {
    background: rgba(47,128,237,0.25);
    color: white;
}

.pti-filter-btn.hidden {
    display: none;
}

.pti-owner-filter-menu {
    position: fixed;
    z-index: 1400;
    background: rgba(18, 36, 58, 0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    padding: 8px 10px;
    min-width: 170px;
}

.pti-owner-filter-menu.hidden {
    display: none;
}

.pti-owner-filter-title {
    font-size: 11px;
    font-weight: 700;
    color: #8fa3ba;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pti-owner-filter-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    color: white;
    font-size: 12.5px;
    cursor: pointer;
}

.pti-owner-hidden {
    display: none !important;
}

/* ==== Wyszukiwarka działek ULDK (województwo -> obręb -> numer / TERYT) ==== */
.uldk-search-panel {
    position: fixed;
    right: 68px;
    top: 90px;
    z-index: 1300;
    width: 230px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(18, 36, 58, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.uldk-search-panel.hidden {
    display: none;
}

.uldk-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

#uldk-search-panel .uldk-search-header button,
#lead-turbine-panel .uldk-search-header button {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    color: white;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    box-shadow: none;
}

#uldk-search-panel .uldk-search-header button:hover,
#lead-turbine-panel .uldk-search-header button:hover {
    background: rgba(255,255,255,0.18);
}

.uldk-search-label {
    font-size: 11.5px;
    color: #9fb0c3;
    margin-bottom: -3px;
}

.uldk-search-select {
    width: 100%;
    box-sizing: border-box;
}

.uldk-search-select:disabled,
.uldk-search-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.uldk-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 7px;
    background: #0b1624;
    color: white;
    font-size: 13px;
    outline: none;
}

.uldk-search-input:focus {
    border-color: #2f80ed;
}

.uldk-search-checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: white;
    cursor: pointer;
    margin-top: 2px;
}

.uldk-search-checkbox-row input {
    accent-color: #6a1b9a;
}

.uldk-search-error {
    color: #eb5757;
    font-size: 12px;
    line-height: 1.4;
}

.uldk-search-error.hidden {
    display: none;
}

#uldk-search-panel .uldk-search-btn,
#lead-turbine-panel .uldk-search-btn {
    width: 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    padding: 7px 6px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    text-align: center;
    display: block;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #dfe7ef;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#uldk-search-panel .uldk-search-btn-solid-green,
#lead-turbine-panel .uldk-search-btn-solid-green {
    background: rgba(47, 128, 237, 0.14);
    border-color: rgba(47, 128, 237, 0.35);
    color: #8fbcf2;
}

#uldk-search-panel .uldk-search-btn-solid-green:hover,
#lead-turbine-panel .uldk-search-btn-solid-green:hover {
    background: rgba(47, 128, 237, 0.26);
}

#uldk-search-panel .uldk-search-btn-outline-green,
#lead-turbine-panel .uldk-search-btn-outline-green {
    background: transparent;
    color: #9fb0c3;
}

#uldk-search-panel .uldk-search-btn-outline-green:hover,
#lead-turbine-panel .uldk-search-btn-outline-green:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

#uldk-search-panel .uldk-search-btn-outline-green.active,
#lead-turbine-panel .uldk-search-btn-outline-green.active {
    background: rgba(111, 207, 151, 0.14);
    border-color: rgba(111, 207, 151, 0.45);
    color: #b7f0cf;
    box-shadow: 0 0 9px rgba(111, 207, 151, 0.4);
}

#uldk-search-panel .uldk-search-btn-outline-green.active:hover,
#lead-turbine-panel .uldk-search-btn-outline-green.active:hover {
    background: rgba(111, 207, 151, 0.22);
}

#lead-turbine-panel .uldk-search-btn-solid-red {
    background: rgba(231, 76, 60, 0.14);
    border-color: rgba(231, 76, 60, 0.35);
    color: #f2a89a;
    margin-top: 4px;
}

#lead-turbine-panel .uldk-search-btn-solid-red:hover {
    background: rgba(231, 76, 60, 0.28);
    color: #ffcfc5;
}

/* ==== Drukowanie mapy ==== */
.print-panel {
    position: absolute;
    right: 54px;
    top: 0;
    background: rgba(18, 36, 58, 0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.print-panel.hidden {
    display: none;
}

#print-title-input {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 7px;
    background: #0b1624;
    color: white;
    font-size: 13px;
    outline: none;
}

#print-title-input:focus {
    border-color: #2f80ed;
}

.print-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.print-panel-actions button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#print-cancel {
    background: rgba(255,255,255,0.08);
    color: #c7d3df;
}

#print-cancel:hover {
    background: rgba(255,255,255,0.15);
}

#print-confirm {
    background: #2f80ed;
    color: white;
}

#print-confirm:hover {
    background: #1c6fdb;
}

#print-header,
#print-footer {
    display: none;
}

.print-panel-hint {
    font-size: 11.5px;
    line-height: 1.4;
    color: #9fb0c3;
    max-width: 230px;
}

.print-orientation-toggle {
    display: flex;
    gap: 6px;
}

.print-orientation-btn {
    flex: 1;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px;
    color: #9fb0c3;
    cursor: pointer;
}

.print-orientation-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #dbe4ee;
}

.print-orientation-btn.active {
    background: rgba(47,128,237,0.18);
    border-color: #2f80ed;
    color: #2f80ed;
}

.print-extent-frame {
    position: fixed;
    pointer-events: none;
    border: 2px solid #2f80ed;
    box-shadow: 0 0 0 9999px rgba(6, 12, 22, 0.55);
    z-index: 900;
}

.print-extent-frame.hidden {
    display: none;
}

.print-extent-label {
    position: absolute;
    top: -27px;
    left: -2px;
    background: #2f80ed;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 1.5cm;
    }

    html, body {
        height: auto;
        overflow: visible;
        background: white;
    }

    #atlas-app {
        display: block;
        height: auto;
        background: white;
    }

    #topbar,
    #sidebar,
    #right-tools,
    .gpz-route-panel,
    .gpz-route-summary-panel,
    .gpz-route-filter-panel,
    .uldk-search-panel,
    .leaflet-control-zoom,
    .leaflet-control-minimap,
    .leaflet-control-north-arrow {
        display: none !important;
    }

    #map {
        width: calc(100% - 16px);
        height: 14.5cm;
        margin: 6px auto;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    #print-header {
        display: block;
        padding: 4px 0 10px;
        border-bottom: 2px solid #12243a;
        margin-bottom: 10px;
    }

    #print-header h1 {
        margin: 0;
        font-size: 20px;
        color: #12243a;
        font-family: Arial, Helvetica, sans-serif;
    }

    #print-header .print-meta {
        font-size: 11px;
        color: #555;
        font-family: Arial, Helvetica, sans-serif;
    }

    #print-footer {
        display: flex;
        justify-content: space-between;
        font-size: 10px;
        color: #555;
        border-top: 1px solid #ccc;
        padding-top: 6px;
        margin-top: 10px;
        font-family: Arial, Helvetica, sans-serif;
    }
}
