﻿@import url("search_styles.css"); /* Importuj style wyszukiwania */


html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Zapobiega pojawianiu się pasków przewijania na body */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #1a1a1a; /* Ciemne tło główne */
    color: #e0e0e0; /* Jasny kolor tekstu */
    display: flex; /* Umożliwia #map-container wypełnienie przestrzeni */
    flex-direction: column;
}

#map-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    z-index: 1;
}
#tracking-panel {
    /* ...Twój styl... */
    z-index: 1005;
}

#controls-overlay {
    position: fixed; /* Pozycjonowanie na mapie */
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(44, 44, 44, 0.9); /* Półprzezroczyste tło */
    backdrop-filter: blur(5px); /* Efekt rozmycia tła (działa w nowoczesnych przeglądarkach) */
    -webkit-backdrop-filter: blur(5px); /* Dla Safari */
    padding: 10px 15px;
    border-radius: 8px 8px 0 0; /* Zaokrąglenie tylko górnych rogów */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3); /* Cień na górze */
    display: flex;
    justify-content: space-between; /* Rozłożenie elementów */
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.95rem;
    z-index: 1000; /* Aby było nad mapą, ale pod popupami Leaflet (domyślnie popupy mają wyższy z-index) */
    color: #e0e0e0;
    gap: 10px; /* Odstęp między grupami kontrolek */
}

/* Glassmorphism dla panelu dolnego */
#controls-overlay {
    background: rgba(34, 40, 49, 0.38);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: 18px 18px 0 0;
    color: #e0e0e0;
    transition: background 0.3s, box-shadow 0.3s;
}

#controls-overlay .brand-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-right: auto; /* Wypycha inne elementy na prawo */
    white-space: nowrap; /* Zapobiega łamaniu tekstu */
}

#controls-overlay .brand-title a {
    color: #58a6ff;
    text-decoration: none;
}
#controls-overlay .brand-title a:hover {
    text-decoration: underline;
}

#controls-overlay .brand-title span {
    font-weight: normal;
    font-size: 0.9em;
    opacity: 0.8;
}

#controls-overlay .filters,
#controls-overlay .actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0; /* Zapobiega kurczeniu się tych sekcji */
}
#controls-overlay .actions button#open-menu-btn {
    background-color: #6c757d; /* Inny kolor dla przycisku menu */
    padding: 0.5em 0.8em;
}

#controls-overlay .actions button#open-menu-btn:hover {
    background-color: #5a6268;
}


#controls-overlay button {
    padding: 0.5em 1em;
    background-color: #007bff; /* Kolor przycisku może pozostać jasny dla kontrastu */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#controls-overlay button:hover {
    background-color: #0069d9;
}

#controls-overlay button:active {
    transform: translateY(1px);
}

#controls-overlay label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap; /* Zapobiega łamaniu tekstu w etykietach */
}

#controls-overlay input[type="checkbox"] {
    margin-right: 5px;
    accent-color: #007bff; /* Kolor zaznaczenia checkboxa */
    width: 16px; /* Ustawienie stałej szerokości */
    height: 16px; /* Ustawienie stałej wysokości */
}

#last-updated {
    font-size: 0.85em;
    opacity: 0.7;
    white-space: nowrap;
}

#locate-me-btn {
    margin-left: 8px;
    background: #222e3a;
    color: #58a6ff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
    cursor: pointer;
    outline: none;
    padding: 0;
}

#locate-me-btn i {
    margin: 0;
    font-size: 1.1em;
    color: #58a6ff;
    pointer-events: none;
}

#locate-me-btn:hover, #locate-me-btn:focus {
    background: #2a3a4d;
    color: #fff;
    box-shadow: 0 4px 16px rgba(88,166,255,0.18);
    transform: scale(1.08);
}

/* Styl dla kafelków mapy w trybie ciemnym - Leaflet domyślnie nie ma ciemnego motywu dla kafelków OpenStreetMap */
/* Można użyć wtyczki lub dostawcy kafelków z ciemnym motywem, np. CartoDB Dark Matter */
.leaflet-tile-pane {
    /* filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9); */ /* Prosty filtr, może pogorszyć czytelność etykiet */
}

/* Dostosowanie kontrolek zoomu Leaflet do ciemnego motywu */
.leaflet-control-zoom a {
    background-color: #2c2c2c !important;
    color: #e0e0e0 !important;
    border-bottom: 1px solid #444 !important;
}
.leaflet-control-zoom a:hover {
    background-color: #383838 !important;
}

/* Dostosowanie informacji o atrybucji Leaflet */
.leaflet-control-attribution {
    background: rgba(26, 26, 26, 0.75) !important; /* Ciemniejsze i bardziej przezroczyste tło */
    color: #bbbbbb !important;
    font-size: 10px; /* Mniejsza czcionka dla atrybucji */
    padding: 2px 6px !important;
}
.leaflet-control-attribution a {
    color: #58a6ff !important;
}

/* Style dla nakładki Menu */

#app-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 16px;
    background:
        radial-gradient(1100px circle at 18% 10%, rgba(0, 229, 255, 0.12), transparent 55%),
        radial-gradient(900px circle at 92% 84%, rgba(184, 255, 57, 0.12), transparent 52%),
        rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

#app-menu-overlay.menu-overlay-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.menu-content {
    width: min(760px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Space Grotesk', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(1200px circle at 18% 0%, rgba(0, 229, 255, 0.10), transparent 48%),
        linear-gradient(180deg, rgba(22, 26, 34, 0.92) 0%, rgba(14, 17, 23, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.92);
    transform: translateY(10px) scale(0.985);
    opacity: 0;
    transition: transform 260ms ease, opacity 260ms ease;
}

#app-menu-overlay.menu-overlay-visible .menu-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.menu-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(184, 255, 57, 0.14), rgba(0, 229, 255, 0.10)),
        rgba(10, 12, 16, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.menu-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-logo {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
}

.menu-logo .logo-icon {
    margin-right: 8px;
    font-size: 1.15em;
    color: #b8ff39;
    line-height: 1;
}

.menu-logo span:not(.brand-twoja):not(.brand-trasa) {
    color: #b8ff39;
}

.menu-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.98rem;
    cursor: pointer;
    padding: 9px 12px;
    border-radius: 999px;
    line-height: 1;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.menu-chip-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(184, 255, 57, 0.45);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.30);
    color: rgba(255, 255, 255, 0.98);
}

.menu-container {
    padding: 18px 18px 16px;
    overflow-y: auto;
}

.menu-container::-webkit-scrollbar { width: 10px; }
.menu-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }
.menu-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.20); }

.menu-section {
    margin-bottom: 16px;
    text-align: left;
    background:
        radial-gradient(900px circle at 18% 0%, rgba(0, 229, 255, 0.06), transparent 52%),
        rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 14px;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.menu-section h2 {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 2px 10px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.menu-section h2 i {
    font-size: 1.05em;
    color: rgba(184, 255, 57, 0.92);
}

.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.90);
    text-decoration: none;
    border-radius: 16px;
    padding: 14px 12px;
    min-height: 110px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.grid-item::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: radial-gradient(600px circle at 20% 0%, rgba(184, 255, 57, 0.18), transparent 45%);
    opacity: 0;
    transition: opacity 160ms ease;
    z-index: -1;
}

.grid-item:focus-visible {
    outline: 2px solid rgba(184, 255, 57, 0.65);
    outline-offset: 2px;
}

.grid-item:hover {
    transform: translateY(-3px);
    border-color: rgba(184, 255, 57, 0.55);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.grid-item:hover::before { opacity: 1; }

.grid-item i.icon {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.60);
    transition: transform 160ms ease, color 160ms ease;
}

.grid-item:hover i.icon {
    color: rgba(184, 255, 57, 0.95);
    transform: translateY(-1px);
}

.grid-item span.label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
    display: block;
}

.grid-item span.hint {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.62);
}

.grid-item .external-link-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.45);
}

.menu-footer-note {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.56);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding-top: 14px;
}

.menu-footer-note a {
    color: rgba(255, 255, 255, 0.72);
}

.menu-footer-note a:hover {
    color: rgba(184, 255, 57, 0.95);
}

@media (max-width: 600px) {
    #app-menu-overlay { padding: 10px; }
    .menu-content { width: 96vw; max-height: 94vh; border-radius: 18px; }
    .menu-container { padding: 14px 14px 12px; }
    .grid-menu { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
    .grid-item { min-height: 96px; padding: 12px 10px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .menu-content, .grid-item, .grid-item i.icon, .menu-chip-btn {
        transition: none !important;
    }
    .menu-content { transform: none !important; opacity: 1 !important; }
    .grid-item:hover { transform: none; }
}
.brand-link {
    font-weight: bold;
    font-size: 1.12em;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.brand-twoja {
    color: #fee300;
}
.brand-trasa {
    color: #49f300;
}
.brand-link:visited .brand-twoja { color: #fee300; }
.brand-link:visited .brand-trasa { color: #49f300; }

/* Nowy pasek przycisków na dole ekranu */
#controls-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 18px;
    background: rgba(34, 40, 49, 0.72);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: 18px;
    padding: 8px 18px;
    z-index: 1100;
}

#controls-bar button {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.45em;
    padding: 7px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    outline: none;
    position: relative;
}
#controls-bar button.active,
#controls-bar button:focus-visible,
#controls-bar button:hover {
    background: rgba(255,255,255,0.13);
    color: #fee300;
    box-shadow: 0 2px 8px rgba(31,38,135,0.10);
}

#controls-bar button.is-busy i {
    animation: tt-spin 0.9s linear infinite;
}

#controls-bar button#open-menu-btn {
    color: #49f300;
}
#controls-bar button#open-menu-btn:hover {
    color: #fee300;
}

@media (max-width: 600px) {
    #controls-bar {
        gap: 10px;
        padding: 6px 6vw;
        border-radius: 14px;
        bottom: 8px;
    }
    #controls-bar button {
        font-size: 1.15em;
        padding: 6px 7px;
        border-radius: 8px;
    }
}

/* Ukryj stary panel dolny */
#controls-overlay {
    display: none !important;
}

/* Media query dla mniejszych ekranów, aby kontrolki lepiej się układały */
@media (max-width: 768px) {
    #controls-overlay {
        flex-direction: column;
        align-items: flex-start; /* Wyrównaj do lewej na małych ekranach */
        padding: 8px;
    }

    #controls-overlay .brand-title {
        margin-right: 0;
        margin-bottom: 8px; /* Odstęp pod tytułem */
        width: 100%; /* Tytuł na całą szerokość */
        text-align: center; /* Wyśrodkuj tytuł */
    }

    #controls-overlay .filters,
    #controls-overlay .actions {
        width: 100%; /* Filtry i akcje na całą szerokość */
        justify-content: space-around; /* Rozłóż elementy w filtrach i akcjach */
        margin-bottom: 5px;
    }
    #controls-overlay .actions {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    #controls-overlay .filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    #controls-overlay .actions {
         flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    #controls-overlay button {
        width: 100%;
        max-width: 200px; /* Ogranicz szerokość przycisku */
        margin: 0 auto; /* Wyśrodkuj przycisk */
    }
    #last-updated {
        text-align: center;
        width: 100%;
    }
}

/* Poprawiony panel dolny na telefonach */
@media (max-width: 600px) {
    #controls-overlay {
        width: 90vw !important;
        left: 5vw !important;
        right: 5vw !important;
        bottom: 3vw !important;
        border-radius: 16px !important;
        padding: 6px 4vw 4px 4vw !important;
        gap: 4px !important;
    }
    #controls-overlay .brand-title {
        font-size: 1em !important;
        margin-bottom: 1px !important;
    }
    #controls-overlay .filters,
    #controls-overlay .actions {
        font-size: 0.9em !important;
        gap: 5px !important;
        margin-bottom: 1px !important;
    }
    #controls-overlay .filters label,
    #controls-overlay .actions button,
    #controls-overlay label {
        font-size: 0.9em !important;
    }
    #controls-overlay button,
    #controls-overlay .actions button {
        min-width: 22px !important;
        height: 22px !important;
        font-size: 0.9em !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
    }
    #controls-overlay .actions button#open-menu-btn {
        font-size: 1em !important;
        padding: 2px 8px !important;
        min-width: 32px !important;
        height: 24px !important;
    }
    #last-updated {
        font-size: 0.7em !important;
        padding: 0 1px !important;
        margin: 0 0 1px 0 !important;
    }
}

@media (max-width: 600px) {
    #map-container {
        width: 100vw !important;
        height: 100vh !important;
        min-height: 100vh !important;
        position: fixed !important;
        top: 0; left: 0;
        z-index: 1;
    }
    body, html {
        overflow: hidden !important;
        height: 100vh !important;
        margin: 0;
        padding: 0;
    }
    #controls-overlay {
        width: 100vw;
        left: 0;
        right: 0;
        border-radius: 0 0 12px 12px;
        padding: 0 2vw;
        box-sizing: border-box;
    }
    .menu-content, .menu-section .container {
        padding: 0 2vw !important;
    }
    .actions button, #locate-me-btn {
        min-width: 32px;
        height: 32px;
        font-size: 1em;
        padding: 4px 8px;
    }
    .filters label {
        font-size: 1em;
    }
}

/* Dodatkowe wzmocnienie efektu na telefonach */
@media (max-width: 600px) {
.container, .content-section {
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Zdefiniuj kolor dla wszystkich stanów linku, będąc bardziej specyficznym */
a.favorite-item-link,
a.favorite-item-link:link,
a.favorite-item-link:visited {
    color: white; /* Ustawiamy biały kolor dla linku normalnego i odwiedzonego */
    text-decoration: none;
    flex-grow: 1;
    transition: color 0.2s ease;
}

/* Upewnij się, że tekst w <strong> wewnątrz linku również jest biały */
a.favorite-item-link strong {
    color: white;
}

/* Styl dla najechania myszką pozostaje ten sam */
a.favorite-item-link:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Dodatkowe style dla linków w ulubionych */
#favorites-view-section .content-section ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 5px; /* Dopasuj padding wedle uznania */
    border-bottom: 1px solid var(--border-color);
}
#favorites-view-section .content-section ul li:last-child {
    border-bottom: none;
    }
    .favorite-item-link {
        color: white !important; /* Tylko do testów! */
        text-decoration: none;
        flex-grow: 1;
        transition: color 0.2s ease;
    }
    .favorite-item-link:hover {
        color: var(--accent);
        text-decoration: none;
    }
    .favorite-remove-btn {
        flex-shrink: 0; /* Aby przycisk nie kurczył się */
    }

    /* Dodatkowe style dla markerów pojazdów z kierunkiem */
.vehicle-marker-wrapper {
    position: relative; /* Umożliwia pozycjonowanie strzałki względem tego kontenera */
    display: flex;
    flex-direction: column; /* Ustawia elementy (pojazd, strzałka) jeden pod drugim */
    align-items: center;  /* Wyśrodkowuje elementy w poziomie */
}

.vehicle-marker-image {
    width: 32px; /* Dopasuj do vehicleIconSize z JS */
    height: 32px; /* Dopasuj do vehicleIconSize z JS */
    display: block;
    transform-origin: center center; /* Obrót wokół środka obrazka */
}

.vehicle-marker-arrow {
    width: 16px;  /* Dopasuj do arrowIconSize z JS */
    height: 16px; /* Dopasuj do arrowIconSize z JS */
    display: block;
    margin-top: 2px; /* Odstęp między pojazdem a strzałką, dopasuj do gapBetweenIcons z JS */
    transform-origin: center center; /* Obrót wokół środka strzałki */
}

/* Opcjonalnie, aby upewnić się, że tło divIcon jest przezroczyste */
.vehicle-div-icon {
    background: transparent !important;
    border: none !important;
}

.vehicle-div-icon.vehicle-marker-tracked .vehicle-marker-wrapper {
    transform: scale(1.08);
}

.vehicle-div-icon.vehicle-marker-tracked .vehicle-marker-image {
    filter: drop-shadow(0 0 10px rgba(24, 212, 255, 0.95)) drop-shadow(0 0 18px rgba(24, 212, 255, 0.45));
}

.vehicle-div-icon.vehicle-marker-focused .vehicle-marker-wrapper {
    animation: tt-vehicle-pulse 1.15s ease-in-out 3;
}

@keyframes tt-vehicle-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.16); }
    100% { transform: scale(1); }
}

@keyframes tt-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


}
/* --- Community Reports (Auth + Map Reports) --- */
.tt-hidden { display: none !important; }

#controls-bar button#report-issue-btn {
    background: #b42318;
    border-color: rgba(255,255,255,0.14);
}
#controls-bar button#report-issue-btn:hover {
    background: #d92d20;
}
#controls-bar button#report-issue-btn.active {
    box-shadow: 0 0 0 2px rgba(217,45,32,0.25);
}

.tt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4500;
    background: rgba(0,0,0,0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.tt-modal {
    width: min(520px, 96vw);
    background: rgba(34, 40, 49, 0.92);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    box-shadow: 0 14px 50px rgba(0,0,0,0.45);
    color: #e8e8e8;
    overflow: hidden;
    max-height: min(88vh, 860px);
    display: flex;
    flex-direction: column;
    color-scheme: dark;
}

.tt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.tt-modal-title {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.tt-modal-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    opacity: 0.85;
}
.tt-modal-close:hover { opacity: 1; }

.tt-modal-body {
    padding: 14px;
}
.tt-modal-body-scroll {
    overflow-y: auto;
    padding: 12px;
}
.tt-modal-compact {
    width: min(460px, 94vw);
}
.tt-modal-report {
    width: min(920px, 94vw);
    max-height: min(90vh, 900px);
}
.tt-modal-report .tt-modal-header {
    padding: 16px 18px;
}
.tt-modal-report .tt-modal-title {
    font-size: 1.2rem;
    font-weight: 800;
}
.tt-modal-report .tt-modal-body-scroll {
    padding: 16px 18px 14px;
}
.tt-modal-report .tt-field {
    margin-bottom: 0;
}
.tt-modal-report .tt-field label {
    font-size: 13px;
    font-weight: 600;
}
.tt-modal-report .tt-field input,
.tt-modal-report .tt-field select,
.tt-modal-report .tt-field textarea {
    font-size: 15px;
    min-height: 46px;
    background: rgba(17, 24, 39, 0.96) !important;
    background-color: rgba(17, 24, 39, 0.96) !important;
    color: #f8fafc !important;
}
.tt-modal-report .tt-field textarea {
    min-height: 180px;
    padding-top: 12px;
}
.tt-report-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 18px;
    align-items: start;
}
.tt-report-form-main,
.tt-report-form-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tt-report-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tt-field { margin-bottom: 8px; }
.tt-field-inline { flex: 1; }
.tt-field label { display: block; font-size: 12px; color: rgba(255,255,255,0.78); margin-bottom: 6px; }
.tt-field input, .tt-field select, .tt-field textarea {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(17, 24, 39, 0.88);
    background-color: rgba(17, 24, 39, 0.88);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    padding: 9px 10px;
    outline: none;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.tt-field textarea { resize: vertical; }
.tt-field input::placeholder, .tt-field textarea::placeholder {
    color: rgba(255,255,255,0.42);
}
.tt-modal-report .tt-field input::placeholder,
.tt-modal-report .tt-field textarea::placeholder {
    color: rgba(255,255,255,0.46) !important;
}
.tt-field select option {
    background: #111827;
    color: #f8fafc;
}
.tt-field input[type="file"] {
    padding: 8px;
    cursor: pointer;
}
.tt-field input[type="file"]::file-selector-button {
    margin-right: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.10);
    color: #fff;
    cursor: pointer;
}
.tt-field input:-webkit-autofill,
.tt-field input:-webkit-autofill:hover,
.tt-field input:-webkit-autofill:focus,
.tt-field textarea:-webkit-autofill,
.tt-field select:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    box-shadow: 0 0 0 1000px rgba(17, 24, 39, 0.96) inset;
    transition: background-color 9999s ease-in-out 0s;
}
.tt-modal-report .tt-field input:-webkit-autofill,
.tt-modal-report .tt-field input:-webkit-autofill:hover,
.tt-modal-report .tt-field input:-webkit-autofill:focus,
.tt-modal-report .tt-field textarea:-webkit-autofill,
.tt-modal-report .tt-field select:-webkit-autofill {
    -webkit-text-fill-color: #f8fafc !important;
    box-shadow: 0 0 0 1000px rgba(17, 24, 39, 0.98) inset !important;
}
.tt-modal-report .tt-field textarea,
.tt-modal-report .tt-field textarea:focus,
.tt-modal-report .tt-field textarea:hover {
    border-color: rgba(255,255,255,0.14);
}
.tt-field input:focus, .tt-field select:focus, .tt-field textarea:focus {
    border-color: rgba(153, 204, 0, 0.65);
    box-shadow: 0 0 0 2px rgba(153, 204, 0, 0.20);
}

.tt-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.tt-modal-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(34, 40, 49, 0.2), rgba(34, 40, 49, 0.96));
    padding-top: 10px;
    margin-top: 10px;
    justify-content: flex-end;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.tt-btn {
    background: rgba(153,204,0,0.95);
    color: #1a1a1a;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
}
.tt-btn:hover { filter: brightness(1.05); }
.tt-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tt-btn-secondary { background: rgba(255,255,255,0.16); color: #fff; border: 1px solid rgba(255,255,255,0.14); }
.tt-btn-danger { background: rgba(217,45,32,0.95); color: #fff; }
.tt-btn-small { padding: 8px 10px; font-size: 12px; border-radius: 9px; }
.tt-btn-discord {
    width: 100%;
    justify-content: center;
    background: linear-gradient(135deg, #5865f2, #7c4dff);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 12px 28px rgba(88, 101, 242, 0.22);
}
.tt-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    color: #f6fbff;
    border: 1px dashed rgba(255,255,255,0.18);
    text-decoration: none;
}
.tt-auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    color: rgba(255,255,255,0.52);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.tt-auth-divider::before,
.tt-auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(255,255,255,0.12);
}
.tt-modal-account {
    width: min(980px, 96vw);
    max-height: min(92vh, 980px);
    border-radius: 28px;
    border: 1px solid rgba(188, 255, 92, 0.16);
    background:
        radial-gradient(circle at top left, rgba(153, 204, 0, 0.16), transparent 24%),
        radial-gradient(circle at bottom right, rgba(86, 144, 255, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(17, 24, 34, 0.98), rgba(9, 14, 22, 0.99));
    box-shadow: 0 34px 110px rgba(0, 0, 0, 0.52);
}
.tt-modal-account .tt-modal-header {
    padding: 18px 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tt-modal-account .tt-modal-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}
.tt-auth-body {
    padding: 20px;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(188, 255, 92, 0.45) rgba(255,255,255,0.05);
}
.tt-auth-body::-webkit-scrollbar {
    width: 11px;
}
.tt-auth-body::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 999px;
}
.tt-auth-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(188, 255, 92, 0.75), rgba(86, 144, 255, 0.78));
    border-radius: 999px;
    border: 2px solid rgba(10, 16, 24, 0.72);
}
.tt-auth-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(210, 255, 127, 0.95), rgba(118, 173, 255, 0.9));
}
.tt-auth-stage {
    display: block;
}
.tt-auth-grid {
    display: grid;
    gap: 16px;
}
.tt-auth-grid-guest {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
}
.tt-auth-grid-account {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tt-auth-hero {
    position: relative;
    overflow: hidden;
    padding: 24px 24px 22px;
    margin-bottom: 16px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(135deg, rgba(153, 204, 0, 0.17), rgba(86, 144, 255, 0.1)),
        rgba(255,255,255,0.03);
}
.tt-auth-hero::after {
    content: "";
    position: absolute;
    inset: auto -38px -68px auto;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 68%);
    pointer-events: none;
}
.tt-auth-hero h3 {
    margin: 12px 0 8px;
    font-size: 1.9rem;
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: #f6ffea;
}
.tt-auth-hero p {
    margin: 0;
    max-width: 620px;
    color: rgba(240, 247, 255, 0.82);
    line-height: 1.65;
}
.tt-auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 18, 26, 0.46);
    border: 1px solid rgba(255,255,255,0.08);
    color: #dbf6a2;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.tt-auth-status-banner {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(248, 252, 255, 0.82);
}
.tt-auth-panel {
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)),
        rgba(9, 14, 22, 0.48);
    padding: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.tt-auth-card-login {
    position: relative;
}
.tt-auth-card-support {
    background:
        linear-gradient(180deg, rgba(86, 144, 255, 0.08), rgba(255,255,255,0.02)),
        rgba(9, 14, 22, 0.48);
}
.tt-auth-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.tt-auth-section-head strong {
    display: block;
    font-size: 1.05rem;
    color: #f8fbff;
}
.tt-auth-discord-btn {
    min-height: 54px;
    border-radius: 16px;
    font-size: 15px;
}
.tt-auth-primary-actions,
.tt-auth-secondary-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.tt-auth-primary-actions {
    margin-top: 14px;
}
.tt-auth-main-btn,
.tt-auth-sub-btn {
    min-height: 48px;
    flex: 1 1 180px;
}
.tt-auth-account-actions {
    margin-top: 14px;
}
.tt-account-overview {
    margin-bottom: 16px;
}
.tt-account-hero-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
        rgba(16, 22, 32, 0.56);
}
.tt-account-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    font-size: 28px;
    box-shadow: 0 16px 34px rgba(0,0,0,0.26);
}
.tt-account-hero-copy {
    min-width: 0;
}
.tt-account-hero-copy strong {
    display: block;
    font-size: 1.4rem;
    line-height: 1.08;
    margin-bottom: 4px;
}
.tt-account-highlight-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.tt-auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.tt-auth-field-wide,
.tt-auth-grid-account > :last-child {
    grid-column: 1 / -1;
}
.tt-discord-link-card-rich {
    padding: 18px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(88, 101, 242, 0.18), rgba(124, 77, 255, 0.1)),
        rgba(255,255,255,0.03);
}
.tt-discord-link-copy {
    min-width: 0;
}
.tt-discord-link-copy strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.tt-discord-link-card .tt-row {
    margin-left: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tt-auth-password-box,
.tt-auth-security-card,
.tt-auth-help-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
        rgba(255,255,255,0.02);
}
.tt-auth-support-card {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.tt-auth-support-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(240,247,255,0.82);
    line-height: 1.55;
}
.tt-auth-support-line i {
    color: #c8ff62;
    margin-top: 2px;
}
.tt-report-guest-field {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(188, 255, 92, 0.12);
    background: linear-gradient(135deg, rgba(153, 204, 0, 0.09), rgba(86, 144, 255, 0.05));
}
.tt-account-card,
.tt-discord-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
}
.tt-account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    background: rgba(166, 255, 0, 0.16);
    color: var(--accent-color, #a6ff00);
    font-size: 20px;
}
.tt-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tt-muted { color: rgba(255,255,255,0.72); }
.tt-small { font-size: 12px; }

.tt-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    font-size: 12px;
}

.tt-report-icon { background: transparent; border: none; }
.tt-report-marker {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #fff;
    background: #d92d20;
    border: 2px solid rgba(0,0,0,0.35);
    box-shadow: 0 10px 20px rgba(0,0,0,0.28);
}
.tt-report-icon.tt-sev-1 .tt-report-marker { background: #027a48; }
.tt-report-icon.tt-sev-2 .tt-report-marker { background: #b54708; }
.tt-report-icon.tt-sev-3 .tt-report-marker { background: #d92d20; }

.tt-report-popup { font-size: 13px; }
.tt-report-title { font-weight: 800; margin-bottom: 8px; }
.tt-report-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tt-report-descr { white-space: pre-wrap; margin-bottom: 10px; color: rgba(255,255,255,0.86); }
.tt-report-footer { font-size: 12px; color: rgba(255,255,255,0.70); margin-bottom: 10px; }
.tt-report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tt-report-votes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tt-vote-btn { width: 100%; justify-content: center; }
.tt-vote-btn.is-active { box-shadow: 0 0 0 2px rgba(153, 204, 0, 0.32); }
.tt-report-prefill-title { font-weight: 700; margin-bottom: 6px; }
#tt-report-prefill-box {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}
.tt-public-report-card {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}
.tt-public-report-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.tt-public-report-title { font-size: 16px; font-weight: 800; }
.tt-public-report-subtitle { color: rgba(255,255,255,0.72); font-size: 12px; margin-top: 4px; }
.tt-public-report-body { color: rgba(255,255,255,0.88); margin-bottom: 10px; white-space: pre-wrap; }
.tt-public-report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tt-report-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tt-report-image {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    margin: 10px 0;
}

.tt-captcha-anchor {
    position: fixed;
    left: -9999px;
    bottom: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    z-index: -1;
}
#tt-report-image-preview-box {
    margin-top: 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
}
#tt-report-image-preview {
    display: block;
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
}

.tt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tt-list-item {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px 10px;
    cursor: pointer;
}
.tt-list-item:hover {
    border-color: rgba(153, 204, 0, 0.50);
}
.tt-list-title {
    font-weight: 800;
    margin-bottom: 6px;
}
.tt-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tt-admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.tt-admin-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px;
}
.tt-admin-row .tt-muted { margin: 0; }

@media (max-width: 600px) {
    .tt-modal-overlay { padding: 10px; align-items: flex-start; }
    .tt-modal { max-height: 92vh; margin-top: 8px; }
    .tt-modal-compact { width: min(100%, 420px); }
    .tt-modal-account {
        width: min(100%, 560px);
        border-radius: 22px;
    }
    .tt-modal-report {
        width: min(100%, 520px);
    }
    .tt-modal-report .tt-modal-body-scroll {
        padding: 12px;
    }
    .tt-report-form-grid,
    .tt-report-mini-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .tt-modal-report .tt-field textarea {
        min-height: 130px;
    }
    .tt-report-votes { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    html, body {
        height: 100dvh;
    }

    body.tt-mobile-ui {
        background: #0b0f14;
    }

    body.tt-mobile-ui #map-container {
        width: 100vw;
        height: 100dvh;
    }

    body.tt-mobile-ui .leaflet-top.leaflet-left {
        top: calc(env(safe-area-inset-top, 0px) + 66px);
        left: 10px;
    }

    body.tt-mobile-ui .leaflet-control-zoom a {
        width: 34px;
        height: 34px;
        line-height: 34px;
        font-size: 18px;
    }
}

#notifications-area {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 64px);
    left: 10px;
    right: 10px;
    z-index: 2100;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
}

#notifications-area,
#notifications-area * {
    box-sizing: border-box;
}

#notifications-area.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.map-notification-stack {
    position: relative;
    display: grid;
    gap: 10px;
    width: min(520px, calc(100vw - 20px));
    max-width: 100%;
    margin: 0;
    pointer-events: auto;
}

.map-notification-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 22px;
    color: #f3f7ff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: rgba(10, 16, 24, 0.96);
    background:
        radial-gradient(150% 190% at 100% 0%, rgba(184, 255, 57, 0.12), transparent 32%),
        radial-gradient(160% 210% at 0% 100%, rgba(100, 210, 255, 0.16), transparent 40%),
        linear-gradient(145deg, rgba(9, 14, 20, 0.98), rgba(18, 26, 36, 0.96));
    box-shadow:
        0 24px 54px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: auto;
}

.map-notification-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--notification-accent, #64d2ff);
}

.map-notification-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.map-notification-card--info {
    --notification-accent: #64d2ff;
    background:
        radial-gradient(150% 190% at 100% 0%, rgba(100, 210, 255, 0.28), transparent 32%),
        radial-gradient(160% 210% at 0% 100%, rgba(47, 128, 237, 0.2), transparent 42%),
        linear-gradient(145deg, rgba(7, 19, 33, 0.99), rgba(10, 33, 54, 0.96));
}

.map-notification-card--success {
    --notification-accent: #7dff63;
    background:
        radial-gradient(150% 190% at 100% 0%, rgba(125, 255, 99, 0.24), transparent 32%),
        radial-gradient(160% 210% at 0% 100%, rgba(27, 194, 119, 0.2), transparent 42%),
        linear-gradient(145deg, rgba(8, 28, 19, 0.99), rgba(8, 43, 28, 0.96));
}

.map-notification-card--warning {
    --notification-accent: #ffd44d;
    background:
        radial-gradient(150% 190% at 100% 0%, rgba(255, 212, 77, 0.26), transparent 32%),
        radial-gradient(160% 210% at 0% 100%, rgba(255, 146, 43, 0.2), transparent 42%),
        linear-gradient(145deg, rgba(34, 21, 8, 0.99), rgba(58, 34, 5, 0.96));
}

.map-notification-card--important {
    --notification-accent: #ff7af6;
    background:
        radial-gradient(150% 190% at 100% 0%, rgba(255, 122, 246, 0.28), transparent 32%),
        radial-gradient(160% 210% at 0% 100%, rgba(130, 96, 255, 0.24), transparent 42%),
        linear-gradient(145deg, rgba(29, 11, 39, 0.99), rgba(38, 17, 68, 0.96));
}

.map-notification-card--error {
    --notification-accent: #ff6b6b;
    background:
        radial-gradient(150% 190% at 100% 0%, rgba(255, 107, 107, 0.28), transparent 32%),
        radial-gradient(160% 210% at 0% 100%, rgba(255, 59, 48, 0.22), transparent 42%),
        linear-gradient(145deg, rgba(34, 10, 14, 0.99), rgba(62, 13, 18, 0.96));
}

.map-notification-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-right: 52px;
}

.map-notification-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    flex: 0 0 auto;
    background: linear-gradient(180deg, color-mix(in srgb, var(--notification-accent, #64d2ff) 18%, rgba(255,255,255,0.08)), rgba(255,255,255,0.04));
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--notification-accent, #64d2ff);
    font-size: 1.05rem;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 12px 24px color-mix(in srgb, var(--notification-accent, #64d2ff) 18%, transparent);
}

.map-notification-copy {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.map-notification-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #081018;
    background: linear-gradient(180deg, color-mix(in srgb, var(--notification-accent, #64d2ff) 96%, white 4%), var(--notification-accent, #64d2ff));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--notification-accent, #64d2ff) 28%, transparent);
}

.map-notification-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.2;
    color: #f8fbff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 14px rgba(0,0,0,0.22);
}

.map-notification-body {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(239, 245, 255, 0.95);
    text-wrap: pretty;
    text-shadow: 0 1px 10px rgba(0,0,0,0.18);
}

.map-notification-body a,
.map-notification-link {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.map-notification-body a:hover,
.map-notification-link:hover {
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

.map-notification-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.map-notification-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: rgba(226, 235, 247, 0.8);
    font-size: .84rem;
    font-weight: 500;
}

.notification-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.92);
    cursor: pointer;
    font-size: 1.15rem;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    pointer-events: auto;
}

.notification-close-btn:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.26);
}

.map-notification-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #081018;
    text-decoration: none;
    font-weight: 700;
    background: linear-gradient(180deg, color-mix(in srgb, var(--notification-accent, #64d2ff) 96%, white 4%), var(--notification-accent, #64d2ff));
    box-shadow: 0 12px 28px color-mix(in srgb, var(--notification-accent, #64d2ff) 26%, transparent);
    pointer-events: auto;
}

.map-notification-card--info .map-notification-link-chip,
.map-notification-card--info .map-notification-badge {
    color: #06131d;
}

.map-notification-card--success .map-notification-link-chip,
.map-notification-card--success .map-notification-badge {
    color: #07180a;
}

.map-notification-card--warning .map-notification-link-chip,
.map-notification-card--warning .map-notification-badge {
    color: #261603;
}

.map-notification-card--important .map-notification-link-chip,
.map-notification-card--important .map-notification-badge {
    color: #210427;
}

.map-notification-card--error .map-notification-link-chip,
.map-notification-card--error .map-notification-badge {
    color: #250606;
}

.map-notification-list {
    display: grid;
    gap: 10px;
}

@media (max-width: 700px) {
    #notifications-area {
        top: calc(env(safe-area-inset-top, 0px) + 58px);
        left: 8px;
        right: 8px;
    }

    .map-notification-card {
        gap: 12px;
        padding: 15px 15px 14px 15px;
        border-radius: 18px;
    }

    .map-notification-top {
        gap: 10px;
        padding-right: 38px;
    }

    .map-notification-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: .9rem;
    }

    .map-notification-title {
        font-size: .98rem;
    }

    .map-notification-body {
        font-size: .9rem;
    }

    .map-notification-footer {
        align-items: stretch;
    }

    .map-notification-link-chip {
        width: 100%;
        justify-content: center;
    }

    .notification-close-btn {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
        font-size: 1rem;
    }
}

    #controls-bar {
        left: 10px;
        right: 10px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
        transform: none;
        width: auto;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        padding: 8px;
        border-radius: 22px;
        background: rgba(12, 16, 22, 0.88);
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    }

    #controls-bar button {
        min-height: 48px;
        padding: 0;
        border-radius: 14px;
        font-size: 1.05rem;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.07);
    }

    #controls-bar button#open-menu-btn {
        color: #b8ff39;
    }

    #controls-bar button.active,
    #controls-bar button:focus,
    #controls-bar button:hover {
        background: rgba(255,255,255,0.12);
    }

    #app-menu-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .menu-content {
        width: 100vw;
        max-height: 88dvh;
        border-radius: 26px 26px 0 0;
        border-bottom: none;
        position: relative;
        background:
            radial-gradient(700px circle at 50% -10%, rgba(184, 255, 57, 0.14), transparent 40%),
            radial-gradient(640px circle at 100% 0%, rgba(0, 229, 255, 0.14), transparent 38%),
            linear-gradient(180deg, rgba(16, 21, 28, 0.98), rgba(10, 14, 20, 0.99));
    }

    .menu-content::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 58px;
        height: 5px;
        border-radius: 999px;
        background: rgba(255,255,255,0.25);
    }

    .menu-top-bar {
        padding: 22px 14px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .menu-top-actions {
        gap: 8px;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .menu-chip-btn {
        padding: 10px 12px;
        font-size: 0.92rem;
        justify-content: center;
    }

    .menu-container {
        padding: 14px 14px 18px;
    }

    .menu-section {
        padding: 12px;
        border-radius: 16px;
    }

    .grid-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .grid-item {
        min-height: 104px;
        padding: 12px 10px;
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
    }

    .grid-item i.icon {
        font-size: 1.55rem;
        margin-bottom: 8px;
    }

    .grid-item span.label {
        font-size: 12px;
    }

    .grid-item span.hint {
        font-size: 10px;
    }

    .menu-section h2 {
        position: sticky;
        top: 0;
        background: linear-gradient(180deg, rgba(16, 21, 28, 0.98), rgba(16, 21, 28, 0.72));
        backdrop-filter: blur(8px);
        z-index: 1;
    }

    .tt-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .tt-modal,
    .tt-modal-compact,
    .tt-modal-report {
        width: 100vw;
        max-width: 100vw;
        max-height: 90dvh;
        margin: 0;
        border-radius: 22px 22px 0 0;
        border-bottom: none;
    }
    .tt-modal-account {
        border-radius: 24px 24px 0 0;
    }

    .tt-modal-report .tt-modal-header,
    .tt-modal-header {
        padding-top: 14px;
    }

    .tt-modal-body-scroll,
    .tt-modal-report .tt-modal-body-scroll {
        padding: 14px;
    }
    .tt-auth-body {
        padding: 14px;
    }
    .tt-auth-hero {
        padding: 18px;
        border-radius: 20px;
    }
    .tt-auth-hero h3 {
        font-size: 1.28rem;
    }
    .tt-auth-grid-guest,
    .tt-auth-grid-account,
    .tt-auth-form-grid {
        grid-template-columns: 1fr;
    }
    .tt-auth-panel,
    .tt-auth-password-box {
        padding: 14px;
        border-radius: 18px;
    }
    .tt-account-hero-card {
        align-items: flex-start;
        flex-direction: column;
    }
    .tt-auth-primary-actions > *,
    .tt-auth-secondary-actions > * {
        width: 100%;
        flex: 1 1 100%;
    }
    .tt-discord-link-card .tt-row {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 560px) {
    #controls-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
    }

    #controls-bar button {
        min-height: 46px;
        font-size: 1rem;
    }

    .menu-logo {
        font-size: 1rem;
    }

    .menu-top-actions {
        grid-template-columns: 1fr;
    }

    .menu-chip-btn span {
        display: inline;
    }

    .grid-menu {
        grid-template-columns: 1fr 1fr;
    }
}

body.tt-ultra-mobile #controls-bar {
    background: rgba(9, 13, 18, 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

body.tt-ultra-mobile #controls-bar button {
    min-height: 44px;
    font-size: 0.98rem;
}

body.tt-ultra-mobile .menu-content {
    max-height: 84dvh;
    box-shadow: 0 -10px 32px rgba(0,0,0,0.28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.tt-ultra-mobile .menu-section,
body.tt-ultra-mobile .grid-item,
body.tt-ultra-mobile .tt-modal,
body.tt-ultra-mobile .tt-modal-report {
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.tt-ultra-mobile .grid-menu {
    grid-template-columns: 1fr;
}

.tt-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tt-insight-grid,
.tt-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.tt-insight-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(11, 16, 24, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tt-insight-card.is-good {
    border-color: rgba(69, 208, 125, 0.28);
}

.tt-insight-card.is-warn {
    border-color: rgba(255, 179, 71, 0.32);
}

.tt-insight-card.is-neutral {
    border-color: rgba(88, 166, 255, 0.20);
}

.tt-insight-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.62);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tt-insight-value {
    font-size: 1.15rem;
    color: #f8fbff;
}

.tt-insight-card small {
    color: rgba(255, 255, 255, 0.68);
}

.tt-stack-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tt-list-card {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(8, 13, 20, 0.78);
    color: #f5f8fc;
    text-align: left;
    transition: border-color 0.2s ease, transform 0.18s ease, background 0.2s ease;
}

button.tt-list-card {
    cursor: pointer;
}

.tt-list-card:hover {
    border-color: rgba(88, 166, 255, 0.35);
    transform: translateY(-1px);
    background: rgba(13, 20, 31, 0.88);
}

.tt-list-card strong,
.tt-simple-list-item strong {
    display: block;
    color: #f8fbff;
}

.tt-list-card span,
.tt-simple-list-item span {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.92rem;
}

.tt-list-card small {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.56);
}

.tt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.07);
    color: #f5f8fc;
}

.tt-badge.is-good {
    background: rgba(69, 208, 125, 0.18);
    color: #9cf0bb;
}

.tt-badge.is-warn {
    background: rgba(255, 179, 71, 0.18);
    color: #ffd38f;
}

.tt-badge.is-neutral {
    background: rgba(88, 166, 255, 0.16);
    color: #b6d4ff;
}

.tt-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tt-code-box {
    padding: 12px 14px;
    margin: 0;
    border-radius: 14px;
    background: rgba(7, 11, 17, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dfe8f3;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.tt-empty-state {
    padding: 14px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.68);
    background: rgba(9, 13, 19, 0.62);
}

.tt-simple-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tt-simple-list-item:last-child {
    border-bottom: none;
}

.tt-link-button {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.tt-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.tt-detail-header h2 {
    margin: 0;
}

.tt-detail-header p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.68);
}

.tt-alert-form {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(180px, 1fr) auto;
    gap: 10px;
}

#favorites-vehicles-list,
#favorites-stops-list,
#recently-viewed-list,
#favorites-alerts-summary {
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 820px) {
    .tt-alert-form {
        grid-template-columns: 1fr;
    }

    .tt-detail-header,
    .tt-list-card {
        flex-direction: column;
        align-items: stretch;
    }

    .tt-tag-row {
        justify-content: flex-start;
    }
}

/* === TT mobile fix 24.04.2026: przycisk lokalizacji + suwak Konto === */
@media (max-width: 820px) {
    #controls-bar button,
    #controls-bar #locate-me-btn {
        width: 100% !important;
        height: 48px !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
        transform: none !important;
    }

    #controls-bar #locate-me-btn i {
        font-size: 1.05rem !important;
        margin: 0 !important;
    }

    .tt-modal-account {
        max-height: 90dvh !important;
        overflow: hidden !important;
    }

    .tt-modal-account .tt-auth-body,
    .tt-modal-account .tt-modal-body,
    .tt-modal-account .tt-modal-body-scroll {
        max-height: calc(90dvh - 68px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        scrollbar-width: thin !important;
    }
}

@media (max-width: 560px) {
    #controls-bar button,
    #controls-bar #locate-me-btn {
        height: 46px !important;
        min-height: 46px !important;
    }
}

.tt-legal-accept {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
    color: rgba(255,255,255,0.86);
    font-size: 0.86rem;
    line-height: 1.45;
}
.tt-legal-accept input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    accent-color: #fee300;
}
.tt-legal-accept a {
    color: #fee300;
    font-weight: 800;
    text-decoration: none;
}
.tt-legal-accept a:hover { text-decoration: underline; }
.menu-footer-note a { margin-left: 8px; }

/* === Rebuilt navigation system: main menu + bottom dock + map settings === */
body.menu-open {
    overflow: hidden;
}

#controls-bar {
    position: fixed !important;
    left: 50%;
    bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) + 10px));
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 24px));
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(19, 24, 33, 0.96), rgba(8, 12, 18, 0.96)),
        radial-gradient(circle at top left, rgba(196, 255, 44, 0.16), transparent 38%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    z-index: 1100;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#controls-bar button,
#controls-bar #locate-me-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 5px 4px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(237, 243, 251, 0.92) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#controls-bar button:hover,
#controls-bar button:focus-visible,
#controls-bar #locate-me-btn:hover,
#controls-bar #locate-me-btn:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(196, 255, 44, 0.35) !important;
    background: rgba(255, 255, 255, 0.085) !important;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

#controls-bar button.active {
    background: linear-gradient(180deg, rgba(196, 255, 44, 0.18), rgba(132, 214, 0, 0.14)) !important;
    border-color: rgba(196, 255, 44, 0.42) !important;
    color: #f7ffd0 !important;
}

#controls-bar button#refresh-data.is-busy i {
    animation: spin 1s linear infinite;
}

#controls-bar button#report-issue-btn,
#controls-bar button.control-action--alert {
    background: linear-gradient(180deg, rgba(255, 99, 71, 0.20), rgba(166, 42, 42, 0.18)) !important;
    border-color: rgba(255, 126, 99, 0.28) !important;
}

#controls-bar button#open-menu-btn,
#controls-bar button.control-action--primary {
    background: linear-gradient(180deg, rgba(44, 119, 255, 0.24), rgba(25, 84, 199, 0.18)) !important;
    border-color: rgba(92, 154, 255, 0.28) !important;
}

.control-action__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
}

.control-action__label {
    font-size: 0.56rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

body.menu-open #controls-bar {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 120%);
}

#app-menu-overlay {
    padding: 18px !important;
    background:
        radial-gradient(900px circle at 14% 16%, rgba(129, 255, 62, 0.18), transparent 42%),
        radial-gradient(760px circle at 88% 84%, rgba(69, 186, 255, 0.18), transparent 38%),
        rgba(3, 6, 10, 0.78) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    touch-action: pan-y;
}

.menu-content {
    width: min(1320px, 100%) !important;
    max-height: min(92vh, 960px) !important;
    height: min(92vh, 960px);
    border-radius: 32px !important;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(13, 18, 26, 0.98), rgba(8, 12, 18, 0.98)),
        radial-gradient(circle at top left, rgba(196, 255, 44, 0.12), transparent 34%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.44) !important;
    touch-action: pan-y;
}

.menu-top-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 22px !important;
    background:
        linear-gradient(90deg, rgba(196, 255, 44, 0.10), rgba(84, 202, 255, 0.08)),
        rgba(10, 14, 20, 0.78) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.menu-brand-stack {
    display: grid;
    gap: 4px;
}

.menu-brand-stack small {
    color: rgba(219, 227, 239, 0.62);
    font-size: 0.82rem;
    line-height: 1.35;
}

.menu-stage-copy {
    display: grid;
    gap: 4px;
}

.menu-stage-copy strong {
    color: #f4f7fb;
    font-size: 1.08rem;
    line-height: 1.1;
}

.menu-stage-copy small {
    color: rgba(219, 227, 239, 0.64);
    line-height: 1.4;
}

.menu-eyebrow {
    margin: 0;
    color: #c5ff49;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.menu-container {
    padding: 0 !important;
    overflow: hidden;
}

.menu-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 0;
    height: 100%;
}

.menu-aside {
    padding: 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
        radial-gradient(circle at top left, rgba(196, 255, 44, 0.08), transparent 36%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.menu-aside-card {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-aside-card h2 {
    margin: 6px 0 8px;
    font-size: 1.32rem;
    color: #fff;
}

.menu-aside-card p {
    margin: 0;
    color: rgba(222, 230, 242, 0.72);
    line-height: 1.55;
}

.menu-aside-eyebrow {
    margin: 0;
    color: rgba(197, 255, 73, 0.86);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.menu-nav {
    display: grid;
    gap: 8px;
}

.menu-nav-link {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: rgba(232, 238, 246, 0.78);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.menu-nav-link:hover,
.menu-nav-link.is-active {
    transform: translateX(2px);
    color: #fff;
    border-color: rgba(196, 255, 44, 0.24);
    background: linear-gradient(90deg, rgba(196, 255, 44, 0.12), rgba(84, 202, 255, 0.08));
}

.menu-aside-links {
    margin-top: auto;
    display: grid;
    gap: 8px;
}

.menu-aside-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    color: rgba(232, 238, 246, 0.76);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-aside-links a:hover {
    color: #fff;
    border-color: rgba(84, 202, 255, 0.24);
}

.menu-panels {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 22px;
    display: grid;
    gap: 18px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 255, 44, 0.35) rgba(255, 255, 255, 0.06);
}

.menu-panels::-webkit-scrollbar,
.menu-aside::-webkit-scrollbar {
    width: 10px;
}

.menu-panels::-webkit-scrollbar-track,
.menu-aside::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

.menu-panels::-webkit-scrollbar-thumb,
.menu-aside::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(196, 255, 44, 0.55), rgba(84, 202, 255, 0.55));
    border-radius: 999px;
}

.menu-section {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    min-width: 0;
}

.menu-section .container,
.menu-hero-card,
.menu-link-card,
#main-menu-grid-section .menu-feature-card {
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.16);
}

.menu-section .container {
    padding: 22px !important;
    border-radius: 28px !important;
    background:
        linear-gradient(180deg, rgba(20, 25, 34, 0.94), rgba(10, 14, 20, 0.94)) !important;
}

.menu-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 16px;
    padding: 22px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(97, 218, 255, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(196, 255, 44, 0.10), rgba(255, 255, 255, 0.04));
}

.menu-hero-copy h1 {
    margin: 10px 0 12px;
    font-size: clamp(1.85rem, 2vw, 2.7rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
}

.menu-hero-copy p {
    margin: 0;
    color: rgba(225, 233, 244, 0.72);
    line-height: 1.6;
    max-width: 54ch;
}

.menu-hero-actions {
    display: grid;
    gap: 10px;
    align-content: center;
}

.menu-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 18px;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-hero-btn--primary {
    background: linear-gradient(135deg, rgba(196, 255, 44, 0.20), rgba(108, 255, 170, 0.14));
    border-color: rgba(196, 255, 44, 0.28);
    color: #f8ffd8;
}

.menu-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.menu-feature-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 18px;
    border-radius: 24px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
}

.menu-feature-card--wide {
    grid-column: 1 / -1;
}

.menu-feature-card--accent {
    background:
        linear-gradient(135deg, rgba(196, 255, 44, 0.12), rgba(84, 202, 255, 0.10)),
        rgba(255, 255, 255, 0.04);
}

.menu-feature-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    color: #c5ff49;
}

.menu-feature-copy {
    display: grid;
    gap: 6px;
}

.menu-feature-copy strong {
    font-size: 1.04rem;
}

.menu-feature-copy small {
    color: rgba(225, 233, 244, 0.68);
    line-height: 1.55;
}

.menu-link-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.menu-link-card {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
}

.menu-link-card h2 {
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #fff;
}

.menu-link-list {
    display: grid;
    gap: 10px;
}

.menu-link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: rgba(230, 236, 245, 0.82);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-link-list a:hover {
    color: #fff;
    border-color: rgba(196, 255, 44, 0.24);
}

.menu-footer-note {
    margin-top: 4px;
    padding: 16px 4px 6px;
    color: rgba(221, 229, 240, 0.58);
    font-size: 0.83rem;
    text-align: center;
}

#map-settings-view-section .container {
    display: grid;
    gap: 18px;
}

.map-settings-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.map-settings-overview-card,
.map-settings-savebar {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.map-settings-overview-card strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
}

.map-settings-overview-card small {
    color: rgba(225, 233, 244, 0.68);
    line-height: 1.6;
}

.map-settings-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.map-settings-jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(240, 244, 251, 0.82);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
}

.map-settings-jump:hover {
    color: #fff;
    border-color: rgba(196, 255, 44, 0.24);
}

#map-settings-view-section .content-section {
    scroll-margin-top: 28px;
}

.map-settings-savebar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background:
        linear-gradient(180deg, rgba(20, 25, 34, 0.96), rgba(10, 14, 20, 0.98));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.map-settings-savebar .setting-inline-note {
    margin: 0;
    max-width: 60ch;
}

.map-settings-savebar #saveMapThemeBtn {
    min-width: 240px;
}

@media (max-width: 1180px) {
    .menu-top-bar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .menu-stage-copy {
        grid-column: 1 / -1;
        order: 3;
    }

    .menu-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .menu-aside {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        max-height: 34vh;
    }

    .menu-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .map-settings-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    #controls-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: min(420px, calc(100vw - 14px));
        gap: 6px;
        padding: 6px;
        border-radius: 18px;
    }

    #controls-bar #open-menu-btn {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    #controls-bar #locate-me-btn { grid-column: 1; grid-row: 1; }
    #controls-bar #refresh-data { grid-column: 2; grid-row: 1; }
    #controls-bar #report-issue-btn { grid-column: 3; grid-row: 1; }
    #controls-bar #show-buses-btn { grid-column: 1; grid-row: 2; }
    #controls-bar #show-trams-btn { grid-column: 2; grid-row: 2; }
    #controls-bar #show-favorites-only-btn { grid-column: 3; grid-row: 2; }

    #controls-bar button,
    #controls-bar #locate-me-btn {
        min-height: 42px !important;
        height: 42px !important;
        border-radius: 13px !important;
    }

    .control-action__label {
        font-size: 0.52rem;
    }

    #app-menu-overlay {
        padding: 6px !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }

    .menu-content {
        width: 100% !important;
        max-height: calc(100dvh - 12px) !important;
        height: calc(100dvh - 12px);
        border-radius: 20px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y !important;
    }

    .menu-top-bar {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px !important;
    }

    .menu-top-actions {
        width: 100%;
        justify-content: space-between;
    }

    .menu-panels {
        padding: 16px;
        overflow: visible !important;
        -webkit-overflow-scrolling: touch;
        touch-action: auto !important;
    }

    .menu-aside {
        padding: 16px;
        max-height: none;
        overflow: visible !important;
        -webkit-overflow-scrolling: touch;
        touch-action: auto !important;
    }

    .menu-container {
        overflow: visible !important;
    }

    .menu-layout {
        display: block;
        height: auto;
        min-height: 0;
    }

    .menu-section,
    .menu-section .container {
        min-height: 0;
        height: auto;
    }

    .menu-hero-card,
    .menu-link-columns,
    .menu-dashboard-grid,
    .menu-nav {
        grid-template-columns: 1fr;
    }

    .menu-feature-card,
    .menu-feature-card--wide {
        grid-column: auto;
    }

    .map-settings-savebar {
        flex-direction: column;
        align-items: stretch;
    }

    .map-settings-savebar #saveMapThemeBtn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    #controls-bar {
        bottom: max(8px, calc(env(safe-area-inset-bottom, 0px) + 6px));
        width: min(360px, calc(100vw - 12px));
        gap: 5px;
        padding: 5px;
    }

    #controls-bar button,
    #controls-bar #locate-me-btn {
        min-height: 38px !important;
        height: 38px !important;
        padding: 4px 3px !important;
    }

    .control-action__icon {
        width: 20px;
        height: 20px;
        border-radius: 8px;
        font-size: 0.72rem;
    }

    .control-action__label {
        font-size: 0.46rem;
    }

    .menu-aside,
    .menu-panels {
        padding: 12px;
    }

    .menu-hero-copy h1 {
        font-size: 1.62rem;
    }

    .menu-link-card,
    .menu-hero-card,
    .menu-section .container {
        border-radius: 18px !important;
    }

    .menu-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-aside {
        max-height: none;
    }

    .menu-content {
        max-height: calc(100dvh - 8px) !important;
        height: calc(100dvh - 8px);
        border-radius: 16px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y !important;
    }

    .menu-top-bar {
        padding: 12px !important;
    }

    .menu-panels {
        min-height: 0;
        max-height: none;
        overflow: visible !important;
    }

    .menu-section .container {
        max-height: none;
        overflow: visible;
    }

    .menu-section,
    .menu-section * {
        touch-action: auto;
    }
}

@media (max-width: 860px) {
    body.tracking-panel-open #controls-bar {
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, 120%);
    }
}
