/* ====================================================
    1. GLOBALNE I BAZOWE STYLENIE
    ==================================================== */
body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #050505;
    color: #e0e0e0;
    -webkit-font-smoothing: antialiased;
}

/* Główny kontener dla map Cesium */
#cesiumContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* SUWAK (Splitter) */
#splitter {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #444;
    cursor: ew-resize;
    z-index: 100; 
    display: none;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    transition: background-color 0.2s, width 0.2s;
}
#splitter:hover {
    background-color: #CCFF90; 
    width: 6px;
}

/* ====================================================
   1.2. GLOBALNE STYLE DLA LIST ROZWIJANYCH (SELECT)
   ==================================================== */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Wygląd podstawowy */
    background-color: #1a1a1a; 
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 10px;
    padding-right: 30px; 
    
    outline: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

select:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

select:focus {
    outline: none;
    border-color: #CCFF90;
    box-shadow: 0 0 0 1px rgba(204, 255, 144, 0.2);
}

/* Ciemne tło dla rozwiniętej listy (#222) */
select option {
    background-color: #222 !important;
    color: #fff !important;
    padding: 10px;
    border: none;
}


/* ====================================================
    1.5. UKRYWANIE STANDARDOWYCH WIDŻETÓW CESIUM
    ==================================================== */
.cesium-widget-credits,
.cesium-viewer-geocoderContainer,
.cesium-viewer-toolbar,
.cesium-viewer-baseLayerPickerContainer,
.cesium-viewer-fullscreenContainer,
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer {
    display: none !important;
}

/* ====================================================
    1.6. LOGO FIRMY (PRAWY DOLNY RÓG)
    ==================================================== */
#brandingLogoContainer {
    position: absolute;
    bottom: 35px;
    right: 15px;
    z-index: 10000;    
    pointer-events: none;
    margin: 0;
    padding: 0;
    line-height: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
#brandingLogoContainer:hover {
    opacity: 1;
}

#brandingLogoContainer a {
    pointer-events: auto;
    cursor: pointer;
    display: block;
}

#brandingLogoContainer img {
    display: block;
    height: 70px;
    width: auto;
    background-color: transparent;
    border: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ====================================================
    2. PASEK STATUSU KOORDYNAT (Dolny pasek)
    ==================================================== */
#coordinateStatus {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    
    /* GRUPA JASNA (0.7) */
    background-color: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    
    color: #bbb;
    padding: 0 10px;
    line-height: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    
    z-index: 20001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* Sztywna szerokość kontenera USUNIĘTA - teraz dopasowuje się do treści */
#coordinatesDisplay {
    display: flex;
    align-items: center;
    width: auto; 
    flex-shrink: 0;
}

/* Środkowy obszar elastyczny (Flex Grow) */
#centerStatusArea {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow: hidden;
}

/* Wrapper dla powiadomień (33% szerokości) */
#notificationWrapper {
    width: 66%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    white-space: nowrap;
}

/* Sztywna szerokość dla prawej strony */
#rightStatusArea {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    width: auto;
    flex-shrink: 0;
    
    gap: 12px; 
    padding-right: 0; 
}
/* Zerujemy margines separatora wewnątrz prawej sekcji */
#rightStatusArea .coord-separator {
    margin: 0;
}

.coord-group {
    display: flex;
    align-items: center;
    gap: 2px; 
    justify-content: flex-start;
}

/* ZMIANA: USUNIĘTO SZTYWNE SZEROKOŚCI DLA GRUP */
#coordinatesDisplay .coord-group:first-child { width: auto; }
#coordinatesDisplay .coord-group:nth-child(3) { width: auto; }

/* Styl dla ikon przy współrzędnych (Globus / Celownik) */
.coord-icon {
    font-size: 14px;
    color: #ccc; 
    margin: 0;
    opacity: 0.7;
    cursor: default; 
}

/* Blokowanie "skakania" cyfr i przecinka */
#coordValueGeo, #coordValueProj {
    font-variant-numeric: tabular-nums; 
    -moz-font-feature-settings: "tnum";
    -webkit-font-feature-settings: "tnum";
    font-feature-settings: "tnum";
    letter-spacing: 0.5px;
}

.coord-select {
    height: 22px;
    font-size: 11px;
    padding: 0 24px 0 6px;
    background-position: right 4px center;
    background-size: 10px;
    color: #CCFF90; 
    border-color: rgba(255,255,255,0.2);
    background-color: rgba(255,255,255,0.05) !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CCFF90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.coord-select:hover {
    border-color: #CCFF90;
    background-color: rgba(255,255,255,0.1) !important;
}

.coord-select option {
    background-color: #222 !important;
    color: #fff !important;
    border: none;
}

.coord-separator {
    color: #444;
    font-size: 14px;
    margin: 0 12px;
}

/* --- SYSTEMOWE POWIADOMIENIA (Wewnątrz wrappera) --- */
#systemNotification {
    flex-grow: 1;
    /* Wypełnia przestrzeń między kreskami wrappera */
    text-align: left; 
    
    color: #bbb; 
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400; 
    letter-spacing: 0.5px;
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    margin: 0;
    /* Animacja pojawiania się */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Klasa dodawana przez JS, gdy jest komunikat */
#systemNotification.visible {
    opacity: 1;
}

/* ZMIANA: Animacja migania alertów */
@keyframes lime-pulse {
    0% { color: #bbb; text-shadow: none; }
    50% { color: #CCFF90; text-shadow: 0 0 8px rgba(204, 255, 144, 0.6); }
    100% { color: #bbb; text-shadow: none; }
}

.blink-alert {
    animation: lime-pulse 1s ease-in-out infinite;
    font-weight: 600;
}

#toastNotification { display: none !important; }


#fullscreenButtonContainer {
    padding-right: 0;
    display: flex;
    align-items: center;
}

#fullscreenButtonContainer .cesium-button {
    background-color: transparent;
    border: none;
    color: #aaa;
    font-size: 16px;
    padding: 0 8px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}
#fullscreenButtonContainer .cesium-button:hover { 
    color: #fff;
    transform: scale(1.1);
}

/* ====================================================
    2.5. KONTENER ATRYBUCJI I POMOCY
    ==================================================== */
#creditsContainer, #helpContainer {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Wspólny styl dla ikony "i" (Credits) oraz "?" (Help) */
#creditsIcon, #helpIcon {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    /* Wspólne flexboxowanie do centrowania */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: all 0.2s;
    cursor: pointer;
}

#creditsIcon {
    font-family: serif;
    font-weight: bold;
    font-style: italic;
}

#helpIcon i {
    font-size: 12px;
    font-style: normal;
}

#creditsIcon:hover, #helpIcon:hover {
    background-color: #CCFF90;
    color: #000;
    border-color: #CCFF90;
    box-shadow: 0 0 8px rgba(204, 255, 144, 0.4);
}

/* Tło dymku atrybucji identyczne jak panel boczny i info */
#creditsPopup {
    display: none;
    position: absolute;
    bottom: 40px;
    right: 0;
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    /* GRUPA CIEMNA (0.9) */
    background-color: rgba(30, 30, 30, 0.9); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    color: #d0d0d0;
    border: 1px solid rgba(255, 255, 255, 0.08); /* Spójna ramka */
    border-radius: 8px;
    padding: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    z-index: 20000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#creditsContainer:hover #creditsPopup {
    display: block;
    animation: fadeIn 0.2s ease;
}

#creditsPopup.visible {
    display: block !important;
}

#creditsPopup * {
    display: inline !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#creditsPopup div {
    display: block !important; 
    margin-bottom: 8px;
}

#creditsPopup a {
    color: #7FC96B !important;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}
#creditsPopup a:hover { 
    color: #CCFF90 !important;
    text-decoration: underline;
}
#creditsPopup img {
    height: 12px !important; 
    vertical-align: middle;
    margin: 0 3px;
    opacity: 0.8;
}

#creditsPopup::-webkit-scrollbar { width: 4px; }
#creditsPopup::-webkit-scrollbar-track { background-color: transparent; }
#creditsPopup::-webkit-scrollbar-thumb { background-color: #555; border-radius: 2px; }

/* CESIUM DEFAULT LIGHTBOX (To co się otwiera po kliknięciu linków) */
.cesium-credit-lightbox-overlay {
    background-color: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.cesium-credit-lightbox {
    /* GRUPA CIEMNA (0.9) - Nadpisanie domyślnego tła */
    background-color: rgba(30, 30, 30, 0.9) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: #eee !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7) !important;
}

.cesium-credit-lightbox > ul > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Delikatniejsza linia */
}
.cesium-credit-lightbox a {
    color: #7FC96B !important;
}

/* ====================================================
    3. KONTROLKI NAWIGACYJNE
    ==================================================== */
.nav-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#navigationControls {
    position: absolute;
    top: 20px;
    right: 15px;
    /* GRUPA JASNA (0.7) */
    background-color: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    border-radius: 12px;
    padding: 8px;
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-btn, 
#sceneModeBtn, 
#splitViewBtn,
#compassContainer { 
    background-color: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border: 1px solid transparent;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    padding: 0;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin: 0;
    box-sizing: border-box;
    text-align: center;
}

.nav-btn:hover, #sceneModeBtn:hover, #splitViewBtn:hover, #compassContainer:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-btn.active, #splitViewBtn.active {
    background-color: #CCFF90;
    color: #1a1a1a;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(204, 255, 144, 0.4);
}

#compassContainer {
    font-size: 18px;
    margin-bottom: 4px;
    border-radius: 50%;
}

#sceneModeBtn {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

#splitViewBtn {
    font-size: 16px;
}

#compassIcon {
    display: block;
    transform-origin: center;
    transition: transform 0.1s ease-out;
}

/* ====================================================
    4. PANEL BOCZNY (SIDEBAR)
    ==================================================== */
#appSidebar {
    position: absolute;
    top: 20px;
    left: 15px;
    z-index: 1000;
    display: flex;
    max-height: calc(100% - 100px);
    pointer-events: none;
}

#sidebarTabs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

.sidebar-tab-btn {
    /* GRUPA JASNA (0.7) */
    background-color: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Spójna ramka */
    border-radius: 12px;
    width: 54px;
    height: 54px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-tab-btn span {
    font-size: 22px;
}

.sidebar-tab-btn:hover {
    background-color: rgba(50, 50, 50, 0.8);
    color: #fff;
    transform: translateX(3px);
}

.sidebar-tab-btn.active {
    background-color: #CCFF90;
    color: #1a1a1a;
    border: none;
    box-shadow: 0 0 20px rgba(204, 255, 144, 0.3);
    transform: scale(1.05);
}

#sidebarContent {
    /* GRUPA JASNA (0.7) */
    background-color: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    color: #e0e0e0;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    /* Zmniejszona szerokość panelu */
    width: 300px; 
    
    margin-left: 15px;
    pointer-events: auto; 
    overflow-y: auto;
    /* Ukrycie poziomego suwaka */
    overflow-x: hidden;
    
    border: 1px solid rgba(255, 255, 255, 0.08);
    visibility: hidden;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#sidebarContent::-webkit-scrollbar { width: 6px; }
#sidebarContent::-webkit-scrollbar-track { background-color: transparent; }
#sidebarContent::-webkit-scrollbar-thumb { 
    background-color: rgba(255,255,255,0.2);
    border-radius: 3px; 
}
#sidebarContent::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.3); }

#appWrapper.sidebar-active #sidebarContent {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

.sidebar-content-pane {
    display: none;
}

.sidebar-content-pane.active {
    display: block; 
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ====================================================
    5. ELEMENTY WEWNĄTRZ PANELU
    ==================================================== */

/* Nagłówki H3 - Odstępy 15px, długa linia */
#sidebarContent h3 {
    margin-top: 15px;
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    
    display: block;
    width: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); 
    padding-bottom: 8px; 
    opacity: 0.95; 
}
#sidebarContent h3:first-child { margin-top: 0; }

/* Panel Warstw - Krótka linia */
#tabContentLayers h3 {
    display: inline-block;
    width: fit-content;
}

/* Panel Header - Długa linia */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); 
    margin-top: 15px;
    margin-bottom: 15px;
    padding-bottom: 8px;
}
.panel-header:first-child { margin-top: 0; }

.panel-header h3 {
    margin: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

/* Grupowanie przycisków w nagłówku sekcji (Reset + Toggle) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-reset-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    color: #aaa;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    
    /* ZMIANA: Zwiększono z 14px na 16px dla lepszej czytelności i dopasowania */
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    
    /* ZMIANA: Wyzerowanie paddingu zapewnia idealne wyśrodkowanie flexboxem */
    padding: 0;
}
.icon-reset-btn:hover {
    background-color: #CCFF90;
    color: #1a1a1a;
}

/* Specjalny styl dla przycisku Export (Pobierz) */
#btnExportMeasurements {
    color: #aaa;
    /* ZMIANA: Domyślnie szary (nieaktywny) */
    transition: color 0.2s;
}

/* Stan: Są dane do pobrania (Klasa dodawana przez JS) */
#btnExportMeasurements.has-data {
    color: #CCFF90 !important;
    /* Limonkowy */
    text-shadow: 0 0 5px rgba(204, 255, 144, 0.3);
}

/* Hover na nieaktywnym (szarym) - robi się biały */
#btnExportMeasurements:hover {
    color: #fff;
}

/* Hover na aktywnym (limonkowym) - robi się ciemny dla kontrastu z tłem */
#btnExportMeasurements.has-data:hover {
    color: #1a1a1a !important;
    text-shadow: none;
}

/* 1. Stan "Brudny" (Zmienione ustawienia) - TYLKO kolor ikony */
.icon-reset-btn.active-state {
    color: #CCFF90 !important;
    /* Limonkowa ikona */
    text-shadow: 0 0 5px rgba(204, 255, 144, 0.5);
    /* Delikatna poświata samej ikony */
    border: none !important;
    /* Brak obramowania */
    transform: none !important;
    /* Brak powiększania */
}

/* 2. Hover na stanie "Brudnym" - Ikona musi stać się ciemna, bo tło jest limonkowe */
.icon-reset-btn.active-state:hover {
    color: #1a1a1a !important;
    /* Ciemny kolor dla kontrastu */
    text-shadow: none;
}

/* --- Klasa sugerująca akcję (Limonkowa ikona) --- */
.icon-reset-btn.suggest-action {
    color: #CCFF90 !important;
    text-shadow: 0 0 5px rgba(204, 255, 144, 0.5);
    opacity: 1;
}

/* NOWOŚĆ: Hover na przycisku sugerującym akcję */
/* Gdy tło robi się limonkowe, ikona musi zrobić się ciemna dla kontrastu */
.icon-reset-btn.suggest-action:hover {
    color: #1a1a1a !important;
    text-shadow: none; /* Usuwamy poświatę przy hoverze, bo ikona jest ciemna */
}

/* Stan nieaktywny/domyślny dla tych przycisków */
.icon-reset-btn.view-active {
    color: #555 !important;
    /* Przygaszony, bo już tu jesteśmy */
    cursor: default;
}

.panel-divider {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
    margin: 15px 0;
}

.filter-group {
    margin-bottom: 15px;
    font-size: 13px;
}
.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
}

#sidebarContent input[type="text"],
#sidebarContent input[type="number"],
#sidebarContent textarea, 
.filter-button {
    width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

/* Dropdown w panelu bocznym - Wygląd identyczny jak inputów (półprzezroczysty) */
#sidebarContent select {
    width: 100%;
    height: 36px;
    font-size: 12px;
    /* Półprzezroczyste tło jak w input */
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    
    border-radius: 6px;
    padding: 2px 4px;
    font-size: 11px; 
    height: 32px;
    /* Wysokość selecta */
}

#sidebarContent input:focus,
#sidebarContent textarea:focus {
    outline: none;
    background-color: rgba(0, 0, 0, 0.4);
    border-color: #CCFF90;
    box-shadow: 0 0 0 2px rgba(204, 255, 144, 0.1);
}

#sidebarContent input::placeholder,
#sidebarContent textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: normal;
}

.min-max-group {
    display: flex;
    gap: 10px;
}
.min-max-group input { width: 50%; }

.filter-button {
    cursor: pointer;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    font-weight: 600;
    margin-top: 5px;
}
.filter-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Przycisk exportu */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
    /* Ważne */
}

.filter-actions button {
    flex: 1;
    width: auto;
}

.filter-button.primary {
    background-color: #CCFF90;
    color: #0e0e0e;
    border: none;
}
.filter-button.primary:hover {
    background-color: #bfff6e;
    box-shadow: 0 4px 15px rgba(204, 255, 144, 0.25);
}

.measurement-tools-inline {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.tool-button {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

#measurementTools .tool-button.active {
    background-color: #CCFF90 !important;
    color: #000 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(204, 255, 144, 0.3);
}
#measurementTools .tool-button.active i,
#measurementTools .tool-button.active img {
    filter: brightness(0);
    opacity: 1 !important;
}

.tool-button img,
.tool-button i {
    opacity: 0.7;
    transition: all 0.2s ease;
}
.tool-button:hover img,
.tool-button:hover i {
    opacity: 1.0;
}

/* ====================================================
    6. PRZEŁĄCZNIKI WARSTW (EYE TOGGLE)
    ==================================================== */
.layer-switch {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 14px;
    font-size: 14px;
    user-select: none;
}

.layer-switch.master-switch {
    margin-top: 15px; 
    margin-bottom: 15px;
    justify-content: space-between !important; 
    width: 100%;
    
    /* ZMIANA: Dodanie linii na całą szerokość kontenera (jak w .panel-header) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    /* ZMIANA NAPRAWCZA: 
       Zwiększono z 2px na 8px (zgodnie z .panel-header w Pomiarach).
       To naprawia "pomarańczowe znaczniki" (odstęp od linii). 
    */
    padding-bottom: 8px;
    /* ZMIANA NAPRAWCZA:
       Wymuszenie centrowania w pionie.
       To naprawia "niebieskie kreski" (tekst i ikony w jednej osi).
    */
    align-items: center !important; 
    display: flex;
}
.layer-switch.master-switch:first-child { margin-top: 0; }

.layer-switch.master-switch h3 {
    /* ZMIANA NAPRAWCZA: Dodano !important, aby nadpisać marginesy z "#sidebarContent h3" */
    margin: 0 !important;
    padding-bottom: 0 !important;
    display: inline-block;
    width: fit-content;
    border-bottom: none !important;
    /* ZMIANA: Ustawienie wysokości linii na neutralną, co ułatwia centrowanie */
    line-height: 1.2;
}

/* ZMIANA: PRZESUNIĘCIE IKONY OKA W GŁÓWNYCH PRZEŁĄCZNIKACH */
.layer-switch.master-switch .eye-toggle {
    margin-bottom: 0 !important;
    /* ZMIANA: Usunięcie marginesu */
    transform: none !important;
    /* RESETUJEMY przesunięcie - teraz flexbox to wyrówna */
}

.layer-group {
    padding-left: 0; 
    margin-bottom: 20px;
    border-left: none;
}

.layer-label {
    margin-left: 12px;
    flex-grow: 0;
    flex-shrink: 0;
    color: #ddd;
    font-weight: 400;
}

/* --- STYL DLA IKONY OKA (EYE TOGGLE) --- */
.eye-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 4px;
    user-select: none;
}

.eye-toggle input {
    display: none;
    /* Ukryty checkbox */
}

/* Domyślny stan (Wyłączony) - SZARE ZWYKŁE OKO (zamiast przekreślonego) */
.eye-toggle .icon-box::before {
    font-family: 'bootstrap-icons';
    content: "\f341"; /* Ikona eye-fill (zwykłe oko) */
    font-size: 16px;
    color: #666;
    /* Kolor szary dla nieaktywnego */
    transition: all 0.2s ease;
}

/* Stan zaznaczony (Włączony) - ZIELONE OKO */
.eye-toggle input:checked + .icon-box::before {
    content: "\f341";
    /* Ikona eye-fill */
    color: #CCFF90;   /* Zielony aktywny */
    text-shadow: 0 0 8px rgba(204, 255, 144, 0.3);
}

.eye-toggle:hover .icon-box::before {
    color: #fff;
    transform: scale(1.1);
}

/* --- STYL DLA KLASYCZNEGO SWITCHA (Pozostałe użycia jeśli są) --- */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background-color: #fff;
  transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider { 
    background-color: #2D6A4F;
}
input:checked + .slider:before { 
    transform: translateX(16px);
    background-color: #fff;
}

.slider.round { border-radius: 22px; }
.slider.round:before { border-radius: 50%; }

/* KONTENER SUWAKA W WARSTWACH (DRZEWA) */
.layer-slider-container {
    padding: 0;
    /* To wyrównuje suwak do prawej krawędzi, tak jak w pomiarach */
    margin-left: auto;
    display: flex;
    align-items: center;
    
    /* SZTYWNA SZEROKOŚĆ - TAKA SAMA JAK W POMIARACH (140px) */
    width: 140px;
}

/* RANGE SLIDER - MODYFIKACJA (IKONA CHOINKI - MAŁA) */
.range-slider {
    width: 100%;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
    border-radius: 2px;
    transition: background-color 0.2s;
}

/* --- STYL DLA CHROME, EDGE, SAFARI, OPERA --- */
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    /* Zmniejszony rozmiar ikony (15px to ok. 60% z poprzednich 24px) */
    width: 15px;
    height: 15px;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;

    /* IKONA CHOINKI (Biała) - Kształt drzewa iglastego */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e0e0e0' class='bi bi-tree-fill' viewBox='0 0 16 16'%3E%3Cpath d='M8.416.223a.5.5 0 0 0-.832 0l-3 4.5A.5.5 0 0 0 5 5.5h.098L3.076 8.735A.5.5 0 0 0 3.5 9.5h.191l-1.638 3.273a.5.5 0 0 0 .447.727H7V16h2v-2.5h4.5a.5.5 0 0 0 .447-.727L12.31 9.5h.191a.5.5 0 0 0 .424-.765L10.902 5.5h.098a.5.5 0 0 0 .416-.777l-3-4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    
    /* Centrowanie: (15px wysokość - 4px pasek) / 2 = 5.5px przesunięcia w górę */
    margin-top: -6px;
    transition: transform 0.2s, background-image 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    /* Nieco większe powiększenie przy małej ikonie, żeby łatwiej złapać */
    /* IKONA CHOINKI (Zielona #CCFF90) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23CCFF90' class='bi bi-tree-fill' viewBox='0 0 16 16'%3E%3Cpath d='M8.416.223a.5.5 0 0 0-.832 0l-3 4.5A.5.5 0 0 0 5 5.5h.098L3.076 8.735A.5.5 0 0 0 3.5 9.5h.191l-1.638 3.273a.5.5 0 0 0 .447.727H7V16h2v-2.5h4.5a.5.5 0 0 0 .447-.727L12.31 9.5h.191a.5.5 0 0 0 .424-.765L10.902 5.5h.098a.5.5 0 0 0 .416-.777l-3-4.5z'/%3E%3C/svg%3E");
}

/* --- STYL DLA FIREFOX --- */
.range-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    
    /* IKONA CHOINKI (Biała) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e0e0e0' class='bi bi-tree-fill' viewBox='0 0 16 16'%3E%3Cpath d='M8.416.223a.5.5 0 0 0-.832 0l-3 4.5A.5.5 0 0 0 5 5.5h.098L3.076 8.735A.5.5 0 0 0 3.5 9.5h.191l-1.638 3.273a.5.5 0 0 0 .447.727H7V16h2v-2.5h4.5a.5.5 0 0 0 .447-.727L12.31 9.5h.191a.5.5 0 0 0 .424-.765L10.902 5.5h.098a.5.5 0 0 0 .416-.777l-3-4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    transition: transform 0.2s, background-image 0.2s;
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
    /* IKONA CHOINKI (Zielona #CCFF90) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23CCFF90' class='bi bi-tree-fill' viewBox='0 0 16 16'%3E%3Cpath d='M8.416.223a.5.5 0 0 0-.832 0l-3 4.5A.5.5 0 0 0 5 5.5h.098L3.076 8.735A.5.5 0 0 0 3.5 9.5h.191l-1.638 3.273a.5.5 0 0 0 .447.727H7V16h2v-2.5h4.5a.5.5 0 0 0 .447-.727L12.31 9.5h.191a.5.5 0 0 0 .424-.765L10.902 5.5h.098a.5.5 0 0 0 .416-.777l-3-4.5z'/%3E%3C/svg%3E");
}

/* ====================================================
    7. WIDOK PODZIELONY
    ==================================================== */
.split-active #cesiumContainer {
    width: 50% !important;
    left: 0;
}
#cesium2DContainer {
    left: 50%; width: 50%;
}

/* ====================================================
    8. PANEL INFORMACJI O OBIEKCIE (SQUASH EFFECT)
    ==================================================== */
#appWrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

#featureInfoPanel {
  position: fixed;
  top: 0;
  right: 0; bottom: 0;
  width: 360px;
  height: auto;
  
  /* GRUPA JASNA (0.7) */
  background-color: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border-left: 1px solid rgba(255, 255, 255, 0.08); /* Spójna ramka */
  color: #eee;
  z-index: 2000;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Stan aktywny - zwężamy mapę */
body.info-panel-active #appWrapper {
    width: calc(100% - 360px);
}
body.info-panel-active #featureInfoPanel {
    transform: translateX(0);
}

/* --- NOWY NAGŁÓWEK PANELU INFO --- */
.feature-info-header {
    display: flex;
    justify-content: flex-end; /* Wyrównaj do prawej */
    padding: 15px;
    /* Opcjonalnie: przyklejony nagłówek podczas przewijania */
    /* position: sticky; top: 0; background: inherit; z-index: 10; */
}

/* Grupa przycisków */
.header-buttons {
    display: flex;
    gap: 10px;
    /* Odstęp między przyciskami */
}

/* WSPÓLNY STYL DLA PRZYCISKÓW W NAGŁÓWKU (Zamknij i Pobierz) */
#featureInfoCloseBtn, 
#featureInfoDownloadBtn {
  /* Usunięto pozycjonowanie absolutne */
  position: relative;
  background-color: rgba(255,255,255,0.05);
  border: none; border-radius: 50%;
  font-size: 16px;
  width: 32px; height: 32px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center; align-items: center;
}

/* Styl dla przycisku ZAMKNIJ */
#featureInfoCloseBtn { 
    color: #ccc;
}
#featureInfoCloseBtn:hover { 
    background-color: rgba(255,255,255,0.15); 
    color: #fff;
}

/* Styl dla przycisku POBIERZ (zawsze limonkowy) */
#featureInfoDownloadBtn {
    color: #CCFF90;
    /* Zawsze limonkowy */
}
#featureInfoDownloadBtn:hover {
    background-color: rgba(255,255,255,0.15);
    /* Kolor ikony bez zmian przy hover */
}

/* Dostosowanie paddingu treści (bo jest nagłówek) */
#featureInfoContent {
  padding: 0 25px 25px 25px;
  /* Mniejszy padding z góry */
  height: calc(100% - 62px); /* Odejmujemy wysokość nagłówka */
  overflow-y: auto;
  box-sizing: border-box; 
  scrollbar-width: thin;
}
#featureInfoContent::-webkit-scrollbar { width: 4px; }
#featureInfoContent::-webkit-scrollbar-thumb { background-color: #555; border-radius: 2px; }

#featureInfoContent h2 { 
    margin-top: 0;
    color: #CCFF90;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px;
    border-bottom: 1px solid rgba(204, 255, 144, 0.2);
    padding-bottom: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: baseline;
}
.info-label { font-weight: 500; color: #888; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { color: #fff; text-align: right; font-weight: 500; }

.info-image-container {
  width: 100%;
  border-radius: 8px;
  margin: 20px 0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.info-image-container img { width: 100%; display: block; }

/* Usunięto styl .info-button, ponieważ przycisk został przeniesiony do nagłówka */

/* ====================================================
    9. MENU KONTEKSTOWE
    ==================================================== */
.context-menu {
    position: absolute;
    z-index: 3000;
    
    /* GRUPA JASNA (0.7) */
    background-color: rgba(30, 30, 30, 0.7); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    /* ZMIANA: Spójne obramowanie */
    border: 1px solid rgba(255, 255, 255, 0.08);
    
    border-radius: 12px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    min-width: 200px;
    display: none;
    animation: fadeIn 0.15s ease;
}

.ctx-menu-btn {
    background-color: transparent;
    border: none;
    color: #eee;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.ctx-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Przycisk usuwania dziedziczy standardowe style .ctx-menu-btn */
.ctx-menu-btn i { margin-right: 10px; font-size: 16px; opacity: 0.8; }

/* ====================================================
    10. EKRAN ŁADOWANIA
    ==================================================== */
#loadingScreen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #050505;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader {
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid #CCFF90;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingScreen p {
    color: #888;
    font-size: 14px;
    letter-spacing: 2px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}
body.loaded #loadingScreen { opacity: 0; visibility: hidden; }

/* ====================================================
    12. RESPONSYWNOŚĆ
    ==================================================== */
@media (max-width: 768px) {
    #sidebarContent { width: 260px; }
    #featureInfoPanel { width: 100%; bottom: 0; top: auto; height: 60%; border-radius: 20px 20px 0 0; transform: translateY(100%); }
    body.info-panel-active #featureInfoPanel { transform: translateY(0); }
    
    .nav-btn, #sceneModeBtn, #splitViewBtn, #compassContainer { width: 32px; height: 32px; line-height: 32px; font-size: 14px; }
    
    #sidebarTabs { flex-direction: row; bottom: 20px; top: auto; left: 50%; transform: translateX(-50%); }
    .sidebar-tab-btn { width: 44px; height: 44px; }
}

/* ====================================================
    13. INNE (Adnotacje)
    ==================================================== */
.floating-annotation-input {
    position: absolute;
    z-index: 10000;
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid #CCFF90;
    padding: 12px;
    border-radius: 8px;
    outline: none;
    min-width: 250px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translate(15px, -15px);
}

/* ====================================================
   14. ZAAWANSOWANA STYLIZACJA POMIARÓW
   ==================================================== */
/* Główny wiersz ustawień - wyrównanie etykieta <-> kontrolka */
.style-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative; 
    height: 32px;
    /* Wysokość wiersza */
}

/* Etykieta (tekst po lewej) */
/* Używamy '>' aby nie łapać labela wewnątrz switcha */
.style-row > label {
    color: #bbb;
    font-size: 13px;
    margin: 0;
    
    flex: 1; /* Zajmuje dostępną przestrzeń po lewej */
    white-space: nowrap;
}

/* --- ZMIANA: ZMNIEJSZONO SZEROKOŚĆ ELEMENTÓW Z 170px NA 140px (dla panelu 300px) --- */
.style-control-width {
    width: 140px !important;
    flex: 0 0 140px; 
    box-sizing: border-box;
}

/* Dropdown w Stylizacji - Styl jak input (półprzezroczysty) */
.style-row select {
    width: 140px !important;
    /* Zgodne z .style-control-width */
    
    /* Półprzezroczyste tło jak w inputach */
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    
    border-radius: 6px;
    padding: 2px 4px;
    font-size: 11px; 
    height: 32px;
    /* Wysokość selecta */
}

/* --- ZMIANA: NOWA PALETA KOLORÓW (KÓŁKA INLINE) --- */
.color-palette-container {
    display: flex;
    flex-wrap: wrap; /* Pozwala na zawijanie wierszy jeśli braknie miejsca */
    gap: 6px;
    /* Odstęp między kółkami */
    justify-content: flex-end;
    /* Wyrównaj do prawej */
    width: 140px !important;
    /* Zgodne z .style-control-width */
}

.color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent; /* Miejsce na border */
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box; /* Żeby border nie powiększał elementu */
}

.color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 0 5px rgba(255,255,255,0.2);
}

/* Aktywne kółko - biała obwódka */
.color-swatch.active {
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 6px rgba(255,255,255,0.6);
}

/* --- Suwaki (Range Slider) wewnątrz wiersza --- */
.style-row .range-slider {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* ====================================================
   STYLISTYKA CUSTOMOWEGO DROPDOWNA JĘZYKOWEGO
   ==================================================== */

/* Kontener główny - sam tekst PL na pasku */
.custom-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* ZMIANA: Usunięto margin-right: 8px.
       Teraz gap rodzica (#rightStatusArea) steruje odstępem */
    margin-right: 0; 
    
    cursor: pointer;
    height: 100%;
}

/* Tekst widoczny na pasku (nieaktywny ma kolor szary jak ikony) */
.current-lang {
    color: #ccc;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 0 6px; 
    transition: color 0.2s;
    user-select: none;
}

/* Podświetlenie TYLKO gdy dodana klasa .active (kliknięcie) */
.custom-dropdown.active .current-lang {
    color: #CCFF90;
}

/* Lista rozwijana (pojemnik) */
.dropdown-list {
    /* ZMIANA 2: Zamiast display: none (które powoduje skakanie), używamy visibility */
    /* USUNIĘTO SKAKANIE - TERAZ PŁYNNIE PRZENIKA */
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Blokuje klikanie gdy niewidoczne */
    
    position: absolute;
    /* ZMIANA 3: Ustawiono bottom na 30px (wysokość paska), żeby menu stykało się z paskiem */
    bottom: 30px;
    left: 50%;
    
    /* Centrowanie listy względem przycisku */
    transform: translateX(-50%);
    /* GRUPA CIEMNA (0.9) - dla listy języków */
    background-color: rgba(30, 30, 30, 0.9); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    min-width: 44px; /* Szerokość menu */
    padding: 0;
    /* Z-index wyższy niż logo */
    z-index: 20002;
    /* ZMIANA: Ramka */
    border: 1px solid rgba(255,255,255,0.08);
    
    border-radius: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    /* Płynne pojawianie się (tylko opacity) */
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* WAŻNE: Pokaż listę TYLKO gdy dodana jest klasa .active (przez kliknięcie w JS) */
/* USUNIĘTO regułę :hover, która powodowała otwieranie myszką */
.custom-dropdown.active .dropdown-list {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Pojedyncza opcja w liście - ZMIANA WYSOKOŚCI NA 30PX (jak pasek) */
.lang-option {
    /* ZMIANA: Sztywna wysokość 30px (zgodnie z wysokością paska) */
    height: 30px;
    /* ZMIANA: Padding poziomy 10px, pionowy 0 (bo flexbox centruje) */
    padding: 0 10px;
    /* ZMIANA: Flexbox do idealnego centrowania tekstu w pionie i poziomie */
    display: flex;
    align-items: center;
    justify-content: center;
    
    color: #eee; 
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s;
    /* ZMIANA 5: DODANO SEPARATOR: Kreska na dole */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Usuwamy kreskę z ostatniego elementu (EN) */
.lang-option:last-child {
    border-bottom: none;
}

.lang-option.active {
    color: #CCFF90;
    font-weight: 600;
}

.lang-option.active:hover {
    color: #CCFF90;
    font-weight: 600;
}

.lang-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- NOWE STYLE DLA MENU WSPÓŁRZĘDNYCH (Styl "Flat" - Krok 3) --- */

/* Modyfikacja wyglądu custom-dropdown dla współrzędnych - Styl "Płaski Text" */
.coord-dropdown {
    height: 100%;
    /* Wysokość paska */
    padding: 0 6px; /* Minimalny odstęp boczny */
    border: none;
    /* Brak ramki */
    border-radius: 0;
    background-color: transparent;
    /* Przeźroczyste tło */
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* USUNIĘTO STRZAŁKĘ I TŁO */
    background-image: none; 
    
    min-width: auto;
    /* Automatyczna szerokość (wąskie) */
}

/* Hover na samym tekście/obszarze przycisku */
.coord-dropdown:hover {
    background-color: rgba(255,255,255,0.1);
    /* Delikatne podświetlenie tła przy najechaniu */
}

/* Tekst wybranej wartości */
.current-value {
    font-size: 11px;
    color: #CCFF90;
    /* Limonkowy tekst */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    white-space: nowrap;
}

/* Dostosowanie listy rozwijanej dla współrzędnych */
.coord-dropdown .dropdown-list {
    bottom: 30px;
    /* Idealnie nad paskiem */
    left: 50%;
    transform: translateX(-50%);
    /* Centrowanie względem tekstu */
    
    min-width: 90px;
    /* Minimalna szerokość listy, żeby teksty się mieściły */
    width: max-content;
    /* Rozszerz jeśli tekst jest długi */
    
    /* GRUPA CIEMNA (0.9) - dla listy współrzędnych */
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    /* ZMIANA: Spójne obramowanie */
    border: 1px solid rgba(255,255,255,0.08);
    /* OSTRE ROGI */
    border-radius: 0; 
    
    z-index: 20005;
    padding: 0;
    /* Płynne pojawianie się */
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Opcje w liście - ZMIANA WYSOKOŚCI NA 30PX (jak pasek) */
.dropdown-option {
    /* ZMIANA: Sztywna wysokość 30px (zgodnie z wysokością paska) */
    height: 30px;
    /* ZMIANA: Padding poziomy 10px, pionowy 0 (bo flexbox centruje) */
    padding: 0 10px;
    /* ZMIANA: Flexbox do idealnego centrowania tekstu w pionie i poziomie */
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 11px;
    color: #eee;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s;
    white-space: nowrap;
    text-align: center; /* Wyśrodkowanie tekstu w liście */
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: rgba(255,255,255,0.15);
    color: #fff;
}

.dropdown-option.active {
    color: #CCFF90;
    font-weight: 600;
    background-color: rgba(204, 255, 144, 0.1);
}

/* ====================================================
   ANIMACJE POWIADOMIEŃ (MIGANIE ALERTÓW)s
   ==================================================== */
@keyframes lime-pulse {
    0% { color: #bbb; text-shadow: none; }
    50% { color: #CCFF90; text-shadow: 0 0 8px rgba(204, 255, 144, 0.6); }
    100% { color: #bbb; text-shadow: none; }
}

/* Klasa dodawana dynamicznie przez JS do alertów tymczasowych */
.blink-alert {
    animation: lime-pulse 1s ease-in-out infinite;
    font-weight: 600; /* Lekkie pogrubienie dla lepszej czytelności alertu */
}

/* ZMIANA: Klasa zmieniająca tylko kolor tekstu na limonkowy */
#btnResetLayers.btn-text-lime {
    color: #CCFF90 !important;
}

/* ====================================================
    15. CENTRUM POMOCY - NOWY UKŁAD (FULL HEADER)
    ==================================================== */

/* Animacja migania (Sonar) przycisku pomocy */
@keyframes sonar-wave {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(2.5); }
}

#helpIcon.attention {
    border-color: #CCFF90;
    color: #CCFF90;
    background-color: rgba(204, 255, 144, 0.1);
    position: relative;
    z-index: 1;
}

#helpIcon.attention::before,
#helpIcon.attention::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px; /* Fit border */
    border: 1px solid #CCFF90;
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
    animation: sonar-wave 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

#helpIcon.attention::after {
    animation-delay: 0.8s;
}

/* --- Modal Overlay --- */
.help-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 30000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

/* --- Główny Kontener Modala (Flex Kolumnowy) --- */
.help-modal-content.dashboard-layout {
    display: flex;
    flex-direction: column; /* GÓRA: Header, DÓŁ: Body */
    width: 800px;
    height: 520px;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    color: #e0e0e0;
    overflow: hidden; /* Zaokrąglone rogi dla całości */
}

/* === GÓRNY NAGŁÓWEK (Na całą szerokość) === */
.help-header-global {
    height: 60px;
    background-color: #252525; /* Tło nagłówka */
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    flex-shrink: 0; /* Nie zmniejszaj nagłówka */
}

/* NOWOŚĆ: Ikona w kółku w nagłówku */
.help-logo-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid #CCFF90;
    border-radius: 50%;
    color: #CCFF90;
    margin-right: 10px;
}
.help-logo-circle i {
    font-size: 16px;
    font-weight: bold;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #CCFF90; /* Akcent */
    display: flex;
    align-items: center;
    gap: 0; /* Gap handled by margin-right in logo-circle */
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
    /* Resetujemy pozycjonowanie absolutne, teraz jest we flexie */
    position: static; 
}
.close-modal-btn:hover { color: #fff; }


/* === KONTENER CIAŁA (Sidebar + Content) === */
.help-body-container {
    display: flex; /* Lewa: Sidebar, Prawa: Content */
    flex: 1; /* Zajmij resztę wysokości */
    overflow: hidden; /* Zapobiega wypływaniu scrollbarów */
}

/* --- LEWA KOLUMNA: MENU --- */
.help-sidebar {
    width: 220px;
    background-color: #222; /* Nieco ciemniejszy niż nagłówek */
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.help-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
}

.help-nav-btn {
    text-align: left;
    background: transparent;
    border: none;
    color: #aaa;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-nav-btn i { font-size: 16px; width: 20px; text-align: center; }

.help-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.help-nav-btn.active {
    background-color: rgba(204, 255, 144, 0.1);
    color: #CCFF90;
    font-weight: 600;
}

/* Footer Sidebara (Przycisk Samouczka) */
.sidebar-footer {
    padding-top: 15px;
    border-top: 1px solid #333;
    margin-top: 10px;
}

.start-tour-sidebar-btn {
    width: 100%;
    background-color: #CCFF90;
    color: #000;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.start-tour-sidebar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 255, 144, 0.3);
}

/* --- PRAWA STRONA: CONTENT --- */
.help-content-area {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
    background-color: #1e1e1e;
}

.help-section {
    display: none;
    animation: fadeIn 0.3s ease;
}
.help-section.active { display: block; }

/* UKRYWAMY NAGŁÓWKI SEKCJI, ZGODNIE Z ŻYCZENIEM */
.help-section h3 {
    display: none; 
}

.section-intro {
    color: #ccc; /* Jaśniejszy tekst, skoro to teraz "nagłówek" */
    font-size: 15px;
    margin-bottom: 25px;
    font-weight: 500;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

/* Stylizacja list */
.help-list {
    list-style: none;
    padding: 0;
}
.help-list li {
    margin-bottom: 12px;
    color: #bbb;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    padding-left: 18px;
}
.help-list li::before {
    content: "•";
    color: #CCFF90;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 16px;
    line-height: 14px;
}
.help-list strong { color: #e0e0e0; }

/* Ikony Inline w tekście */
.inline-icon {
    font-size: 14px;
    vertical-align: middle;
    color: #CCFF90; /* Kolor akcentu */
    margin: 0 2px;
}

/* Ważna notatka (Box) */
.help-important-note {
    margin-top: 25px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #CCFF90;
    border-radius: 4px;
    color: #ddd;
    font-size: 13px;
}
.help-important-note strong {
    color: #CCFF90;
}

/* Grid dla narzędzi */
.tools-grid-help {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.tool-help-item {
    background-color: #252525;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #333;
}
.tool-help-item i { color: #CCFF90; font-size: 18px; }
.tool-help-item span { color: #ddd; font-size: 13px; }

/* === STYLIZACJA IKON MYSZY (SHORTCUTS) === */
.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.shortcut-item {
    background-color: #252525;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.shortcut-text {
    display: flex;
    flex-direction: column;
}
.shortcut-text strong { color: #fff; font-size: 13px; margin-bottom: 2px; }
.shortcut-text span { color: #888; font-size: 11px; }

/* Rysowanie Myszki CSS */
.mouse-icon { width: 24px; height: 36px; position: relative; flex-shrink: 0; }
.mouse-icon.mini { transform: scale(0.8); }
.mouse-body { width: 100%; height: 100%; border: 2px solid #666; border-radius: 12px; box-sizing: border-box; position: absolute; }
.mouse-btn { position: absolute; top: 2px; width: 8px; height: 12px; background-color: transparent; border-radius: 3px; }
.mouse-btn.left { left: 3px; border-top-left-radius: 8px; }
.mouse-btn.right { right: 3px; border-top-right-radius: 8px; }
.mouse-btn.active { background-color: #CCFF90; box-shadow: 0 0 5px rgba(204, 255, 144, 0.4); }
.mouse-wheel { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background-color: #444; border-radius: 2px; }
.mouse-wheel.active { background-color: #CCFF90; }

.key-icon {
    background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
    border: 1px solid #555;
    border-bottom: 2px solid #111;
    border-radius: 4px;
    padding: 3px 6px;
    font-family: monospace;
    font-size: 11px;
    color: #fff;
    font-weight: bold;
}
.plus-sign { color: #666; font-weight: bold; }

/* === Samouczek (Overlay & Tooltip) - BEZ ZMIAN === */
.tour-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 40000; }
.tour-spotlight { position: absolute; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75); transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); pointer-events: none; z-index: 40001; }
.tour-spotlight::after { content: ''; position: absolute; inset: -5px; border: 2px solid #CCFF90; border-radius: 12px; animation: spotlight-pulse 2s infinite; opacity: 0.5; }
@keyframes spotlight-pulse { 0% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 0; } 100% { transform: scale(1); opacity: 0; } }
.tour-tooltip { position: absolute; width: 300px; background-color: rgba(30, 30, 30, 0.95); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.1); border-left: 3px solid #CCFF90; border-radius: 8px; padding: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); z-index: 40002; transition: all 0.4s ease; opacity: 0; transform: translateY(10px); visibility: hidden; }
.tour-tooltip.visible { opacity: 1; transform: translateY(0); visibility: visible; }
.tour-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#tourStepTitle { color: #CCFF90; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.tour-close-btn { background: transparent; border: none; color: #666; cursor: pointer; font-size: 18px; padding: 0; }
.tour-close-btn:hover { color: #fff; }
.tour-content { color: #e0e0e0; font-size: 13px; line-height: 1.5; margin-bottom: 20px; }
.tour-footer { display: flex; justify-content: space-between; align-items: center; }
#tourProgress { color: #888; font-size: 12px; }
.tour-controls { display: flex; gap: 8px; }
.tour-btn { padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; border: none; font-family: 'Inter', sans-serif; }
.tour-btn.primary { background-color: #CCFF90; color: #000; font-weight: 600; }
.tour-btn.primary:hover { background-color: #bfff6e; }
.tour-btn.secondary { background-color: transparent; color: #aaa; border: 1px solid rgba(255,255,255,0.2); }
.tour-btn.secondary:hover { color: #fff; border-color: #fff; }