:root {
    --bg: #020617;
    --panel: #1e293b;
    --card: #0f172a;
    --border: #334155;
    --text: #e2e8f0;
    --accent: #ef4444;
    --sky: #38bdf8;
    --green: #22c55e;
    --muted: #94a3b8;
    --link: #fbbf24;
    --link-hover: #fde68a;
    --link-visited: #f59e0b;
    --link-underline: rgba(251, 191, 36, 0.55);
    --atak-cursor-target: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%230f172a' stroke-width='1'/%3E%3Cpath d='M12 4v16M4 12h16' stroke='%23ffffff' stroke-width='2' fill='none'/%3E%3Cpath d='M12 4v16M4 12h16' stroke='%230f172a' stroke-width='1' fill='none'/%3E%3C/svg%3E") 12 12, crosshair;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
}

.main-header {
    background: var(--panel);
    border-bottom: 2px solid var(--border);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    top: env(safe-area-inset-top, 0);
    z-index: 300;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 901px) {
    .main-header {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 0 24px;
        height: 56px;
    }

    .header-bar {
        flex: 0 0 auto;
        width: auto;
        padding: 0;
        height: 56px;
        display: flex;
        align-items: center;
    }

    .site-nav {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: flex-end;
        gap: 16px;
        min-width: 0;
        margin-left: auto;
        position: static;
    }

    .nav-breadcrumb {
        flex: 0 1 auto;
        min-width: 0;
        max-width: min(50vw, 640px);
        margin-right: 0;
    }

    .nav-bc-trail {
        justify-content: flex-end;
    }

    .nav-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 6px;
        padding-left: 16px;
        border-left: 1px solid var(--border);
    }

    body.nav-open {
        overflow: auto;
    }
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 56px;
    gap: 12px;
}

.brand {
    font-weight: bold;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}
.brand-pl { color: var(--sky); font-weight: 600; }
.brand-sar { color: var(--accent); }

/* Hamburger — domyślnie ukryty na desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    margin: 0 -6px 0 auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle--open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle--open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle--open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.nav-breadcrumb {
    max-width: min(42vw, 480px);
    min-width: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nav-user {
    color: #64748b;
    font-size: 0.8rem;
    padding: 0 8px;
    white-space: nowrap;
}

/* Nazwa użytkownika jako link — wizualnie jak pozostałe elementy menu */
.nav-user[href] {
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 6px 10px;
    line-height: 1;
}
.nav-user[href]:hover {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}
.nav-user[href]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.nav-backdrop {
    display: none !important;
    pointer-events: none;
    visibility: hidden;
}

body.nav-open {
    overflow: hidden;
}

.nav-bc-trail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
}

.nav-bc-item {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
}

.nav-bc-item:not(:last-child)::after {
    content: "›";
    margin: 0 8px;
    color: #475569;
    font-weight: 400;
    user-select: none;
}

.nav-bc-item a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--link-underline);
    font-weight: 600;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.nav-bc-item a:hover {
    color: var(--link-hover);
    text-decoration-color: var(--link-hover);
}

.nav-bc-item--current span {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(56, 189, 248, 0.12));
    border: 1px solid rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
    white-space: nowrap;
}
.nav-item {
    color: var(--muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-item.admin { color: var(--sky); border: 1px solid rgba(56,189,248,0.3); }
.nav-item.map { color: #84cc16; border: 1px solid rgba(132,204,22,0.35); }
.nav-item.map:hover { color: #a3e635; background: rgba(132,204,22,0.12); }
button.nav-item.map {
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    line-height: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(56, 189, 248, 0.25);
    touch-action: manipulation;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    text-align: inherit;
}
.nav-item.logout { color: var(--accent); }

/* Mobile / Android — menu hamburger */
@media (max-width: 900px) {
    .main-header {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    }

    .header-bar {
        background: var(--panel);
        position: relative;
        z-index: 2;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px 16px;
        background: var(--panel);
        border-bottom: 2px solid var(--border);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
        max-height: calc(100vh - 56px);
        max-height: calc(100dvh - 56px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .site-nav.site-nav--open {
        display: flex;
    }

    .nav-breadcrumb {
        max-width: none;
        width: 100%;
        padding-bottom: 12px;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--border);
    }

    .nav-bc-trail {
        flex-wrap: wrap;
        font-size: 0.85rem;
    }

    .nav-bc-item--current span {
        white-space: normal;
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-user {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-bottom: 1px solid var(--border);
        margin-bottom: 4px;
    }

    .nav-item {
        display: block;
        padding: 12px 14px;
        font-size: 0.95rem;
        border-radius: 6px;
    }

    button.nav-item.map {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
        padding: 12px 14px;
        font-size: 0.95rem;
        border-radius: 6px;
    }

    body.nav-open .nav-backdrop {
        display: block !important;
        visibility: visible;
        pointer-events: auto;
        position: fixed;
        inset: 0;
        top: calc(56px + env(safe-area-inset-top, 0px));
        z-index: 250;
        width: 100%;
        bottom: 0;
        background: rgba(2, 6, 23, 0.55);
        border: none;
        padding: 0;
        margin: 0;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
    }
}

.page-content {
    flex: 1;
    padding: 24px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

h1, h2 {
    color: var(--accent);
    font-size: 1rem;
    margin: 0 0 16px;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

body.layout-guest {
    min-height: 100vh;
}

body.layout-guest main.main-guest {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 24px 20px;
    box-sizing: border-box;
}

.login-wrap {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.login-brand {
    text-align: center;
    border: none;
    padding: 0;
    margin: 0 0 24px;
    font-size: 1.5rem;
    color: var(--text);
    font-weight: bold;
}

.login-brand .brand-pl {
    color: var(--sky);
}

.login-policy {
    font-size: 0.85rem;
    margin: -12px 0 16px;
    text-align: center;
    line-height: 1.45;
}

.login-throttle-alert {
    margin-bottom: 16px;
}

.login-throttle-countdown {
    display: block;
    margin-top: 8px;
    color: var(--sky);
    font-size: 0.95rem;
}

.login-attempts-hint {
    text-align: center;
}

label {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

input, select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
}

.password-field {
    position: relative;
    margin-bottom: 16px;
}

.password-field input {
    margin-bottom: 0;
    padding-right: 4.5rem;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--sky);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.2;
}

.password-toggle:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--sky);
}

.password-requirements {
    list-style: none;
    margin: 10px 0 14px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.password-req-item {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--muted);
    padding-left: 1.35em;
    position: relative;
}

.password-req-item::before {
    content: '○';
    position: absolute;
    left: 0;
    color: #64748b;
}

.password-req-item.is-met {
    color: #86efac;
}

.password-req-item.is-met::before {
    content: '✓';
    color: #86efac;
}

.password-req-item.is-unmet {
    color: #fca5a5;
}

.password-req-item.is-unmet::before {
    content: '✗';
    color: #fca5a5;
}

.password-req-item.is-pending::before {
    content: '○';
    color: #64748b;
}

button[type="submit"]:disabled,
button[type="submit"][aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: #dc2626; }
.btn-sky { background: var(--sky); color: #0f172a; }
.btn-muted { background: #334155; color: #fff; }

.admin-toast-stack {
    position: fixed;
    top: calc(56px + env(safe-area-inset-top, 0px) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    width: min(92vw, 520px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.admin-toast {
    pointer-events: auto;
    margin: 0;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
    animation: admin-toast-in 0.28s ease-out;
}

.admin-toast.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

@keyframes admin-toast-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid var(--accent); color: #fca5a5; }
.alert-ok,
.alert-success { background: rgba(34,197,94,0.15); border: 1px solid var(--green); color: #86efac; }

/* Checkbox / radio: kolumna wyboru | kolumna opisu */
.check-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.check-list .check-row {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    align-items: start;
    gap: 0.5rem 0.75rem;
    padding: 0.45rem 0;
    cursor: pointer;
}
.check-list .check-row input[type="checkbox"],
.check-list .check-row input[type="radio"] {
    margin: 0.15rem 0 0;
    justify-self: center;
    width: 1.1rem;
    height: 1.1rem;
}
.check-list .check-row .check-label {
    font-weight: 400;
    line-height: 1.45;
    color: var(--text);
    padding-top: 0.05rem;
    cursor: pointer;
}
.check-list .check-row:hover .check-label {
    color: #e2e8f0;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    position: relative;
    z-index: 1;
}

.link-tile {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: 0.2s;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: rgba(56, 189, 248, 0.25);
    touch-action: manipulation;
}
.link-tile:hover {
    border-color: var(--sky);
    transform: translateY(-2px);
}
.link-tile__body {
    display: block;
    pointer-events: none;
}
.link-tile strong { display: block; margin-bottom: 0; color: var(--sky); pointer-events: none; }
.link-tile small { display: block; color: var(--muted); font-size: 0.8rem; pointer-events: none; }
.link-tile.admin-tile { border-color: rgba(239,68,68,0.4); }
.link-tile.admin-tile strong { color: var(--accent); }
.link-tile--map { border-color: rgba(132,204,22,0.35); }
.link-tile--map strong { color: #84cc16; }
.link-tile--map:hover { border-color: rgba(163,230,53,0.55); }
.link-tile--map:hover strong { color: #a3e635; }

.link-tile--external { border-color: rgba(56,189,248,0.25); }
.link-tile--external strong { color: var(--sky); }
.link-tile--external .ext-icon {
    font-size: 0.75em;
    opacity: 0.85;
    margin-left: 2px;
}

.muted-block { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; }
.hint-block { color: var(--muted); font-size: 0.82rem; margin: 16px 0 0; line-height: 1.5; }

/* Tekstowe hiperłącza — kontrastowy żółty (logowanie, rejestracja, treść stron) */
.main-guest a:not(.brand):not(.btn):not(.link-tile),
.page-content a:not(.brand):not(.nav-item):not(.btn):not(.link-tile):not(.player-link):not(.mosaic-expand):not(.status-badge--link):not(.bsp-stream-status),
.muted-block a,
.login-card a:not(.btn),
.card a:not(.btn):not(.link-tile):not(.status-badge--link):not(.bsp-stream-status),
.alert a,
.admin-md-body a {
    color: var(--link);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--link-underline);
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.main-guest a:not(.brand):not(.btn):not(.link-tile):hover,
.page-content a:not(.brand):not(.nav-item):not(.btn):not(.link-tile):not(.player-link):not(.mosaic-expand):not(.status-badge--link):not(.bsp-stream-status):hover,
.muted-block a:hover,
.login-card a:not(.btn):hover,
.card a:not(.btn):not(.link-tile):not(.status-badge--link):not(.bsp-stream-status):hover,
.alert a:hover,
.admin-md-body a:hover {
    color: var(--link-hover);
    text-decoration-color: var(--link-hover);
}

.main-guest a:not(.brand):not(.btn):not(.link-tile):visited,
.page-content a:not(.brand):not(.nav-item):not(.btn):not(.link-tile):not(.player-link):not(.mosaic-expand):not(.status-badge--link):not(.bsp-stream-status):visited,
.muted-block a:visited,
.login-card a:not(.btn):visited,
.card a:not(.btn):not(.link-tile):not(.status-badge--link):not(.bsp-stream-status):visited,
.alert a:visited,
.admin-md-body a:visited {
    color: var(--link-visited);
}

.main-guest a:not(.brand):not(.btn):not(.link-tile):visited:hover,
.page-content a:not(.brand):not(.nav-item):not(.btn):not(.link-tile):not(.player-link):not(.mosaic-expand):not(.status-badge--link):not(.bsp-stream-status):visited:hover,
.muted-block a:visited:hover,
.login-card a:not(.btn):visited:hover,
.card a:not(.btn):not(.link-tile):not(.status-badge--link):not(.bsp-stream-status):visited:hover,
.alert a:visited:hover,
.admin-md-body a:visited:hover {
    color: var(--link-hover);
}

.main-guest a:not(.brand):not(.btn):not(.link-tile):focus-visible,
.page-content a:not(.brand):not(.nav-item):not(.btn):not(.link-tile):not(.player-link):not(.mosaic-expand):not(.status-badge--link):not(.bsp-stream-status):focus-visible,
.muted-block a:focus-visible,
.login-card a:not(.btn):focus-visible,
.card a:not(.btn):not(.link-tile):not(.status-badge--link):not(.bsp-stream-status):focus-visible,
.alert a:focus-visible,
.admin-md-body a:focus-visible {
    outline: 2px solid var(--link-hover);
    outline-offset: 2px;
    border-radius: 2px;
}

.copy-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.copy-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.copy-block-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.copy-block-head strong { color: var(--sky); font-size: 0.85rem; }
.copy-block-value {
    margin: 0;
    padding: 10px 12px;
    background: #0f172a;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.45;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    color: #e2e8f0;
    border: 1px solid var(--border);
}
.btn-copy,
.btn-open {
    padding: 6px 12px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.btn-open:hover {
    background: #475569;
    color: #fff;
}

.config-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}
.config-list code {
    color: var(--sky);
    font-size: 0.85em;
}

/* BSP — moduł VIDEO */
.page-bsp-video {
    max-width: 960px;
}

.bsp-video-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bsp-video-intro .muted-block {
    margin-bottom: 20px;
}

.bsp-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 24px;
    margin: 0;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.bsp-meta div {
    margin: 0;
}

.bsp-meta dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 4px;
}

.bsp-meta dd {
    margin: 0;
    font-size: 0.95rem;
}

.bsp-meta code,
.card code {
    padding: 2px 8px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--sky);
    font-size: 0.88em;
    word-break: break-all;
}

.bsp-drone-head,
.bsp-stream-head,
.bsp-drone-head--sub {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 8px;
}

.bsp-drone-head h2,
.bsp-drone-head h3.bsp-stream-title,
.bsp-stream-head .bsp-stream-title,
.bsp-drone-head--sub .bsp-stream-title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.bsp-stream-head .bsp-stream-title,
.bsp-drone-head--sub .bsp-stream-title {
    font-size: 1.05rem;
    color: var(--sky);
    letter-spacing: 0.02em;
    border-left: none;
    padding-left: 0;
}

.bsp-drone-head > .bsp-stream-status,
.bsp-drone-head > .badge,
.bsp-stream-head > .bsp-stream-status,
.bsp-stream-head .bsp-stream-status,
.bsp-drone-head--sub > .bsp-stream-status,
.bsp-drone-head--sub .bsp-stream-status {
    flex: 0 0 auto;
    margin-left: auto;
}

.bsp-drone-head--sub {
    margin-top: 0;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-ok {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--green);
    color: #86efac;
}

.badge-muted {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid var(--border);
    color: var(--muted);
}

.bsp-drone-card--configured {
    border-color: rgba(56, 189, 248, 0.35);
}

.bsp-drone-card--pending {
    opacity: 0.92;
}

.bsp-video-live {
    margin: 0 0 4px;
    font-size: 0.88rem;
}

.bsp-video-live .live-dot {
    color: var(--green);
    margin-right: 6px;
}

.page-bsp-video .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.page-bsp-video .status-badge--on {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--green);
    color: #86efac;
}

.page-bsp-video .status-badge--off {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.page-bsp-video a.status-badge--link,
.page-bsp-video a.status-badge--link:hover,
.page-bsp-video a.status-badge--link:focus,
.page-bsp-video a.status-badge--link:visited,
.page-bsp-video a.status-badge--link:visited:hover {
    text-decoration: none !important;
    transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.page-bsp-video a.status-badge--link.status-badge--on:hover {
    opacity: 0.92;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.page-bsp-video a.status-badge--link.status-badge--disabled {
    pointer-events: none;
    cursor: default;
}

.page-bsp-video .bsp-stream-signal {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.page-bsp-video .bsp-stream-block--online .bsp-stream-signal {
    color: #86efac;
}

.page-bsp-video .bsp-stream-block--offline .bsp-stream-signal {
    color: #fca5a5;
}

.bsp-stream-block--grouped {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.bsp-stream-block--grouped:first-of-type {
    margin-top: 32px;
    padding-top: 8px;
    border-top: none;
}

.bsp-stream-block--grouped .bsp-drone-head--sub {
    margin-top: 4px;
}

.copy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 16px;
}

@media (min-width: 720px) {
    .copy-grid {
        grid-template-columns: 1fr;
    }
}

.copy-label-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.proto-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.proto-rtmp {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.proto-rtsp {
    background: rgba(124, 92, 255, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(124, 92, 255, 0.4);
}

.proto-https {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.copy-hint {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.page-bsp-video .copy-block {
    margin-bottom: 0;
}

.page-bsp-video .copy-block-value {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.8rem;
}

.page-bsp-video .btn-copy.btn-sky,
.page-bsp-video .btn-open.btn-muted {
    width: auto;
}

/* BSP — odtwarzacz VIDEO (lista + podgląd) */
.page-bsp-player .muted-block .bsp-cross-link,
.page-bsp-video .muted-block .bsp-cross-link {
    text-decoration: none;
    border-bottom: 2px solid var(--link-underline);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.page-bsp-player .muted-block .bsp-cross-link:hover,
.page-bsp-video .muted-block .bsp-cross-link:hover {
    border-bottom-color: var(--link-hover);
}

.page-bsp-player .bsp-player-live-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    width: 100%;
}

.page-bsp-player .bsp-player-live {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
}

.page-bsp-player .btn-mosaic {
    padding: 8px 18px;
    font-size: 0.8rem;
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    margin-left: auto;
    align-self: center;
}

.page-bsp-player .live-dot {
    color: var(--green);
    margin-right: 6px;
}

.page-bsp-player .grid_player_list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 0;
    align-items: stretch;
}

.page-bsp-player .stream-card {
    background: var(--card);
    border: 2px solid transparent;
    border-radius: 12px;
    position: relative;
    min-height: 148px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease, background 0.25s ease, opacity 0.25s ease;
    overflow: hidden;
    isolation: isolate;
}

.page-bsp-player .stream-card.online {
    border-color: var(--green);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.15);
}

.page-bsp-player .stream-card.online:hover {
    background: rgba(20, 83, 45, 0.35);
}

.page-bsp-player .stream-card.offline {
    border-color: rgba(239, 68, 68, 0.45);
    opacity: 0.88;
}

.page-bsp-player .stream-card.offline:hover {
    opacity: 1;
    background: rgba(127, 29, 29, 0.25);
}

.page-bsp-player .stream-card .status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
}

.page-bsp-player .stream-card.online .status-badge {
    color: #86efac;
}

.page-bsp-player .stream-card.offline .status-badge {
    color: #fca5a5;
}

.page-bsp-player .stream-card .player-link {
    display: block;
    flex: 1;
    padding: 20px 16px 16px;
    color: inherit;
    text-decoration: none;
}

.page-bsp-player .stream-card .player-link strong {
    display: block;
    color: var(--sky);
    font-size: 1rem;
    margin-bottom: 6px;
}

.page-bsp-player .stream-card .stream-path {
    display: block;
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.page-bsp-player .stream-card .status-text {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.page-bsp-player .stream-card.online .status-text {
    color: #86efac;
}

.page-bsp-player .bsp-player-grid-card {
    margin-top: 0;
    overflow: visible;
}

/* BSP — mozaika wideo */
.page-bsp-mosaic {
    max-width: 100%;
}

.page-bsp-mosaic .bsp-mosaic-intro {
    margin-bottom: 20px;
}

.page-bsp-mosaic .bsp-mosaic-intro-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-bsp-mosaic .bsp-mosaic-intro-head h2 {
    margin-bottom: 0;
}

.page-bsp-mosaic .btn-mosaic-back {
    width: auto;
    padding: 8px 14px;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-left: auto;
}

.page-bsp-mosaic .bsp-mosaic-grid-card {
    padding: 16px;
}

.page-bsp-mosaic .mosaic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin: 0;
}

.page-bsp-mosaic .camera-cell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.page-bsp-mosaic .camera-label {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.75);
    padding: 4px 10px;
    font-size: 0.78rem;
    border-left: 3px solid var(--sky);
    line-height: 1.35;
}

.page-bsp-mosaic .camera-label small {
    display: block;
    color: var(--muted);
    font-family: ui-monospace, monospace;
    font-size: 0.68rem;
    margin-top: 2px;
}

.page-bsp-mosaic .camera-cell--live {
    border-color: rgba(34, 197, 94, 0.45);
}

.page-bsp-mosaic .camera-cell--offline {
    border-color: rgba(239, 68, 68, 0.35);
}

.page-bsp-mosaic .camera-status {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.65rem;
    font-weight: 700;
}

.page-bsp-mosaic .camera-status--on {
    color: #86efac;
}

.page-bsp-mosaic .camera-status--off {
    color: #fca5a5;
}

.page-bsp-mosaic .mosaic-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000;
}

.page-bsp-mosaic .mosaic-video-wrap[hidden] {
    display: none !important;
}

.page-bsp-mosaic .mosaic-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.page-bsp-mosaic .mosaic-expand {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 3;
    background: rgba(15, 23, 42, 0.85);
    color: var(--sky);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.85rem;
    text-decoration: none;
}

.page-bsp-mosaic .mosaic-expand:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #fff;
}

.page-bsp-mosaic .mosaic-offline {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.6);
}

.page-bsp-mosaic .mosaic-offline[hidden],
.page-bsp-mosaic .camera-cell--live .mosaic-offline {
    display: none !important;
}

.page-bsp-mosaic .mosaic-offline p {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-bsp-player .bsp-player-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bsp-watch-body {
    margin: 0;
    background: #000;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.bsp-watch-top {
    background: #1e293b;
    padding: 10px 16px;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 2px solid var(--accent);
}

.bsp-watch-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
}

.bsp-watch-head-main {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.bsp-watch-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.bsp-watch-qr-screen {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.bsp-watch-qr-screen[hidden] {
    display: none !important;
}

.bsp-watch-qr-screen-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
}

.bsp-watch-qr-screen-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 360px);
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 18px 16px 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.bsp-watch-qr-screen-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.bsp-watch-qr-screen-close:hover,
.bsp-watch-qr-screen-close:focus-visible {
    color: #fff;
}

.bsp-watch-qr-screen-title {
    margin: 0 0 6px;
    font-size: 1rem;
    color: #f1f5f9;
}

.bsp-watch-qr-screen-path {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: #94a3b8;
    word-break: break-all;
}

.bsp-watch-qr-screen-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.bsp-watch-qr-screen-visual canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.bsp-watch-qr-screen-url {
    margin: 0 0 12px;
    font-size: 0.72rem;
    color: #64748b;
    word-break: break-all;
    max-height: 4.5em;
    overflow: auto;
}

.bsp-watch-qr-screen-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bsp-watch-qr-screen-actions .btn {
    flex: 1 1 auto;
    min-width: 120px;
    text-align: center;
}

body.bsp-watch-qr-open {
    overflow: hidden;
}

html.taksar-screenshots-blocked.taksar-screenshot-guard body {
    filter: blur(18px);
}

html.taksar-screenshots-blocked.taksar-screenshot-guard body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #020617;
    pointer-events: none;
}

.bsp-watch-path {
    color: var(--sky);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsp-watch-head-main a.atak-paths-wp-coord-back {
    text-decoration: none;
}

.bsp-watch-video-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.bsp-watch-video-wrap video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bsp-watch-status {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.65);
}

.bsp-watch-status--ok {
    color: #86efac;
}

.bsp-watch-status--err {
    color: #fca5a5;
}

.hidden { display: none !important; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
th, td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
th { color: var(--muted); font-size: 0.75rem; }

.perm-matrix input { width: auto; margin: 0; }

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.admin-nav-card {
    margin-bottom: 16px;
}

.admin-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
}

.admin-nav-desc {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0 0 14px;
}

.admin-nav-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.admin-nav-select-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.admin-nav-select-field {
    position: relative;
    max-width: 100%;
}

.admin-nav-select-field::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--sky);
    border-bottom: 2px solid var(--sky);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.admin-nav-select {
    width: 100%;
    min-width: min(100%, 360px);
    max-width: 100%;
    padding: 11px 40px 11px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 0.925rem;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.admin-nav-select:hover {
    border-color: #475569;
    background: #111827;
}

.admin-nav-select:focus {
    outline: none;
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.admin-nav-select optgroup {
    font-style: normal;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: #0b1220;
    padding: 6px 0 4px;
}

.admin-nav-select optgroup option {
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: normal;
    text-transform: none;
    color: var(--text);
    background: var(--card);
    padding: 8px 12px;
}

.admin-nav-select option {
    font-weight: 400;
    color: var(--text);
    background: var(--card);
    padding: 8px 12px;
}

.admin-nav-select option:checked {
    background: #1e3a5f;
    color: #e0f2fe;
}

.admin-nav-select option.admin-nav-option-sub,
.admin-nav-select optgroup option {
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
    font-size: 0.86rem;
    color: #cbd5e1;
}

.admin-db-scroll {
    overflow-x: auto;
    max-height: 70vh;
}

.admin-db-table {
    font-size: 0.75rem;
}

.admin-db-table .db-cell {
    display: block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mtx-perm-table select {
    width: 100%;
    min-width: 180px;
    max-width: 280px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.85rem;
}

.mtx-path-perms[hidden] {
    display: none !important;
}

.admin-user-mtx-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

.admin-user-mtx-form .admin-user-mtx-group-select {
    width: auto;
    max-width: 88px;
    min-width: 0;
    margin: 0;
    padding: 4px 6px;
    font-size: 0.8rem;
    flex: 0 1 auto;
}

.admin-user-mtx-form label {
    flex: 0 0 auto;
}

.admin-user-mtx-form .btn {
    flex: 0 0 auto;
}

.admin-users-mtx-table .admin-user-name--inactive {
    color: #f87171;
    font-weight: 600;
}

.admin-users-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.admin-users-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: min(100%, 320px);
}

.admin-users-filter-label {
    font-size: 0.78rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-users-filter-select {
    min-width: 280px;
    max-width: 100%;
}

.admin-users-filter-hint {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: -6px 0 14px;
}

.org-unit-assign-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    border: 1px solid #334155;
    border-radius: 6px;
    overflow: hidden;
}

.org-unit-assign-head,
.org-unit-assign-row {
    display: grid;
    grid-template-columns: 3.5rem 1fr 7.5rem;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.org-unit-assign-head {
    background: #1e293b;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.org-unit-assign-row {
    background: #0f172a;
    border-top: 1px solid #1e293b;
}

.org-unit-assign-row--assigned {
    background: #132033;
}

.org-unit-assign-row--inactive {
    opacity: 0.65;
}

.org-unit-assign-col--pick {
    display: flex;
    justify-content: center;
}

.org-unit-assign-col--name {
    font-size: 0.88rem;
    line-height: 1.35;
}

.org-unit-assign-fullname {
    display: block;
    color: #94a3b8;
    font-size: 0.82rem;
}

.org-unit-assign-inactive {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.75rem;
    color: #64748b;
    font-style: normal;
}

.org-unit-primary-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    font-size: 0.8rem;
    color: #94a3b8;
    position: relative;
    z-index: 1;
}

.org-unit-primary-pick input:disabled {
    pointer-events: none;
}

.org-unit-primary-pick input:disabled + .org-unit-primary-label {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.org-unit-primary-pick input:checked + .org-unit-primary-label {
    color: #38bdf8;
    font-weight: 600;
}

#mtx-group-assign-table.org-unit-assign-table .org-unit-assign-head,
#mtx-group-assign-table .org-unit-assign-row {
    grid-template-columns: 3.5rem 1fr 4.5rem 5.5rem;
}

.mtx-manage-pick,
.mtx-primary-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    cursor: pointer;
    font-size: 0.75rem;
    color: #94a3b8;
}

.mtx-manage-pick input:disabled + .org-unit-primary-label,
.mtx-primary-pick input:disabled + .org-unit-primary-label {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 520px) {
    .org-unit-assign-head,
    .org-unit-assign-row {
        grid-template-columns: 2.5rem 1fr 5.5rem;
        padding: 8px;
    }

    #mtx-group-assign-table .org-unit-assign-head,
    #mtx-group-assign-table .org-unit-assign-row {
        grid-template-columns: 2.5rem 1fr 3.5rem 4rem;
    }

    .org-unit-primary-label {
        font-size: 0;
    }

    .org-unit-primary-label::before {
        content: '★';
        font-size: 1rem;
    }
}

.admin-users-mtx-table th .admin-users-sort {
    color: inherit;
    text-decoration: none;
}

.admin-users-mtx-table th .admin-users-sort:hover {
    color: #38bdf8;
}

.admin-user-unit-more {
    display: inline-block;
    margin-left: 4px;
    padding: 0 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    background: #1e293b;
    border-radius: 4px;
    vertical-align: middle;
    cursor: help;
}

.admin-users-mtx-table td {
    vertical-align: middle;
}

/* Traccar — stabilna tabela (bez rozjeżdżania po zapisie / przeładowaniu) */
.traccar-devices-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    max-height: none;
}

.traccar-devices-table {
    table-layout: fixed;
    width: 100%;
    font-size: 0.8rem;
}

.traccar-devices-table th,
.traccar-devices-table td {
    padding: 8px 10px;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.traccar-devices-table th:nth-child(1),
.traccar-devices-table td:nth-child(1) {
    width: 22%;
}

.traccar-devices-table th:nth-child(2),
.traccar-devices-table td:nth-child(2) {
    width: 33%;
}

.traccar-devices-table th:nth-child(3),
.traccar-devices-table td:nth-child(3) {
    width: 45%;
}

.traccar-col-device {
    min-width: 0;
}

.traccar-device-name {
    font-weight: 600;
    font-size: 0.84rem;
    line-height: 1.25;
}

.traccar-device-uid {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.traccar-device-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    color: #64748b;
}

.traccar-col-status {
    min-width: 0;
    max-width: none;
    font-size: 0.76rem;
    line-height: 1.35;
}

.traccar-status-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 4px;
}

.traccar-status-time {
    font-size: 0.72rem;
    color: #94a3b8;
}

.traccar-status-line {
    margin-top: 2px;
}

.traccar-status-telemetry {
    color: #94a3b8;
    font-size: 0.72rem;
}

.traccar-pos-link {
    color: var(--sky, #38bdf8);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.traccar-pos-link:hover {
    border-bottom-color: var(--sky, #38bdf8);
}

.traccar-pos-speed {
    margin-left: 8px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.traccar-tel-sep {
    margin: 0 5px;
    color: #475569;
}

.traccar-col-map {
    min-width: 0;
}

.traccar-map-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.traccar-map-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
    align-items: center;
}

.traccar-map-lbl {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.traccar-map-control {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 4px 8px;
    font-size: 0.78rem;
    box-sizing: border-box;
}

select.traccar-map-control {
    appearance: auto;
}

.traccar-map-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.traccar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 3px 8px;
    font-size: 0.72rem;
    line-height: 1.2;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}

.traccar-toggle:has(input:checked) {
    color: #e2e8f0;
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.1);
}

.traccar-toggle input[type="checkbox"] {
    margin: 0;
    width: 0.85rem;
    height: 0.85rem;
    accent-color: var(--sky, #38bdf8);
    cursor: pointer;
}

.traccar-toolbar-sep {
    width: 1px;
    height: 18px;
    margin: 0 2px;
    background: var(--border);
    flex-shrink: 0;
}

/* Traccar — serwery zewnętrzne */
.traccar-external-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.traccar-external-head h2 {
    margin: 0;
}

.traccar-external-table code {
    font-size: 0.78rem;
}

.traccar-ext-meta {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    color: #64748b;
}

.traccar-ext-status {
    font-size: 0.78rem;
    line-height: 1.5;
}

.traccar-ext-status .badge {
    margin-right: 4px;
}

.traccar-ext-error {
    display: inline-block;
    margin-left: 4px;
    color: #f87171;
    font-size: 0.72rem;
    cursor: help;
}

.traccar-ext-actions {
    white-space: nowrap;
}

.traccar-ext-actions form,
.traccar-ext-actions a {
    display: inline-block;
    margin: 2px 0;
}

.traccar-ext-form textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
}

.admin-page .btn-compact {
    padding: 3px 10px;
    font-size: 0.72rem;
    line-height: 1.25;
}

.bsp-config-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.bsp-config-group-name {
    color: var(--sky, #38bdf8);
    font-weight: 600;
}

.page-content--map-manual {
    max-width: 920px;
    margin: 0 auto;
    padding: 16px;
}

.map-manual-page-card {
    max-width: none;
}

.map-manual-page-back {
    margin: 0 0 12px;
}

.map-manual-page-body {
    max-height: none;
}

.atak-paths-map-manual-intro {
    margin: 0 0 10px;
    font-size: 0.86rem;
    color: #94a3b8;
    line-height: 1.45;
}

.atak-paths-map-manual-actions {
    margin: 0 0 14px;
}

.atak-paths-map-manual-edit {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.atak-paths-map-manual-edit-hint {
    margin: 0 0 10px;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
}

.atak-paths-map-manual-edit-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
}

.atak-paths-map-manual-markdown {
    width: 100%;
    min-height: 280px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
}

.atak-paths-map-manual-edit-status {
    margin: 0 0 10px;
    min-height: 1.2em;
    font-size: 0.8rem;
    color: #94a3b8;
}

.atak-paths-map-manual-edit-status.is-ok {
    color: #86efac;
}

.atak-paths-map-manual-edit-status.is-error {
    color: #fca5a5;
}

.admin-doc-preview-card {
    max-width: none;
}

.admin-doc-preview {
    max-height: 70vh;
    overflow: auto;
    padding: 4px 8px 16px;
    border-top: 1px solid var(--border);
}

.admin-md-body {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text);
}

.admin-md-body h1,
.admin-md-body h2,
.admin-md-body h3 {
    margin: 1.2em 0 0.5em;
    color: var(--text);
}

.admin-md-body h1 { font-size: 1.35rem; }
.admin-md-body h2 { font-size: 1.15rem; }
.admin-md-body h3 { font-size: 1rem; }

.admin-md-body p {
    margin: 0.6em 0;
}

.admin-md-body code {
    font-size: 0.88em;
    background: rgba(148, 163, 184, 0.12);
    padding: 1px 5px;
    border-radius: 4px;
}

.admin-md-pre {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    font-size: 0.82rem;
    margin: 0.8em 0;
}

.admin-md-table-wrap {
    overflow-x: auto;
    margin: 0.8em 0;
}

.admin-md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-md-table th,
.admin-md-table td {
    border: 1px solid var(--border);
    padding: 6px 10px;
    text-align: left;
}

.admin-md-table th {
    background: rgba(56, 189, 248, 0.08);
}

.admin-md-list {
    margin: 0.5em 0 0.8em 1.2em;
}

.bsp-video-user-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    max-width: 480px;
}

.bsp-video-user-form label {
    margin: 0;
}

.bsp-mtx-user-select {
    min-width: 200px;
    flex: 1;
}

.bsp-video-perms-table {
    width: 100%;
    max-width: 640px;
    font-size: 0.9rem;
}

.bsp-video-perms-table th,
.bsp-video-perms-table td {
    padding: 6px 10px;
}

.bsp-stream-block--default {
    border-left: 3px solid var(--accent-sky, #38bdf8);
}

.bsp-stream-card {
    padding: 18px 20px;
}

.bsp-stream-card .bsp-stream-head {
    margin-bottom: 6px;
}

.bsp-stream-card .bsp-stream-meta-line {
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.bsp-stream-card .bsp-stream-meta-line code {
    margin-right: 0.35em;
}

.bsp-stream-card .bsp-stream-meta-line strong {
    font-weight: 600;
    color: #e2e8f0;
}

.bsp-stream-default-badge {
    flex: 0 0 auto;
    font-size: 0.65rem;
}

.bsp-stream-links-details {
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    scroll-margin-top: 5.5rem;
}

.bsp-stream-links-summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sky);
    user-select: none;
}

.bsp-stream-links-summary::-webkit-details-marker {
    display: none;
}

.bsp-stream-links-summary::marker {
    content: '';
}

.bsp-stream-links-summary::before {
    content: '▸';
    margin-right: 8px;
    transition: transform 0.15s ease;
    color: var(--muted);
}

.bsp-stream-links-details[open] .bsp-stream-links-summary::before {
    transform: rotate(90deg);
}

.bsp-stream-links-summary-meta {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
}

.bsp-stream-links-panel {
    margin: 0;
    padding: 0 14px 14px;
    border-top: 1px solid var(--border);
}

.bsp-stream-links-panel .copy-block:first-child {
    margin-top: 14px;
}

.mtx-intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.mtx-groups-panel {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.mtx-groups-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.mtx-groups-add-form input[type="text"] {
    width: min(100%, 220px);
    margin: 0;
}

.mtx-groups-table {
    width: 100%;
    font-size: 0.85rem;
}

.mtx-groups-table th,
.mtx-groups-table td {
    padding: 8px 10px;
}

.mtx-col-run-ready {
    width: 2.5rem;
    max-width: 2.5rem;
    text-align: center;
    white-space: nowrap;
    padding-left: 6px;
    padding-right: 6px;
}

.mtx-run-ready-set {
    color: var(--accent-sky, #38bdf8);
    font-size: 1rem;
    line-height: 1;
}

.mtx-run-ready-none {
    color: #64748b;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mtx-users-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.mtx-users-head h2 {
    margin: 0;
}

.mtx-user-form-card {
    margin-top: 16px;
    border-color: var(--sky);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.mtx-users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.admin-modal[hidden] {
    display: none !important;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(2px);
}

.admin-modal-panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 560px);
    max-height: min(85vh, 640px);
    overflow: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.admin-modal-panel h3 {
    margin: 0 32px 16px 0;
    font-size: 1.1rem;
}

.admin-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.admin-modal-close:hover {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text);
}

.admin-modal-body {
    margin-bottom: 16px;
}

.admin-modal-foot {
    margin: 0;
    text-align: right;
}

.mtx-perms-modal-table {
    width: 100%;
    font-size: 0.85rem;
}

.mtx-perms-modal-table code {
    word-break: break-all;
}

body.admin-modal-open {
    overflow: hidden;
}

.admin-modal-panel--atak-qr {
    width: min(96vw, 820px);
    max-height: min(92vh, 900px);
    overflow-y: auto;
}

.atak-qr-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 12px;
    padding: 4px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.atak-qr-tab {
    flex: 1 1 auto;
    min-width: 7rem;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    color: #94a3b8;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.atak-qr-tab:hover {
    color: var(--text);
    background: rgba(51, 65, 85, 0.4);
}

.atak-qr-tab.is-active {
    color: #e0f2fe;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.45);
    font-weight: 600;
}

.atak-qr-panels {
    position: relative;
    min-height: 320px;
}

.atak-qr-panel {
    display: none;
    text-align: center;
}

.atak-qr-panel.is-active {
    display: block !important;
}

.atak-qr-panel[hidden] {
    display: none !important;
}

.atak-qr-msg {
    margin: 12px 0 0;
    font-size: 0.88rem;
    text-align: center;
}

.atak-qr-hint {
    margin: 10px 0 0;
    font-size: 0.8rem;
}

.atak-qr-visual {
    flex: 0 0 auto;
    text-align: center;
}

.atak-qr-visual canvas {
    display: block;
    width: min(100%, 300px);
    height: auto;
    max-width: 300px;
    aspect-ratio: 1;
    border-radius: 10px;
    background: #fff;
}

.atak-qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 12px 0 0;
}

.atak-qr-meta {
    flex: 1 1 220px;
    min-width: 200px;
}

.atak-qr-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.atak-qr-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.12);
    font-size: 0.82rem;
    color: var(--muted);
}

.atak-qr-chip code {
    color: var(--text);
}

.admin-modal-panel--atak-cred {
    width: min(92vw, 520px);
}

.atak-cred-fields {
    margin: 0;
}

.atak-cred-row {
    margin-bottom: 14px;
}

.atak-cred-row dt {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.atak-cred-row dd {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.atak-cred-value {
    flex: 1 1 200px;
    display: block;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 6px;
    font-size: 0.85rem;
    word-break: break-all;
}

.atak-cred-value--secret {
    letter-spacing: 0.15em;
}

.atak-cred-password-wrap {
    flex-wrap: wrap;
}

.atak-cred-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.atak-cred-bulk-actions .btn {
    flex: 1 1 auto;
    min-width: min(100%, 10rem);
}

.admin-modal-panel--atak-details {
    width: min(92vw, 560px);
}

.atak-details-login {
    margin: 0 0 16px;
    font-size: 1.05rem;
}

.atak-details-fields {
    margin: 0;
}

.atak-details-row {
    margin-bottom: 14px;
}

.atak-details-row dt {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.atak-details-row dd {
    margin: 0;
    font-size: 0.9rem;
}

.atak-details-muted {
    color: #64748b;
}

.atak-details-ok {
    color: #4ade80;
}

.atak-details-fp {
    font-size: 0.75rem;
    word-break: break-all;
}

.atak-details-groups {
    margin: 0;
    padding-left: 1.2rem;
    list-style: disc;
}

.atak-details-groups li {
    margin-bottom: 4px;
}

.atak-profile-user {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--text);
}

.atak-profile-select {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.9rem;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    margin-bottom: 12px;
}

.atak-profile-msg,
.atak-profiles-msg {
    font-size: 0.85rem;
    min-height: 1.2em;
    margin: 8px 0 0;
}

.atak-profile-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.atak-profiles-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.atak-profile-upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.atak-user-profile-badge {
    display: inline-block;
    margin-top: 4px;
    margin-right: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
    background: #1e3a5f;
    color: #7dd3fc;
}

.atak-user-portal-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
    background: #1a3329;
    color: #86efac;
}

.admin-modal-panel--atak-profile {
    width: min(92vw, 520px);
}

/* ATAK — lista użytkowników (mobile) */
.atak-users-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
}

.atak-users-table .atak-users-col-info,
.atak-users-table .atak-users-col-actions {
    text-align: center;
}

.atak-users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.atak-users-btn {
    padding: 4px 10px !important;
    font-size: 0.78rem !important;
    min-width: 2.25rem;
}

.atak-user-login {
    word-break: break-all;
}

.atak-users-muted {
    color: #64748b;
}

@media (max-width: 720px) {
    #atak-tab-root .atak-users-table thead {
        display: none;
    }

    #atak-tab-root .atak-users-table tbody tr {
        display: block;
        margin-bottom: 14px;
        padding: 12px 14px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.45);
    }

    #atak-tab-root .atak-users-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 0;
        border: none;
        text-align: left !important;
    }

    #atak-tab-root .atak-users-table td:not(:last-child) {
        border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    }

    #atak-tab-root .atak-users-table td::before {
        content: attr(data-label);
        flex: 0 0 4.5rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    #atak-tab-root .atak-users-table td[data-label="Login"] {
        flex-direction: column;
        align-items: stretch;
    }

    #atak-tab-root .atak-users-table td[data-label="Login"]::before {
        flex: none;
        margin-bottom: 4px;
    }

    #atak-tab-root .atak-users-table td[data-label="ATAK"]::before {
        align-self: flex-start;
        padding-top: 4px;
    }

    #atak-tab-root .atak-users-actions {
        justify-content: flex-start;
        flex: 1;
    }

    #atak-tab-root h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 400px) {
    #atak-tab-root .atak-users-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }
}

.user-email-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    margin: 0;
    border: 1px solid #475569;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.6);
    font: inherit;
    color: var(--link);
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.user-email-link__at {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.user-email-link:hover {
    color: var(--link-hover);
    border-color: var(--link-hover);
    background: rgba(56, 189, 248, 0.12);
}

.user-email-link:focus-visible {
    outline: 2px solid var(--link-hover);
    outline-offset: 2px;
}

#user-mail-form textarea {
    width: 100%;
    max-width: none;
    min-height: 140px;
    resize: vertical;
}

.admin-page textarea {
    width: 100%;
    max-width: 640px;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 8px 10px;
}

footer {
    text-align: center;
    padding: 12px;
    font-size: 0.7rem;
    color: #64748b;
    border-top: 1px solid var(--border);
}

/* PWA — baner instalacji (Android / Chrome) */
.pwa-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 400;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92) 24%);
    pointer-events: none;
}

.pwa-install-banner[hidden] {
    display: none !important;
}

.pwa-install-banner__inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.pwa-install-banner__icon {
    flex-shrink: 0;
    border-radius: 10px;
}

.pwa-install-banner__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.82rem;
    color: var(--muted);
}

.pwa-install-banner__text strong {
    color: var(--text);
    font-size: 0.92rem;
}

.pwa-install-banner__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pwa-install-banner__actions .btn-sky {
    padding: 8px 14px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.pwa-install-dismiss {
    padding: 6px 10px !important;
    min-width: 36px;
    font-size: 1.1rem;
    line-height: 1;
}

/* Linki Video — token www przy strumieniu */
.page-bsp-video .copy-block-actions {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.page-bsp-video .bsp-webrtc-token-reset-inline {
    display: inline;
    margin: 0;
}

.page-bsp-video .btn-token-reset {
    padding: 6px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.page-bsp-video .bsp-webrtc-token-meta {
    margin: 0;
    padding: 0 4px;
    font-size: 0.78rem;
    line-height: 1.2;
    color: var(--muted);
    white-space: nowrap;
}

.page-bsp-video .bsp-webrtc-token-meta strong {
    color: var(--text);
    font-weight: 600;
}

/* Linki Video — toast na środku ekranu */
.bsp-video-toast-stack {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}

.bsp-video-toast {
    pointer-events: auto;
    margin: 0;
    max-width: min(92vw, 480px);
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: bsp-video-toast-in 0.28s ease-out;
}

.bsp-video-toast.is-hiding {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

@keyframes bsp-video-toast-in {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ATAK — podgląd ścieżek GPS (TAK Server / Traccar) */
.atak-paths-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.atak-paths-filter,
.atak-paths-basemap-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.atak-paths-filter select,
.atak-paths-basemap-label select {
    min-width: 160px;
}

.atak-paths-filter input[type="datetime-local"] {
    min-width: 190px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.85);
    color: #e2e8f0;
    font-size: 0.85rem;
}

.atak-paths-filter input[type="search"] {
    min-width: 180px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.85);
    color: #e2e8f0;
    font-size: 0.85rem;
}

.atak-paths-filter input[type="search"]::placeholder {
    color: #64748b;
}

.atak-paths-filter input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0.85);
    cursor: pointer;
}

.atak-paths-status {
    font-size: 0.82rem;
    color: #94a3b8;
}

.atak-paths-status.is-ok {
    color: #86efac;
}

.atak-paths-status.is-error {
    color: #fca5a5;
}

.atak-paths-layout {
    display: block;
}

.atak-paths-list-wrap--full {
    max-height: none;
    width: 100%;
}

.atak-paths-list-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.atak-paths-table thead th {
    vertical-align: middle;
}

.atak-paths-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.atak-paths-sort:hover {
    color: #38bdf8;
}

.atak-paths-sort.is-active {
    color: #7dd3fc;
}

.atak-paths-sort-indicator {
    font-size: 0.65rem;
    line-height: 1;
    opacity: 0.9;
}

.atak-paths-col-star .atak-paths-sort {
    width: 100%;
    justify-content: center;
}

.atak-paths-col-check {
    width: 36px;
    text-align: center;
}

.atak-paths-col-check input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.atak-paths-table tbody tr.atak-paths-row:hover {
    background: rgba(56, 189, 248, 0.05);
}

.atak-paths-row.is-map-selected {
    background: rgba(56, 189, 248, 0.06);
    box-shadow: inset 3px 0 0 #38bdf8;
}

.atak-paths-row.is-map-selected.is-starred {
    box-shadow: inset 3px 0 0 #fbbf24;
}

.atak-paths-empty {
    color: #94a3b8;
    text-align: center;
    padding: 18px 12px;
}

.atak-paths-empty.is-error {
    color: #fca5a5;
}

.atak-paths-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.atak-paths-badge--takserver {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.atak-paths-badge--traccar {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.atak-paths-badge--portal_mobile {
    background: rgba(34, 211, 238, 0.15);
    color: #67e8f9;
}

.atak-paths-badge--portal {
    background: rgba(167, 139, 250, 0.15);
    color: #c4b5fd;
}

.atak-paths-owner {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

.atak-paths-uid {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}

.atak-paths-map-panel {
    display: none;
}

.atak-paths-map-head {
    position: relative;
    z-index: 8000;
    flex-shrink: 0;
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.95);
    justify-content: space-between;
}

.atak-paths-map-head-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-width: 0;
    flex: 1 1 auto;
}

.atak-paths-map-head-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    position: relative;
}

.atak-paths-weather-alert {
    position: relative;
    z-index: 8001;
    overflow: visible;
}

.atak-paths-map-alert-triggers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* display:inline-flex na przyciskach nadpisywał domyślne [hidden]{display:none} */
.atak-paths-weather-alert-btn[hidden],
.atak-paths-bsp-kp-alert-btn[hidden] {
    display: none !important;
    pointer-events: none;
}

.atak-paths-weather-alert-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(250, 204, 21, 0.45);
    border-radius: 8px;
    background: rgba(234, 179, 8, 0.16);
    color: #fde047;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.atak-paths-weather-alert-btn:hover,
.atak-paths-weather-alert-btn:focus-visible,
.atak-paths-weather-alert-btn.is-active {
    border-color: rgba(250, 204, 21, 0.85);
    background: rgba(234, 179, 8, 0.28);
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.18);
    color: #fef08a;
}

.atak-paths-weather-alert-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.atak-paths-weather-alert-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.atak-paths-weather-alert-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9200;
    width: min(360px, calc(100vw - 24px));
    max-height: min(60vh, 420px);
    overflow: auto;
    border: 1px solid rgba(250, 204, 21, 0.35);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.atak-paths-weather-alert-panel[hidden] {
    display: none !important;
}

.atak-paths-weather-alert-panel.is-kp-view {
    border-color: rgba(167, 139, 250, 0.35);
}

.atak-paths-weather-alert-panel.is-kp-view.is-kp-high {
    border-color: rgba(248, 113, 113, 0.45);
}

.atak-paths-weather-alert-panel.is-kp-view .atak-paths-weather-alert-panel-head {
    color: #ddd6fe;
    border-bottom-color: rgba(167, 139, 250, 0.22);
}

.atak-paths-weather-alert-panel.is-kp-view.is-kp-high .atak-paths-weather-alert-panel-head {
    color: #fecaca;
    border-bottom-color: rgba(248, 113, 113, 0.28);
}

.atak-paths-weather-alert-panel.is-kp-forecast-view {
    max-height: none;
    overflow: visible;
}

.atak-paths-weather-alert-panel.is-kp-forecast-view .atak-paths-weather-alert-body {
    max-height: none;
    overflow: visible;
}

.atak-paths-weather-alert-panel.is-temp-forecast-view {
    max-height: none;
    overflow: visible;
    border-color: rgba(251, 146, 60, 0.35);
}

.atak-paths-weather-alert-panel.is-temp-forecast-view .atak-paths-weather-alert-panel-head {
    color: #fed7aa;
    border-bottom-color: rgba(251, 146, 60, 0.22);
}

.atak-paths-weather-alert-panel.is-temp-forecast-view .atak-paths-weather-alert-body {
    max-height: none;
    overflow: visible;
}

.atak-paths-bsp-temp-forecast-layer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.atak-paths-bsp-temp-forecast__chart-caption {
    margin: 0 0 8px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-paths-bsp-temp-chart-svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 12px;
}

.atak-paths-weather-alert-panel.is-temp-forecast-view .atak-paths-bsp-temp-chart-svg {
    max-width: 100%;
}

.atak-paths-weather-alert-panel.is-precip-forecast-view {
    max-height: none;
    overflow: visible;
    border-color: rgba(56, 189, 248, 0.35);
}

.atak-paths-weather-alert-panel.is-precip-forecast-view .atak-paths-weather-alert-panel-head {
    color: #bae6fd;
    border-bottom-color: rgba(56, 189, 248, 0.22);
}

.atak-paths-weather-alert-panel.is-precip-forecast-view .atak-paths-weather-alert-body {
    max-height: none;
    overflow: visible;
}

.atak-paths-bsp-precip-forecast-layer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.atak-paths-bsp-precip-forecast__chart-caption {
    margin: 0 0 8px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-paths-bsp-precip-chart-svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 12px;
}

.atak-paths-weather-alert-panel.is-precip-forecast-view .atak-paths-bsp-precip-chart-svg {
    max-width: 100%;
}

.atak-paths-bsp-precip-forecast-detail.is-warn .atak-paths-bsp-tile-detail__value {
    color: #fca5a5;
}

.atak-paths-bsp-precip-forecast-detail.is-caution .atak-paths-bsp-tile-detail__value {
    color: #fdba74;
}

.atak-paths-bsp-precip-forecast-detail.is-ok .atak-paths-bsp-tile-detail__value {
    color: #7dd3fc;
}

.atak-paths-bsp-kp-forecast-layer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.atak-paths-bsp-kp-forecast__chart-caption {
    margin: 0 0 8px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-paths-bsp-kp-chart-svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 12px;
}

.atak-paths-weather-alert-panel.is-kp-forecast-view .atak-paths-bsp-kp-chart-svg {
    max-width: 100%;
}

.atak-paths-weather-alert-panel.is-bsp-detail-view .atak-paths-weather-alert-location {
    display: none;
}

.atak-paths-bsp-tile-detail__meta {
    margin: 0 0 10px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.atak-paths-bsp-overlay-section__heading,
.atak-paths-bsp-kp-forecast-detail__heading {
    margin: 12px 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.atak-paths-weather-alert-panel.is-wind-profile-view {
    width: min(420px, calc(100vw - 24px));
    max-height: none;
    overflow: visible;
    border-color: rgba(56, 189, 248, 0.35);
}

.atak-paths-weather-alert-panel.is-wind-profile-view .atak-paths-weather-alert-panel-head {
    color: #bae6fd;
    border-bottom-color: rgba(56, 189, 248, 0.22);
}

.atak-paths-weather-alert-panel.is-wind-profile-view .atak-paths-weather-alert-body {
    max-height: none;
    overflow: visible;
}

.atak-paths-bsp-wind-profile-layer {
    margin-top: 0;
}

.atak-paths-bsp-wind-profile-detail.is-warn .atak-paths-bsp-tile-detail__value {
    color: #fca5a5;
}

.atak-paths-bsp-wind-profile-detail.is-caution .atak-paths-bsp-tile-detail__value {
    color: #fcd34d;
}

.atak-paths-bsp-wind-profile-detail.is-ok .atak-paths-bsp-tile-detail__value {
    color: #86efac;
}

.atak-paths-weather-alert-panel.is-wind-profile-view .atak-paths-bsp-wind-chart-svg {
    max-width: 100%;
}

.atak-paths-bsp-wind-overlay-tabs {
    margin-top: 4px;
}

.atak-paths-bsp-overlay-tabs__nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.atak-paths-bsp-overlay-tabs__btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.atak-paths-bsp-overlay-tabs__btn:hover {
    color: #e2e8f0;
    border-color: rgba(56, 189, 248, 0.35);
}

.atak-paths-bsp-overlay-tabs__btn.is-active {
    color: #e2e8f0;
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: inset 0 -2px 0 #38bdf8;
}

.atak-paths-bsp-overlay-tabs__panel[hidden] {
    display: none !important;
}

.atak-paths-bsp-wind-hourly-forecast-layer {
    margin-bottom: 12px;
}

.atak-paths-bsp-wind-forecast__chart-caption {
    margin: 0 0 8px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-paths-bsp-wind-hourly-chart-svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 12px;
}

.atak-paths-weather-alert-panel.is-wind-profile-view .atak-paths-bsp-wind-hourly-chart-svg {
    max-width: 100%;
}

.atak-paths-bsp-wind-hourly-table th:first-child,
.atak-paths-bsp-wind-hourly-table td:first-child {
    white-space: nowrap;
}

.atak-paths-bsp-kp-forecast-detail.is-warn .atak-paths-bsp-tile-detail__value {
    color: #fca5a5;
}

.atak-paths-bsp-kp-forecast-detail.is-caution .atak-paths-bsp-tile-detail__value {
    color: #fcd34d;
}

.atak-paths-bsp-kp-forecast-detail.is-ok .atak-paths-bsp-tile-detail__value {
    color: #86efac;
}

.atak-paths-weather-alert-panel.is-kp-view.is-kp-high .atak-paths-bsp-kp-alert-value {
    color: #fca5a5;
}

.atak-paths-weather-alert-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    color: #fde68a;
    font-size: 0.82rem;
}

.atak-paths-weather-alert-close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.atak-paths-weather-alert-close:hover,
.atak-paths-weather-alert-close:focus-visible {
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
    outline: none;
}

.atak-paths-weather-alert-location {
    margin: 0;
    padding: 8px 12px 0;
    font-size: 0.74rem;
    color: #94a3b8;
}

.atak-paths-weather-alert-body {
    padding: 8px 12px 12px;
}

.atak-paths-weather-alert-item {
    padding: 8px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.atak-paths-weather-alert-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.atak-paths-weather-alert-item__title {
    margin: 0 0 4px;
    font-size: 0.82rem;
    color: #fde68a;
}

.atak-paths-weather-alert-item__text,
.atak-paths-weather-alert-item__office,
.atak-paths-weather-alert-valid {
    margin: 0 0 4px;
    font-size: 0.76rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.atak-paths-weather-alert-valid {
    color: #94a3b8;
    font-size: 0.7rem;
}

.atak-paths-weather-alert.is-national-scope .atak-paths-weather-alert-btn {
    border-color: rgba(251, 146, 60, 0.55);
    background: rgba(234, 88, 12, 0.18);
    color: #fdba74;
}

.atak-paths-map-head-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.atak-paths-map-head-tool-btn[hidden] {
    display: none !important;
    pointer-events: none;
}

.atak-paths-map-head-tool-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.atak-paths-map-search-toggle:hover,
.atak-paths-map-search-toggle:focus-visible,
.atak-paths-map-search-toggle.is-active {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.12);
    color: #e0f2fe;
    outline: none;
}

.atak-paths-map-layer-close {
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.atak-paths-map-layer-close:hover,
.atak-paths-map-layer-close:focus-visible {
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
    outline: none;
}

.atak-paths-map-layer-close .atak-paths-map-head-tool-icon {
    width: 20px;
    height: 20px;
}

.atak-paths-map-search-panel {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 72px;
    z-index: 6500;
    max-width: min(520px, calc(100% - 84px));
    padding: 10px 12px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.atak-paths-map-search-panel[hidden] {
    display: none !important;
}

.atak-paths-map-search-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.atak-paths-map-search-field {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.atak-paths-map-search-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

.atak-paths-map-search-field input {
    width: 100%;
    margin: 0;
}

.atak-paths-map-search-submit {
    flex: 0 0 auto;
    min-width: 42px;
    min-height: 38px;
    padding: 0 10px;
}

.atak-paths-map-search-panel .atak-paths-map-search-scope {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 6px 0 0;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.35;
    color: #cbd5e1;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    user-select: none;
}

.atak-paths-map-search-panel .atak-paths-map-search-scope input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    flex: 0 0 16px;
    accent-color: #38bdf8;
    cursor: pointer;
}

.atak-paths-map-search-panel .atak-paths-map-search-scope > span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
}

.atak-paths-map-search-status {
    margin: 8px 0 0;
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
}

.atak-paths-map-search-status.is-ok {
    color: #86efac;
}

.atak-paths-map-search-status.is-error {
    color: #fca5a5;
}

.atak-paths-map-search-results {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: min(36vh, 280px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.35);
}

.atak-paths-map-search-results:empty {
    display: none;
}

.atak-paths-map-search-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: transparent;
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    line-height: 1.35;
    cursor: pointer;
}

.atak-paths-map-search-item__title {
    display: block;
}

.atak-paths-map-search-item__meta {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 500;
}

.atak-map-search-pin {
    background: transparent;
    border: none;
    cursor: pointer;
}

.atak-paths-map .atak-map-search-pin.leaflet-interactive {
    cursor: pointer;
}

.atak-map-search-pin__dot {
    width: 14px;
    height: 14px;
    margin: 0 auto;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.atak-paths-map-search-item:hover,
.atak-paths-map-search-item:focus-visible {
    background: rgba(56, 189, 248, 0.1);
    color: #f0f9ff;
}

.atak-paths-map-search-results li:last-child .atak-paths-map-search-item {
    border-bottom: none;
}

.atak-paths-map-search-empty {
    padding: 12px;
    color: #94a3b8;
    font-size: 0.8rem;
}

.atak-paths-mileposts-intro {
    margin: 0 0 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #94a3b8;
}

.atak-paths-mileposts-stats {
    margin: 0 0 12px;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.atak-paths-mileposts-counties {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.atak-paths-mileposts-county {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.atak-paths-mileposts-county__name {
    flex: 1 1 140px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
    text-transform: capitalize;
}

.atak-paths-mileposts-county__meta {
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-paths-mileposts-county__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.atak-paths-mileposts-status {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.atak-paths-mileposts-status.is-ok {
    color: #86efac;
}

.atak-paths-mileposts-status.is-error {
    color: #fca5a5;
}

.atak-paths-admin-boundaries-intro {
    margin: 0 0 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #94a3b8;
}

.atak-paths-admin-boundaries-stats {
    margin: 0 0 12px;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.atak-paths-admin-boundaries-regions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.atak-paths-admin-boundaries-region {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.atak-paths-admin-boundaries-region__name {
    flex: 1 1 140px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
    text-transform: capitalize;
}

.atak-paths-admin-boundaries-region__meta {
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-paths-admin-boundaries-region__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.atak-paths-admin-boundaries-status {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.atak-paths-admin-boundaries-status.is-ok {
    color: #86efac;
}

.atak-paths-admin-boundaries-status.is-error {
    color: #fca5a5;
}

.atak-admin-boundary-label-icon {
    background: transparent !important;
    border: 0 !important;
}

.atak-admin-boundary-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    pointer-events: none;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.95),
        0 0 8px rgba(255, 255, 255, 0.75),
        1px 1px 0 rgba(255, 255, 255, 0.5);
}

.atak-admin-boundary-label--voivodeship {
    color: #6d28d9;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.atak-admin-boundary-label--county {
    color: #800020;
    font-size: 13px;
}

.atak-admin-boundary-label--commune {
    color: #0e7490;
    font-size: 13px;
    font-weight: 700;
}

.atak-admin-boundary-label--stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.atak-admin-boundary-label__line {
    white-space: nowrap;
}

.atak-admin-boundary-label__line--commune {
    color: #0e7490;
    font-size: 13px;
    font-weight: 800;
}

.atak-admin-boundary-label__line--county {
    color: #800020;
    font-size: 12px;
    font-weight: 700;
}

.atak-admin-boundary-label__line--voivodeship {
    color: #6d28d9;
    font-size: 9px;
    font-weight: 700;
}

body.atak-operational-map-standalone #atak-paths-map-modal.atak-paths-map-modal--standalone {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}

.atak-paths-map-modal--standalone {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: flex !important;
    padding: 0;
}

.atak-paths-map-modal--standalone .admin-modal-backdrop {
    display: none;
}

body.atak-operational-map-standalone .atak-paths-map-modal--standalone .atak-paths-map-modal-panel,
.atak-paths-map-modal--standalone .atak-paths-map-modal-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    margin: 0;
}

body.atak-operational-map-standalone .atak-paths-map-modal--standalone .atak-paths-map-modal-panel.is-fullscreen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

.atak-paths-map-modal--standalone .atak-paths-map-body {
    flex: 1 1 auto;
    min-height: 0;
}

.atak-paths-map-modal--standalone .atak-paths-map-stage {
    flex: 1 1 auto;
    min-height: 0;
}

.atak-paths-map-modal--standalone .atak-paths-map {
    flex: 1 1 auto;
    height: 100% !important;
    min-height: 240px;
}

body.atak-operational-map-standalone {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: #0b1220;
}

body.atak-operational-map-standalone .atak-paths-config-root {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.atak-paths-map-init-error {
    margin: 0;
    padding: 24px;
    color: #fca5a5;
    text-align: center;
    font-size: 0.95rem;
}

.atak-paths-map-loading {
    margin: 0;
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
}

.atak-paths-map .leaflet-container ~ .atak-paths-map-loading,
.atak-paths-map:has(.leaflet-container) .atak-paths-map-loading {
    display: none;
}

body.atak-public-map-active,
body.atak-operational-map-active {
    overflow: hidden;
}

body.atak-operational-map-active:not(.atak-operational-map-standalone) .main-header,
body.atak-operational-map-active:not(.atak-operational-map-standalone) footer {
    display: none;
}

body.atak-operational-map-active:not(.atak-operational-map-standalone) main.page-content.atak-operational-map-page {
    padding: 0;
    margin: 0;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
}

body.atak-public-map-active #atak-paths-wp-color-palette-wrap {
    display: none !important;
}

body.atak-public-map-active .atak-paths-wp-icon-picker-group[data-wp-icon-group-id]:not([data-wp-icon-group-id="shapes"]) {
    display: none !important;
}

body.atak-public-map-active #atak-paths-wp-color-field {
    display: block !important;
}

body.atak-public-map-active .main-guest.page-content {
    padding: 0;
    max-width: none;
}

.atak-map-profile-hidden {
    display: none !important;
}

.leaflet-marker-icon.atak-map-region-label-hoverable {
    cursor: pointer;
}

.leaflet-marker-icon.atak-map-region-label-hoverable .atak-map-region-label-hit {
    pointer-events: auto;
    cursor: pointer;
}

.atak-admin-boundary-county-label-icon,
.atak-admin-boundary-commune-label-icon {
    background: transparent !important;
    border: 0 !important;
}

.atak-admin-boundary-county-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: 240px;
    white-space: normal;
    color: #800020;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.15;
    text-align: center;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.95),
        0 1px 2px rgba(15, 23, 42, 0.35);
}

.atak-admin-boundary-commune-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: 240px;
    white-space: normal;
    color: #0e7490;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.15;
    text-align: center;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.95),
        0 1px 2px rgba(15, 23, 42, 0.35);
}

.leaflet-pane path.leaflet-interactive.atak-admin-boundary-poly {
    pointer-events: none !important;
}

.atak-milepost-divicon {
    background: transparent !important;
    border: none !important;
}

.atak-milepost-marker {
    position: relative;
    width: 0;
    height: 0;
    overflow: visible;
}

.atak-milepost-marker__dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-top: -5px;
    border-radius: 50%;
    background: #f59e0b;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.atak-milepost-marker__label {
    position: absolute;
    left: 6px;
    bottom: 6px;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    color: #000;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    pointer-events: none;
}

.atak-milepost-marker.is-highlight .atak-milepost-marker__dot {
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    background: #fde047;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.45);
}

.atak-milepost-marker.is-highlight .atak-milepost-marker__label {
    font-weight: 700;
}

.atak-paths-panel-toggle:hover,
.atak-paths-panel-toggle:focus-visible {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(15, 23, 42, 0.88);
    color: #f8fafc;
    outline: none;
}

.atak-paths-panel-toggle.is-active {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
}

.atak-paths-map-body.is-panel-collapsed .atak-paths-objects-panel,
.atak-paths-map-body.is-panel-collapsed .atak-paths-panel-resizer {
    display: none !important;
}

.atak-paths-map {
    height: 460px;
    width: 100%;
    background: #0b1220;
}

@media (max-width: 960px) {
    .atak-paths-map-modal-panel .atak-paths-map {
        height: min(60vh, 480px);
    }
}

.atak-paths-col-star {
    width: 36px;
    text-align: center;
}

.atak-paths-star-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}

.atak-paths-star-btn.is-on,
.atak-paths-row.is-starred .atak-paths-star-btn {
    color: #fbbf24;
}

.atak-paths-row.is-starred {
    background: rgba(251, 191, 36, 0.07);
    box-shadow: inset 3px 0 0 #fbbf24;
}

.atak-paths-row.is-starred.is-active {
    background: rgba(251, 191, 36, 0.12);
}

.atak-paths-comment-preview {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.atak-paths-actions {
    white-space: nowrap;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.atak-paths-export-wrap {
    position: relative;
    display: inline-block;
}

.atak-paths-export-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    min-width: 88px;
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.atak-paths-export-menu a {
    display: block;
    padding: 8px 12px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.82rem;
}

.atak-paths-export-menu a:hover {
    background: rgba(56, 189, 248, 0.12);
}

.atak-paths-delete-btn {
    color: #fca5a5 !important;
    border-color: #7f1d1d !important;
}

.atak-paths-map-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.atak-paths-live-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
}

.atak-paths-live-toggle input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.atak-paths-live-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: atak-paths-live-pulse 1.6s ease-out infinite;
}

@keyframes atak-paths-live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.atak-paths-live-marker {
    background: transparent;
    border: none;
}

.atak-waypoint-marker-icon.atak-paths-live-marker-dot {
    font-size: 0;
    line-height: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: color-mix(in srgb, var(--wp-color, #38bdf8) 88%, #0b1220);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.atak-paths-live-marker--online .atak-waypoint-marker-icon.atak-paths-live-marker-dot {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--wp-color, #22c55e) 35%, transparent);
}

.atak-paths-live-marker--offline .atak-waypoint-marker-icon.atak-paths-live-marker-dot {
    opacity: 0.72;
}

.atak-paths-live-marker--portal .atak-waypoint-marker-icon.atak-paths-live-marker-dot {
    border-color: rgba(255, 255, 255, 0.85);
}

.atak-paths-live-marker--public .atak-waypoint-marker-icon.atak-paths-live-marker-dot {
    border-color: rgba(255, 255, 255, 0.9);
}

.atak-paths-live-marker--traccar .atak-waypoint-marker-icon.atak-paths-live-marker-dot {
    border-color: rgba(255, 255, 255, 0.95);
}

.atak-paths-live-marker--tak .atak-waypoint-marker-icon.atak-paths-live-marker-dot {
    border-color: rgba(255, 255, 255, 0.85);
}

.atak-paths-map-locate-marker {
    background: transparent !important;
    border: none !important;
}

.atak-paths-map-locate-marker__scope {
    /* kółko D + po 3×D lini celownika na każdą stronę → łączna rozpiętość 7×D */
    --locate-d: 14px;
    --locate-span: calc(var(--locate-d) * 7);
    position: relative;
    width: var(--locate-span);
    height: var(--locate-span);
    pointer-events: none;
}

.atak-paths-map-locate-marker__ring {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: var(--locate-d);
    height: var(--locate-d);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid #34d399;
    background: rgba(52, 211, 153, 0.18);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.65);
    box-sizing: border-box;
}

.atak-paths-map-locate-marker__hair {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    background: rgba(248, 250, 252, 0.95);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.atak-paths-map-locate-marker__hair--v {
    width: 0.5px;
    height: var(--locate-span);
    box-shadow: 0.5px 0 0 rgba(15, 23, 42, 0.45), -0.5px 0 0 rgba(15, 23, 42, 0.45);
}

.atak-paths-map-locate-marker__hair--h {
    width: var(--locate-span);
    height: 0.5px;
    box-shadow: 0 0.5px 0 rgba(15, 23, 42, 0.45), 0 -0.5px 0 rgba(15, 23, 42, 0.45);
}

.atak-paths-fullscreen-btn {
    padding: 6px 10px !important;
    font-size: 1rem !important;
    line-height: 1;
}

.atak-paths-map-modal .admin-modal-backdrop {
    background: rgba(2, 6, 23, 0.82);
}

.atak-paths-map-modal:not([hidden]) {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    z-index: 6000;
}

.atak-paths-map-modal-panel {
    width: min(96vw, 1200px);
    max-width: none;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: visible;
}

.atak-paths-map-modal-panel .admin-modal-close {
    z-index: 5;
}

.atak-paths-map-modal-panel.is-fullscreen {
    position: absolute;
    top: env(safe-area-inset-top, 0px);
    right: env(safe-area-inset-right, 0px);
    bottom: var(--atak-mobile-safe-bottom, env(safe-area-inset-bottom, 0px));
    left: env(safe-area-inset-left, 0px);
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: 0;
    z-index: 1;
    box-sizing: border-box;
}

.atak-paths-map-legend {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.atak-paths-map-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.atak-paths-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.atak-paths-map .leaflet-control-scale {
    margin: 0 0 14px 14px !important;
}

.atak-paths-map .atak-map-scale-zoom-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.atak-paths-map .atak-map-zoom-label {
    padding: 0 2px;
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(0, 0, 0, 0.65);
}

.atak-paths-map .leaflet-control-scale-line {
    border: 2px solid rgba(226, 232, 240, 0.92);
    border-top: none;
    background: rgba(15, 23, 42, 0.88);
    padding: 2px 6px 1px;
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.atak-paths-map-modal-panel .atak-paths-map-head {
    padding: 12px 44px 10px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.98);
}

.atak-paths-map-brand {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
    text-decoration: none;
}

.atak-paths-measure-cursor-label {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 650;
    pointer-events: none;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #000;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 0 3px #fff;
}

.atak-paths-measure-cursor-label[hidden] {
    display: none !important;
}

.atak-paths-measure-toolbar[hidden] {
    display: none !important;
}

.atak-paths-measure-toolbar {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
    font-size: 0.82rem;
    color: #fde68a;
    max-width: min(100%, 520px);
}

.atak-paths-measure-summary {
    flex: 1 1 100%;
    max-height: 140px;
    overflow: auto;
    font-size: 0.75rem;
    color: #fef3c7;
}

.atak-paths-measure-summary[hidden] {
    display: none !important;
}

.atak-measure-segments-table {
    width: 100%;
    border-collapse: collapse;
}

.atak-measure-segments-table th,
.atak-measure-segments-table td {
    padding: 2px 6px;
    text-align: left;
    border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.atak-measure-segments-table tfoot td {
    border-bottom: none;
    padding-top: 4px;
}

.atak-measure-segment-label {
    background: transparent;
    border: none;
}

.atak-measure-segment-label span,
.atak-waypoint-marker-label,
.atak-sector-map-label strong,
.atak-sector-map-label small {
    color: #000;
    background: transparent !important;
    border: none !important;
    box-shadow: none;
    padding: 0;
    font-weight: 700;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 0 3px #fff;
}

.atak-measure-segment-label span {
    display: inline-block;
    font-size: 0.72rem;
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

.atak-measure-total-label span {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.78);
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
    text-shadow: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.atak-measure-area-label {
    background: transparent;
    border: none;
}

.atak-measure-area-label span {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.atak-measure-arrow-icon {
    background: transparent;
    border: none;
}

.atak-measure-arrow-glyph {
    display: block;
    color: #fbbf24;
    font-size: 14px;
    line-height: 1;
    text-shadow: 0 0 2px #0f172a, 0 0 4px #0f172a;
    transform-origin: center center;
}

.atak-measure-arrow-svg {
    display: block;
    width: 22px;
    height: 22px;
    transform-origin: center center;
}

.atak-measure-vertex-handle {
    background: transparent;
    border: none;
}

.atak-measure-vertex-handle__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fbbf24;
    border: 2px solid #0f172a;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.45);
    cursor: crosshair;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.atak-paths-map.is-object-move-mode
    .atak-measure-vertex-handle--map-endpoint:hover
    .atak-measure-vertex-handle__dot {
    transform: scale(1.38);
    border-color: #fef9c3;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.55);
    cursor: crosshair;
}

.atak-paths-map.is-measure-mode
    .atak-measure-vertex-handle:not(.atak-measure-vertex-handle--edge):hover
    .atak-measure-vertex-handle__dot {
    transform: scale(1.38);
    border-color: #fef9c3;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.55);
    cursor: grab;
}

.atak-measure-vertex-handle--edge .atak-measure-vertex-handle__dot {
    width: 10px;
    height: 10px;
    background: #fef3c7;
    cursor: crosshair;
}

.atak-paths-measure-style-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fde68a;
    font-size: 0.78rem;
}

.atak-paths-measure-style-field input[type="color"] {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 3px;
    border: 2px solid rgba(251, 191, 36, 0.45);
    border-radius: 8px;
    background: #1e293b;
    cursor: pointer;
}

.atak-paths-measure-style-field select {
    font-size: 0.78rem;
    padding: 2px 4px;
}

.atak-paths-objects-swatch--measure {
    font-size: 0.72rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.atak-paths-map,
.atak-paths-map.leaflet-container,
.atak-paths-map .leaflet-container,
.atak-paths-map-stage .atak-paths-map {
    cursor: crosshair;
}

.atak-paths-map .leaflet-grab,
.atak-paths-map.leaflet-grab {
    cursor: crosshair !important;
}

.atak-paths-map .leaflet-dragging .leaflet-grab,
.atak-paths-map.leaflet-dragging .leaflet-grab {
    cursor: grabbing !important;
}

.atak-paths-map.is-object-move-mode
    .leaflet-marker-draggable:not(:has(.atak-measure-vertex-handle--map-endpoint)):hover,
.atak-paths-map.is-object-move-mode .leaflet-interactive:hover,
.atak-paths-map.is-sector-draw-mode .atak-sector-vertex-handle:hover,
.atak-paths-map.is-line-draw-mode .atak-sector-vertex-handle:hover,
.atak-paths-map.is-measure-mode .atak-measure-vertex-handle:hover {
    cursor: var(--atak-cursor-target);
}

.atak-paths-map.is-object-move-mode
    .atak-measure-vertex-handle--map-endpoint.leaflet-dragging
    .atak-measure-vertex-handle__dot {
    transform: scale(1.38);
    cursor: crosshair;
}

.atak-paths-map.is-measure-mode
    .atak-measure-vertex-handle:not(.atak-measure-vertex-handle--edge).leaflet-dragging
    .atak-measure-vertex-handle__dot {
    transform: scale(1.38);
    cursor: grabbing;
}

.atak-paths-color-swatch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.atak-paths-color-swatch input[type="color"] {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    padding: 3px;
    border: 2px solid #475569;
    border-radius: 8px;
    background: #1e293b;
    cursor: pointer;
    flex-shrink: 0;
}

.atak-paths-color-swatch input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.atak-paths-color-swatch input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.atak-paths-color-swatch input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

#atak-paths-move-confirm-modal {
    z-index: 6600;
}

.admin-modal-panel--atak-move-confirm {
    max-width: 420px;
}

.atak-paths-move-confirm-text {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin: 0 0 16px;
    line-height: 1.45;
}

.atak-paths-map-body {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

.atak-paths-map-stage {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.atak-paths-map-crosshair {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 450;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.atak-paths-map-crosshair__svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.atak-paths-map-locate-status {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    z-index: 750;
    max-width: min(92%, 420px);
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.38);
    pointer-events: none;
}

.atak-paths-map-locate-status.is-ok {
    border-color: rgba(52, 211, 153, 0.45);
    color: #a7f3d0;
}

.atak-paths-map-locate-status.is-error {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

.atak-paths-map-locate-status[hidden] {
    display: none !important;
}

.atak-portal-gps-hint-wrap {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 760;
    pointer-events: auto;
    max-height: min(42vh, 320px);
    overflow: auto;
}

.atak-portal-gps-hint-wrap.atak-portal-gps-hint-wrap--page {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 9000;
    max-width: 520px;
    margin: 0 auto;
}

.atak-portal-gps-hint {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.4;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.atak-portal-gps-hint-title {
    margin: 0 0 6px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #fde68a;
}

.atak-portal-gps-hint-lead {
    margin: 0 0 8px;
    color: #cbd5e1;
}

.atak-portal-gps-hint-list {
    margin: 0 0 10px;
    padding-left: 1.15rem;
}

.atak-portal-gps-hint-list li {
    margin-bottom: 6px;
}

.atak-portal-gps-hint-list strong {
    color: #f8fafc;
}

.atak-portal-gps-hint-actions {
    display: flex;
    justify-content: flex-end;
}

.atak-paths-map-tools {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 750;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.atak-paths-map-mode-bars {
    position: absolute;
    left: 12px;
    right: 56px;
    bottom: 12px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.atak-paths-map-mode-bar {
    pointer-events: auto;
    max-width: min(100%, 920px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.atak-paths-map-mode-bar[hidden] {
    display: none !important;
}

.atak-paths-map-tool {
    position: relative;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
    opacity: 0.48;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.atak-paths-map-tool-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.atak-paths-map-tool:hover,
.atak-paths-map-tool:focus-visible {
    opacity: 1;
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
    outline: none;
}

.atak-paths-map-tool-tip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: opacity 0.15s ease;
}

.atak-paths-map-tool:hover .atak-paths-map-tool-tip,
.atak-paths-map-tool:focus-visible .atak-paths-map-tool-tip {
    opacity: 1;
}

.atak-paths-map-tool.is-active {
    opacity: 1;
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22), 0 4px 14px rgba(0, 0, 0, 0.35);
}

#atak-paths-wp-add-mode.is-active {
    border-color: rgba(56, 189, 248, 0.65);
    color: #7dd3fc;
}

#atak-paths-sector-draw-mode.is-active {
    border-color: rgba(167, 139, 250, 0.65);
    color: #c4b5fd;
}

#atak-paths-ellipse-draw-mode.is-active {
    border-color: rgba(167, 139, 250, 0.65);
    color: #c4b5fd;
}

#atak-paths-circle-draw-mode.is-active {
    border-color: rgba(56, 189, 248, 0.65);
    color: #7dd3fc;
}

#atak-paths-line-draw-mode.is-active {
    border-color: rgba(251, 191, 36, 0.65);
    color: #fde68a;
}

#atak-paths-measure-mode.is-active {
    border-color: rgba(251, 191, 36, 0.65);
    color: #fde68a;
}

#atak-paths-map-locate.is-active {
    border-color: rgba(52, 211, 153, 0.65);
    color: #6ee7b7;
}

#atak-paths-map-locate.is-error {
    border-color: rgba(248, 113, 113, 0.65);
    color: #fca5a5;
}

.atak-map-cluster-marker {
    background: transparent;
    border: none;
}

.atak-map-cluster-marker__bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.88);
    color: #0f172a;
    font-weight: 800;
    line-height: 1;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.atak-map-cluster-marker__bubble span {
    transform: translateY(0.5px);
}

.atak-paths-circle-cursor-label {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 650;
    pointer-events: none;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.55);
    color: #e0f2fe;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.atak-paths-circle-cursor-label[hidden] {
    display: none !important;
}

.atak-paths-circle-radius-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
    font-size: 0.78rem;
}

.atak-paths-circle-radius-field input {
    width: 88px;
    padding: 3px 6px;
    font-size: 0.82rem;
}

.atak-paths-circle-radius-field[hidden] {
    display: none !important;
}

.atak-paths-map-modal-panel .atak-paths-map {
    height: min(68vh, 720px);
    flex: 1 1 auto;
    border-radius: 0;
}

.atak-paths-map.is-waypoint-add-mode,
.atak-paths-map-stage .atak-paths-map.is-waypoint-add-mode,
.atak-paths-map.is-wind-pin-mode,
.atak-paths-map-stage .atak-paths-map.is-wind-pin-mode {
    cursor: crosshair;
}

.atak-wind-pin-icon {
    background: transparent !important;
    border: 0 !important;
}

.atak-wind-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    pointer-events: auto;
}

.atak-wind-pin__arrow {
    width: 108px;
    height: 61px;
    transform-origin: 50% 50%;
    line-height: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.atak-wind-pin__arrow-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.atak-wind-pin__caption {
    margin: 3px 0 0;
    padding: 0;
    background: none;
    border: 0;
    color: #000;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.leaflet-popup.atak-wind-pin-popup {
    margin-bottom: 6px;
}

.leaflet-popup.atak-wind-pin-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    color: #e2e8f0;
}

.leaflet-popup.atak-wind-pin-popup .leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: none;
}

.leaflet-popup.atak-wind-pin-popup .leaflet-popup-content {
    margin: 0;
    min-width: 168px;
    max-width: 240px;
}

.leaflet-popup.atak-wind-pin-popup .leaflet-popup-close-button {
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    font-size: 18px;
    line-height: 20px;
    color: #cbd5e1;
    text-align: center;
}

.leaflet-popup.atak-wind-pin-popup .leaflet-popup-close-button:hover {
    color: #fff;
    background: rgba(51, 65, 85, 0.65);
    border-radius: 4px;
}

.atak-wind-pin-tooltip {
    padding: 10px 12px 12px;
}

.atak-wind-pin-tooltip__title {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #bae6fd;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.atak-wind-pin-tooltip__rows {
    margin: 0 0 8px;
    display: grid;
    gap: 4px;
}

.atak-wind-pin-tooltip__rows > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.atak-wind-pin-tooltip__rows dt {
    margin: 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-wind-pin-tooltip__rows dd {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
    text-align: right;
}

.atak-wind-pin-tooltip__source,
.atak-wind-pin-tooltip__measured {
    margin: 0 0 8px;
    font-size: 0.68rem;
    line-height: 1.35;
    color: #94a3b8;
}

.atak-wind-pin-tooltip__remove {
    width: 100%;
    margin-top: 2px;
}

.atak-paths-map.is-draw-mode .atak-bdl-feature {
    pointer-events: none !important;
}

#atak-paths-waypoint-modal,
#atak-paths-sector-modal,
#atak-paths-measure-modal {
    z-index: 6500;
}

#atak-paths-wp-coord-qr-screen {
    z-index: 7000;
}

#atak-paths-wp-list-toggle.is-active {
    border-color: #38bdf8;
    color: #7dd3fc;
}

.atak-paths-map.is-circle-draw-mode,
.atak-paths-map-stage .atak-paths-map.is-circle-draw-mode {
    cursor: crosshair;
}

.atak-paths-map.is-object-move-mode .leaflet-marker-draggable.leaflet-dragging,
.atak-paths-map.is-object-move-mode .leaflet-interactive.leaflet-dragging {
    cursor: grabbing !important;
}

/* Bez prostokątnej obwódki fokusu przy przenoszeniu / klikaniu obiektów (Chrome SVG). */
.atak-paths-map.leaflet-container path.leaflet-interactive:focus:not(:focus-visible),
.atak-paths-map.is-sector-dragging path.leaflet-interactive,
.atak-paths-map.is-sector-dragging path.leaflet-interactive:focus {
    outline: 0 !important;
}

.atak-paths-map .leaflet-marker-draggable.leaflet-dragging .leaflet-marker-icon,
.atak-paths-map .leaflet-marker-draggable.leaflet-dragging.atak-waypoint-marker {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.atak-paths-map .leaflet-marker-draggable.leaflet-dragging .atak-waypoint-marker-label {
    visibility: hidden;
}

.atak-paths-draw-layer-warn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: #fde68a;
    font-size: 0.82rem;
    line-height: 1.4;
    width: 100%;
}

.atak-paths-draw-layer-warn p {
    margin: 0;
    flex: 1 1 180px;
}

.atak-paths-draw-layer-warn[hidden] {
    display: none !important;
}

.atak-paths-draw-toolbar[hidden] {
    display: none !important;
}

.atak-paths-draw-toolbar {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
    font-size: 0.82rem;
    color: #fde68a;
}

.atak-paths-draw-toolbar #atak-paths-draw-hint {
    margin-right: 4px;
}

.atak-sector-map-label-wrap {
    background: transparent;
    border: none;
}

.atak-sector-map-label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
    max-width: 180px;
}

.atak-sector-map-label strong,
.atak-sector-map-label small {
    display: block;
    line-height: 1.15;
    white-space: nowrap;
}

.atak-sector-map-label strong {
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 176px;
}

.atak-sector-map-label small {
    font-size: 0.72rem;
}

.atak-paths-opacity-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.atak-paths-opacity-field input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
}

.atak-paths-opacity-field output {
    min-width: 3.2rem;
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: right;
}

.atak-paths-objects-swatch--line {
    font-weight: 700;
}

.atak-paths-map.is-sector-draw-mode,
.atak-paths-map-stage .atak-paths-map.is-sector-draw-mode {
    cursor: crosshair;
}

.atak-sector-vertex-handle {
    background: transparent;
    border: none;
}

.atak-sector-vertex-handle__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fbbf24;
    border: 2px solid #0f172a;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.45);
    cursor: crosshair;
}

.atak-sector-vertex-handle--edge .atak-sector-vertex-handle__dot {
    width: 10px;
    height: 10px;
    background: #94a3b8;
    border-color: #334155;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.35);
    cursor: crosshair;
}

.atak-sector-vertex-handle--finish .atak-sector-vertex-handle__dot--finish {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #34d399;
    border: 2px solid #0f172a;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.55);
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
}

.atak-sector-vertex-handle--finish.leaflet-dragging .atak-sector-vertex-handle__dot--finish {
    cursor: grabbing;
    background: #6ee7b7;
}

.atak-sector-vertex-handle.leaflet-dragging .atak-sector-vertex-handle__dot {
    cursor: grabbing;
    background: #fde68a;
}

.atak-paths-panel-mobile-nav,
.atak-paths-panel-mobile-menu {
    display: none;
}

.atak-paths-objects-panel {
    width: var(--atak-paths-panel-width, 320px);
    min-width: 260px;
    max-width: 50%;
    flex: 0 0 auto;
    border-left: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.98);
    display: flex;
    flex-direction: column;
    max-height: min(68vh, 720px);
    overflow: hidden;
    container-type: inline-size;
    container-name: atak-panel;
}

.atak-paths-panel-resizer {
    flex: 0 0 6px;
    cursor: col-resize;
    background: transparent;
    position: relative;
    touch-action: none;
}

.atak-paths-panel-resizer::before {
    content: "";
    position: absolute;
    inset: 0 -3px;
}

.atak-paths-panel-resizer::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 2px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.22);
    transition: background 0.15s ease;
}

.atak-paths-panel-resizer:hover::after,
.atak-paths-panel-resizer:focus-visible::after,
body.atak-paths-panel-resizing .atak-paths-panel-resizer::after {
    background: #38bdf8;
}

body.atak-paths-panel-resizing {
    cursor: col-resize;
    user-select: none;
}

body.atak-paths-panel-resizing .atak-paths-map-body {
    pointer-events: none;
}

body.atak-paths-panel-resizing .atak-paths-panel-resizer {
    pointer-events: auto;
}

.atak-paths-objects-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}

.atak-paths-objects-panel > .atak-paths-objects-tabs {
    flex-wrap: nowrap;
}

.atak-paths-objects-tab {
    position: relative;
    flex: 1 1 25%;
    min-width: 44px;
    padding: 10px 6px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atak-paths-objects-panel > .atak-paths-objects-tabs > .atak-paths-objects-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 2px;
}

.atak-paths-objects-panel > .atak-paths-objects-tabs > .atak-paths-objects-tab .atak-paths-objects-tab-icon {
    width: 18px;
    height: 18px;
}

.atak-paths-objects-tab-icon {
    width: 20px;
    height: 20px;
    display: block;
    opacity: 0.48;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.atak-paths-objects-tab-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: opacity 0.15s ease;
    z-index: 2;
}

.atak-paths-objects-tab:hover .atak-paths-objects-tab-icon,
.atak-paths-objects-tab:focus-visible .atak-paths-objects-tab-icon,
.atak-paths-objects-tab.is-active .atak-paths-objects-tab-icon {
    opacity: 1;
}

.atak-paths-objects-tab:hover .atak-paths-objects-tab-tip,
.atak-paths-objects-tab:focus-visible .atak-paths-objects-tab-tip {
    opacity: 1;
}

.atak-paths-objects-tab:hover {
    background: rgba(148, 163, 184, 0.06);
}

.atak-paths-objects-tab.is-active {
    color: #e2e8f0;
    box-shadow: inset 0 -2px 0 #38bdf8;
}

.atak-paths-elements-subtabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border);
    flex: 0 0 auto;
}

.atak-paths-elements-subtabs::-webkit-scrollbar {
    display: none;
}

.atak-paths-elements-subtabs .atak-paths-objects-tab {
    flex: 1 1 16.666%;
    min-width: 52px;
    flex-direction: column;
    gap: 4px;
    padding: 8px 4px 10px;
}

.atak-paths-elements-subtabs .atak-paths-objects-tab-icon {
    width: 20px;
    height: 20px;
    opacity: 0.55;
}

.atak-paths-elements-subtabs .atak-paths-objects-tab.is-active .atak-paths-objects-tab-icon,
.atak-paths-elements-subtabs .atak-paths-objects-tab:hover .atak-paths-objects-tab-icon,
.atak-paths-elements-subtabs .atak-paths-objects-tab:focus-visible .atak-paths-objects-tab-icon {
    opacity: 1;
    color: #38bdf8;
}

.atak-paths-elements-subtabs .atak-paths-objects-tab.is-active {
    color: #e2e8f0;
}

.atak-paths-elements-subtab-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.atak-paths-elements-subtabs .atak-paths-objects-tab.is-active .atak-paths-elements-subtab-label,
.atak-paths-elements-subtabs .atak-paths-objects-tab:hover .atak-paths-elements-subtab-label,
.atak-paths-elements-subtabs .atak-paths-objects-tab:focus-visible .atak-paths-elements-subtab-label {
    color: #e2e8f0;
}

.atak-paths-objects-tab-panel[hidden] {
    display: none !important;
}

.atak-paths-objects-tab-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.atak-paths-objects-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.atak-paths-objects-head-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #cbd5e1;
}

.atak-paths-settings-panel {
    padding: 12px;
    overflow: auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.atak-paths-settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.atak-paths-settings-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.atak-paths-settings-field {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.atak-paths-settings-field select {
    width: 100%;
    min-width: 0;
}

.atak-paths-public-map-contact {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.45);
    font-size: 0.78rem;
    line-height: 1.45;
    color: #94a3b8;
}

.atak-paths-public-map-contact a {
    color: #7dd3fc;
    text-decoration: none;
}

.atak-paths-public-map-contact a:hover {
    text-decoration: underline;
}

.atak-paths-settings-panel .atak-paths-live-toggle {
    width: 100%;
    padding: 4px 0;
}

.atak-paths-layers-panel {
    padding-top: 0;
}

.atak-paths-layers-subtabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.35);
}

.atak-paths-layers-subtab {
    flex: 1 1 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.atak-paths-layers-subtab-icon {
    width: 16px;
    height: 16px;
    opacity: 0.55;
}

.atak-paths-layers-subtab.is-active {
    color: #e2e8f0;
    box-shadow: inset 0 -2px 0 #38bdf8;
}

.atak-paths-layers-subtab.is-active .atak-paths-layers-subtab-icon {
    opacity: 1;
    color: #38bdf8;
}

.atak-paths-layers-subtabs--icons .atak-paths-layers-subtab {
    flex: 1 1 0;
    min-width: 0;
    gap: 0;
    padding: 10px 4px;
    position: relative;
}

.atak-paths-layers-subtabs--icons .atak-paths-layers-subtab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.atak-paths-layers-subtabs--icons .atak-paths-layers-subtab-icon {
    width: 20px;
    height: 20px;
}

.atak-paths-layers-subtabs--icons .atak-paths-layers-subtab::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 6px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #f1f5f9;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0.12s ease;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.atak-paths-layers-subtabs--icons .atak-paths-layers-subtab:hover::after,
.atak-paths-layers-subtabs--icons .atak-paths-layers-subtab:focus-visible::after {
    opacity: 1;
    visibility: visible;
}

.atak-paths-settings-subtabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.35);
}

.atak-paths-settings-subtab {
    flex: 1 1 33%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.atak-paths-settings-subtab.is-active {
    color: #e2e8f0;
    box-shadow: inset 0 -2px 0 #38bdf8;
}

.atak-paths-settings-subpanel[hidden] {
    display: none !important;
}

.atak-paths-bdl-settings-panel .atak-paths-bdl-intro {
    padding: 0 0 8px;
}

.atak-paths-bdl-settings-panel .atak-paths-bdl-archives {
    padding: 0;
}

.atak-paths-bdl-settings-panel .atak-paths-bdl-actions {
    padding: 8px 0 0;
}

.atak-paths-bdl-settings-panel .atak-paths-bdl-status {
    padding: 8px 0 0;
}

.atak-paths-layers-subpanel[hidden] {
    display: none !important;
}

.atak-paths-layers-subpanel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#atak-paths-tab-layers {
    overflow: hidden;
}

#atak-paths-tab-weather {
    overflow: hidden;
}

#atak-paths-tab-elements {
    overflow: hidden;
}

#atak-paths-tab-elements .atak-paths-elements-subpanel.is-active {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

#atak-paths-tab-elements .atak-paths-elements-subpanel[hidden] {
    display: none !important;
}

#atak-paths-tab-layers .atak-paths-layers-subpanel.is-active {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.atak-paths-users-intro {
    margin: 0;
    padding: 8px 12px 0;
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1.45;
}

.atak-paths-users-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow: auto;
    flex: 1 1 auto;
}

.atak-paths-user-item {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.35);
    margin-bottom: 8px;
    overflow: hidden;
}

.atak-paths-user-item.is-expanded {
    border-color: rgba(56, 189, 248, 0.28);
}

.atak-paths-user-main {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
}

.atak-paths-user-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
    background: #64748b;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.atak-paths-user-status.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.atak-paths-user-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.atak-paths-user-meta:hover,
.atak-paths-user-meta:focus-visible {
    background: rgba(56, 189, 248, 0.08);
    outline: none;
}

.atak-paths-user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.atak-paths-user-name {
    font-size: 0.84rem;
    color: #e2e8f0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
}

.atak-paths-user-battery {
    font-size: inherit;
    font-weight: 600;
    white-space: nowrap;
}

.atak-paths-user-battery.is-ok {
    color: #86efac;
}

.atak-paths-user-battery.is-mid {
    color: #fde047;
}

.atak-paths-user-battery.is-low {
    color: #fca5a5;
}

.atak-paths-user-source {
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-paths-user-detail {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}

.atak-paths-user-tracks-btn {
    flex-shrink: 0;
}

.atak-paths-user-tracks-btn.is-active {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.45);
}

.atak-paths-user-tracks {
    list-style: none;
    margin: 0;
    padding: 0 8px 8px 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.atak-paths-user-tracks[hidden] {
    display: none !important;
}

.atak-paths-user-track {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 6px;
}

.atak-paths-user-track:hover {
    background: rgba(56, 189, 248, 0.08);
}

.atak-paths-user-track-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 16px 1fr;
    column-gap: 8px;
    row-gap: 1px;
    align-items: center;
    cursor: pointer;
}

.atak-paths-user-track-cb {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 16px;
    height: 16px;
    margin: 0;
    align-self: center;
    justify-self: start;
    flex-shrink: 0;
    accent-color: #38bdf8;
}

.atak-paths-user-track-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.78rem;
    color: #e2e8f0;
    line-height: 1.35;
}

.atak-paths-user-track-sub {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.35;
}

.atak-paths-user-track-map {
    flex-shrink: 0;
}

.atak-paths-bdl-intro {
    margin: 0;
    padding: 8px 12px 0;
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1.45;
}

.atak-paths-bdl-intro a {
    color: #38bdf8;
}

.atak-paths-fire-intro {
    margin: 0;
    padding: 0;
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1.45;
}

.atak-paths-fire-dock {
    position: absolute;
    left: 12px;
    right: 72px;
    bottom: 12px;
    z-index: 780;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.atak-paths-fire-dock:not([hidden]) {
    pointer-events: auto;
}

.atak-paths-fire-dock[hidden] {
    display: none !important;
}

.atak-paths-fire-dock-inner {
    width: 100%;
    max-width: min(480px, 100%);
    border-radius: 8px;
    border: 1px solid rgba(249, 115, 22, 0.35);
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.atak-paths-fire-dock-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(249, 115, 22, 0.18);
    background: rgba(249, 115, 22, 0.07);
}

.atak-paths-fire-dock-opacity {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.atak-paths-fire-dock-opacity input[type="range"] {
    flex: 1 1 auto;
    min-width: 88px;
    max-width: 200px;
    margin: 0;
}

.atak-paths-fire-dock-head .btn-compact {
    flex: 0 0 auto;
    min-width: 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.atak-paths-fire-dock-body {
    padding: 4px 8px 6px;
}

.atak-paths-fire-dock-body .atak-paths-fire-status {
    margin: 0;
    padding: 2px 0 0;
    font-size: 0.65rem;
    line-height: 1.3;
}

.atak-paths-fire-legend-list--compact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
}

.atak-paths-fire-legend-list--compact li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: #cbd5e1;
    white-space: nowrap;
}

.atak-paths-fire-legend-swatch {
    display: inline-block;
    width: 18px;
    height: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    flex-shrink: 0;
}

.atak-paths-fire-opacity-field {
    margin: 0;
}

.atak-paths-fire-opacity-val {
    font-size: 0.68rem;
    color: #94a3b8;
    min-width: 2rem;
    text-align: right;
    flex: 0 0 auto;
}

.atak-paths-fire-actions {
    margin: 8px 12px 0;
}

.atak-paths-effis-tiles {
    pointer-events: none;
}

.atak-paths-fire-status {
    margin: 0;
    padding: 0;
    font-size: 0.76rem;
    color: #94a3b8;
}

.atak-paths-fire-status.is-ok {
    color: #fdba74;
}

.atak-paths-fire-status.is-error {
    color: #f87171;
}

.atak-paths-bdl-archives {
    padding: 8px 12px 0;
}

.atak-paths-bdl-archives-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.atak-paths-bdl-archives-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
}

.atak-paths-bdl-upload-label {
    cursor: pointer;
    margin: 0;
}

.atak-paths-bdl-archives-hint {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.4;
}

.atak-paths-bdl-archives-hint code {
    color: #cbd5e1;
    font-size: 0.7rem;
}

.atak-paths-bdl-archives-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.atak-paths-bdl-archive-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 8px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
}

.atak-paths-bdl-archive-main {
    min-width: 0;
}

.atak-paths-bdl-archive-name {
    font-size: 0.76rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atak-paths-bdl-archive-meta {
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.35;
}

.atak-paths-bdl-archive-status {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.atak-paths-bdl-archive-status.is-imported {
    color: #86efac;
    background: rgba(34, 197, 94, 0.15);
}

.atak-paths-bdl-archive-status.is-uploaded,
.atak-paths-bdl-archive-status.is-processing {
    color: #fde68a;
    background: rgba(234, 179, 8, 0.15);
}

.atak-paths-bdl-archive-status.is-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
}

.atak-paths-bdl-archive-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
    justify-content: flex-end;
}

.atak-paths-bdl-archive-actions .btn-compact {
    padding: 3px 8px;
    font-size: 0.68rem;
}

.atak-paths-bdl-actions {
    padding: 8px 12px 0;
}

.atak-paths-bdl-status {
    margin: 0;
    padding: 8px 12px 0;
    color: #94a3b8;
    font-size: 0.74rem;
    line-height: 1.45;
}

.atak-paths-bdl-status.is-ok {
    color: #86efac;
}

.atak-paths-bdl-status.is-error {
    color: #fca5a5;
}

.atak-paths-bdl-groups {
    padding: 8px;
    overflow: auto;
    flex: 1 1 auto;
}

.atak-paths-dp-intro {
    padding: 0 12px 8px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #94a3b8;
}

.atak-paths-dp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px 8px;
}

.atak-paths-dp-status {
    padding: 0 12px 8px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.atak-paths-dp-status.is-ok {
    color: #86efac;
}

.atak-paths-dp-status.is-error {
    color: #fca5a5;
}

.atak-paths-dp-groups {
    padding: 8px;
    overflow: auto;
    flex: 1 1 auto;
}

.atak-paths-dp-group {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.35);
    margin-bottom: 10px;
    overflow: hidden;
}

.atak-paths-dp-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(56, 189, 248, 0.08);
}

.atak-paths-dp-group.is-collapsed .atak-paths-dp-group-head {
    border-bottom: none;
}

.atak-paths-dp-group-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}

.atak-paths-dp-group-toggle:hover {
    background: rgba(56, 189, 248, 0.2);
}

.atak-paths-dp-package-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 2px 0;
    cursor: pointer;
}

.atak-paths-dp-package-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.atak-paths-dp-package-labels-toggle {
    gap: 2px;
}

.atak-paths-dp-package-labels-icon {
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    color: #94a3b8;
    user-select: none;
}

.atak-paths-dp-package-labels-toggle:has(input:checked) .atak-paths-dp-package-labels-icon {
    color: #38bdf8;
}

.atak-paths-dp-marker-wrap.is-dp-labels-off .atak-dp-marker-dot {
    margin-top: 0;
}

.atak-paths-dp-group-actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.atak-paths-dp-group-count {
    margin-left: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

.atak-paths-dp-group-head-main {
    min-width: 0;
    flex: 1 1 auto;
}

.atak-paths-dp-group-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    word-break: break-word;
}

.atak-paths-dp-group-meta {
    margin-top: 4px;
    font-size: 0.68rem;
    color: #64748b;
}

.atak-paths-dp-group-delete {
    flex-shrink: 0;
}

.atak-paths-active-layers-head {
    border-bottom: none;
    padding-bottom: 4px;
}

.atak-paths-active-layers-hint {
    margin: 0;
    padding: 0 12px 8px;
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.35;
}

.atak-paths-active-layers-list {
    list-style: none;
    margin: 0;
    padding: 0 8px 12px;
    max-height: none;
    overflow: visible;
}

.atak-paths-active-layers-group {
    margin: 10px 4px 4px;
    padding: 4px 8px 2px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    list-style: none;
}

.atak-paths-active-layers-group:first-child {
    margin-top: 4px;
}

.atak-paths-active-layers-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.atak-paths-active-layers-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.76rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.3;
    word-break: break-word;
}

.atak-paths-active-layers-off {
    flex-shrink: 0;
    min-width: 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.atak-dp-marker {
    background: transparent;
    border: none;
}

.atak-dp-marker .atak-dp-marker-dot {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: none;
    color: inherit;
}

.atak-paths-dp-map-label {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    color: #f1f5f9;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 3px 8px;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atak-paths-dp-map-label::before {
    display: none;
}

.atak-paths-dp-layer-list {
    list-style: none;
    margin: 0;
    padding: 4px 0 6px;
}

.atak-paths-dp-layer-item {
    display: grid;
    grid-template-columns: 18px 26px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    column-gap: 10px;
    row-gap: 0;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.atak-paths-dp-layer-item:last-child {
    border-bottom: none;
}

.atak-paths-dp-layer-cb {
    margin: 0;
    width: 16px;
    height: 16px;
    justify-self: start;
    cursor: pointer;
}

.atak-paths-dp-layer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 0.9rem;
    line-height: 1;
    flex-shrink: 0;
    justify-self: start;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    box-shadow: none;
    color: inherit;
}

button.atak-paths-dp-layer-focus {
    width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    justify-self: start;
}

button.atak-paths-dp-layer-focus:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.atak-paths-bdl-group {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.35);
    margin-bottom: 10px;
    overflow: hidden;
}

.atak-paths-bdl-group-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(34, 197, 94, 0.08);
}

.atak-paths-bdl-group.is-collapsed .atak-paths-bdl-group-head {
    border-bottom: none;
}

.atak-paths-bdl-group-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}

.atak-paths-bdl-group-toggle:hover {
    background: rgba(34, 197, 94, 0.22);
}

.atak-paths-bdl-group-head-text {
    min-width: 0;
    flex: 1 1 auto;
}

.atak-paths-bdl-group-expand {
    flex-shrink: 0;
    align-self: center;
}

.atak-paths-layers-subtab-icon--spruce {
    width: 17px;
    height: 17px;
}

.atak-paths-layers-subtab-icon--atak {
    width: 17px;
    height: 17px;
}

.atak-paths-bdl-group-head-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.atak-paths-bdl-group-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atak-paths-bdl-group-year {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.atak-paths-bdl-group-id {
    margin-top: 4px;
    font-size: 0.68rem;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atak-paths-bdl-layer-list {
    list-style: none;
    margin: 0;
    padding: 4px 0 6px;
}

.atak-paths-bdl-layer-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.atak-paths-bdl-layer-item:last-child {
    border-bottom: none;
}

.atak-paths-bdl-layer-item:hover {
    background: rgba(56, 189, 248, 0.06);
}

.atak-paths-bdl-layer-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.atak-paths-bdl-layer-swatch.is-line {
    width: 18px;
    height: 4px;
    border-radius: 999px;
}

.atak-paths-bdl-layer-swatch.is-point {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.atak-paths-bdl-layer-swatch.is-parking {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: #2563eb;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.atak-paths-bdl-layer-swatch.is-parking::after {
    content: "P";
}

.atak-paths-bdl-layer-swatch.is-forestry {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: #16a34a;
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.atak-paths-bdl-layer-swatch.is-forestry::after {
    content: "L";
}

.atak-paths-bdl-layer-swatch.is-wood-depot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: #92400e;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.atak-paths-bdl-layer-swatch.is-wood-depot::after {
    content: "S";
}

.atak-paths-bdl-point-icon {
    background: transparent !important;
    border: 0 !important;
}

.atak-paths-bdl-point-marker {
    position: relative;
    width: 16px;
    height: 16px;
}

.atak-paths-bdl-point-marker__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--bdl-point-color, #0ea5e9);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}

.atak-paths-bdl-point-marker__dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: var(--bdl-point-color, #0ea5e9);
}

.atak-paths-bdl-parking-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: #2563eb;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.4);
}

.atak-paths-bdl-parking-marker__letter {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    user-select: none;
}

.atak-paths-bdl-office-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: #16a34a;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.4);
}

.atak-paths-bdl-office-marker__letter {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    user-select: none;
}

.atak-paths-bdl-wood-depot-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: #92400e;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.4);
}

.atak-paths-bdl-wood-depot-marker__letter {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    user-select: none;
}

.leaflet-tooltip.atak-paths-map-tooltip,
.leaflet-tooltip.atak-paths-bdl-infra-tooltip {
    padding: 6px 9px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.94);
    color: #e2e8f0;
    font-size: 0.75rem;
    line-height: 1.35;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.45);
}

.atak-paths-map-tip-source,
.atak-combo-popup-osm-source {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #94a3b8;
    margin-bottom: 3px;
}

.atak-paths-map-tip-kind,
.atak-paths-bdl-infra-tip-kind {
    display: block;
    font-weight: 700;
    color: #f8fafc;
}

.atak-paths-map-tip-name,
.atak-paths-bdl-infra-tip-name {
    display: block;
    margin-top: 2px;
    color: #cbd5e1;
    font-weight: 500;
}

.atak-paths-bdl-layer-label {
    display: grid;
    grid-template-columns: 16px 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #e2e8f0;
    cursor: pointer;
}

.atak-paths-bdl-layer-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    justify-self: start;
    accent-color: #38bdf8;
    cursor: pointer;
}

.atak-paths-bdl-layer-name {
    min-width: 0;
    line-height: 1.25;
}

.atak-paths-bdl-layer-count {
    padding-right: 10px;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
    white-space: nowrap;
}

.atak-paths-bdl-layer-section {
    list-style: none;
    margin: 6px 0 2px;
    padding: 8px 10px 2px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.atak-paths-bdl-layer-section-title {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
}

.atak-paths-bdl-fire-label-icon {
    background: transparent;
    border: 0;
}

.atak-paths-bdl-fire-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff0000;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.leaflet-tooltip.atak-paths-bdl-compartment-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: #7c5cff;
    font-weight: 1000;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0.02em;
}

.leaflet-tooltip.atak-paths-bdl-compartment-label::before,
.leaflet-tooltip.atak-paths-bdl-compartment-label::after {
    display: none !important;
}

.atak-paths-bdl-compartment-label-icon,
.atak-paths-bdl-subarea-label-icon {
    background: transparent !important;
    border: 0 !important;
    pointer-events: none !important;
}

.atak-paths-bdl-compartment-label-text {
    color: #7c5cff;
    font-weight: 1000;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.atak-paths-bdl-subarea-label-text {
    color: #94a3b8;
    font-weight: 1000;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.leaflet-tooltip.atak-paths-bdl-subarea-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: #94a3b8;
    font-weight: 1000;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.02em;
}

.leaflet-tooltip.atak-paths-bdl-subarea-label::before,
.leaflet-tooltip.atak-paths-bdl-subarea-label::after {
    display: none !important;
}

.atak-paths-bdl-forest-label-icon {
    background: transparent !important;
    border: 0 !important;
}

.atak-paths-bdl-forest-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: 240px;
    white-space: normal;
    color: #00a651;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.15;
    text-align: center;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.95),
        0 1px 2px rgba(15, 23, 42, 0.35);
}

.atak-paths-bdl-inspectorate-label-icon {
    background: transparent;
    border: 0;
}

.atak-paths-bdl-inspectorate-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: 240px;
    white-space: normal;
    color: #2563eb;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.15;
    text-align: center;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.95),
        0 1px 2px rgba(15, 23, 42, 0.35);
}

.atak-paths-bdl-master {
    margin: 0 0 10px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.08);
    overflow: hidden;
}

.atak-paths-bdl-master .atak-paths-bdl-layer-list {
    padding: 0;
}

.atak-paths-bdl-master .atak-paths-bdl-layer-item {
    border-bottom: none;
}

.atak-paths-bdl-master-label {
    min-width: 0;
}

.atak-paths-bdl-master-title {
    font-weight: 700;
    color: #93c5fd;
}

.atak-paths-bdl-master-meta {
    font-variant-numeric: tabular-nums;
}

.atak-paths-osm-cache-panel {
    margin: 8px 8px 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(56, 189, 248, 0.06);
}

.atak-paths-osm-cache-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.atak-paths-osm-cache-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
}

.atak-paths-osm-cache-panel.is-busy {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.12);
}

.atak-paths-osm-cache-panel.is-busy .atak-paths-osm-cache-info {
    color: #bae6fd;
}

.atak-paths-osm-cache-region-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.76rem;
    color: #94a3b8;
}

.atak-paths-osm-cache-region-label select {
    width: 100%;
}

.atak-paths-osm-cache-info {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #94a3b8;
}

#atak-paths-tab-settings .atak-paths-osm-cache-info {
    margin-bottom: 10px;
}

.atak-paths-osm-intro {
    margin: 0;
    padding: 8px 12px 0;
    color: #94a3b8;
    font-size: 0.78rem;
    line-height: 1.45;
}

.atak-paths-osm-region-field {
    display: block;
    margin: 8px 12px 4px;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.atak-paths-osm-region-field select {
    display: block;
    width: 100%;
    margin-top: 4px;
}

.atak-paths-osm-area-hint {
    margin: 8px 12px 6px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.76rem;
    line-height: 1.45;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
}

.atak-paths-osm-area-hint.is-ok {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.atak-paths-osm-area-hint.is-error {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.atak-paths-osm-list.is-fetch-blocked .atak-paths-osm-fetch:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.atak-paths-osm-group,
.atak-paths-osm-category-result-group {
    padding: 6px 10px 2px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    list-style: none;
    pointer-events: none;
}

.atak-paths-osm-list {
    list-style: none;
    margin: 0;
    padding: 8px;
}

.atak-paths-osm-list.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.atak-paths-osm-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.atak-paths-osm-item:hover {
    background: rgba(56, 189, 248, 0.11);
    border-color: rgba(56, 189, 248, 0.22);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.08);
}

.atak-paths-osm-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
}

.atak-paths-osm-swatch--dot {
    background: transparent !important;
    color: transparent;
}

.atak-paths-osm-swatch--dot::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--osm-dot-color, #ef4444);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.atak-paths-osm-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.atak-paths-osm-name {
    font-size: 0.84rem;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atak-paths-osm-count {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
}

.atak-paths-osm-count::before {
    content: "Załadowano: ";
}

.atak-paths-osm-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.atak-paths-osm-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    width: 28px;
    margin: 0;
    cursor: pointer;
}

.atak-paths-osm-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

@container atak-panel (min-width: 360px) {
    .atak-paths-osm-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .atak-paths-osm-count {
        flex-shrink: 0;
        text-align: right;
    }
}

@container atak-panel (min-width: 420px) {
    .atak-paths-osm-item {
        gap: 10px 14px;
        padding: 9px 12px;
    }

    .atak-paths-osm-name {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.35;
    }
}

.atak-paths-osm-master-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #94a3b8;
    cursor: pointer;
    margin: 0;
}

.atak-paths-osm-master-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.atak-paths-osm-fetch.btn-icon,
.atak-paths-osm-remove.btn-icon,
.atak-paths-osm-fetch-all.btn-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.atak-paths-osm-action-icon {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
}

.atak-paths-osm-add {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 0 8px 8px;
}

.atak-paths-osm-add-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.76rem;
    color: #94a3b8;
}

.atak-paths-osm-add-label select {
    width: 100%;
    min-width: 0;
}

.atak-paths-osm-add-picker {
    position: relative;
}

.atak-paths-osm-add-picker input[type="search"] {
    width: 100%;
    min-width: 0;
}

.atak-paths-osm-category-results {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 4px 0;
    list-style: none;
    max-height: 220px;
    overflow: auto;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #0f172a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.atak-paths-osm-category-results:not([hidden]) {
    display: block;
}

.atak-paths-osm-category-result {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    cursor: pointer;
    color: #e2e8f0;
}

.atak-paths-osm-category-result:hover,
.atak-paths-osm-category-result.is-selected {
    background: rgba(56, 189, 248, 0.14);
}

.atak-paths-osm-category-result__meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.atak-paths-osm-category-result__label {
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atak-paths-osm-category-result__group {
    font-size: 0.7rem;
    color: #94a3b8;
}

.atak-paths-osm-category-results-empty {
    padding: 8px 10px;
    font-size: 0.76rem;
    color: #94a3b8;
}

.atak-paths-osm-marker__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.atak-paths-osm-actions {
    display: flex;
    gap: 8px;
    padding: 0 8px 8px;
}

.atak-paths-osm-actions .btn:not(.btn-icon) {
    flex: 1 1 auto;
}

.atak-paths-osm-actions .btn-icon {
    flex: 0 0 auto;
}

.atak-paths-osm-status {
    margin: 0;
    padding: 0 12px 10px;
    min-height: 1.2em;
    font-size: 0.76rem;
    color: #94a3b8;
}

.atak-paths-osm-status.is-error {
    color: #fca5a5;
}

.atak-paths-osm-status.is-ok {
    color: #86efac;
}

.atak-paths-osm-marker {
    background: transparent;
    border: none;
}

.atak-paths-osm-marker__badge {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    line-height: 1;
    border: 2px solid rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.atak-paths-objects-count {
    font-size: 0.78rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.15);
    padding: 2px 8px;
    border-radius: 999px;
}

.atak-paths-objects-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow: auto;
    flex: 1 1 auto;
}

.atak-paths-objects-empty {
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 12px 8px;
}

.atak-paths-objects-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.atak-paths-objects-item:hover {
    background: rgba(56, 189, 248, 0.06);
    border-color: rgba(56, 189, 248, 0.15);
}

.atak-paths-objects-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.atak-paths-objects-swatch--sector {
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.atak-paths-objects-swatch--circle {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    font-size: 1.1rem;
    line-height: 1;
}

.atak-paths-objects-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.atak-paths-objects-meta strong {
    display: block;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atak-paths-objects-meta small {
    color: #94a3b8;
    font-size: 0.75rem;
}

.atak-paths-objects-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.atak-paths-objects-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.atak-paths-objects-action-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/* Elementy mapy — tekst w pierwszym wierszu, przyciski w drugim */
.atak-paths-objects-list--stacked .atak-paths-objects-item--stacked,
.atak-paths-measures-list .atak-paths-objects-item--measure {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
}

.atak-paths-objects-list--stacked .atak-paths-objects-item-text,
.atak-paths-measures-list .atak-paths-objects-item-text {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.atak-paths-objects-list--stacked .atak-paths-objects-meta,
.atak-paths-measures-list .atak-paths-objects-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.atak-paths-objects-list--stacked .atak-paths-objects-meta strong,
.atak-paths-measures-list .atak-paths-objects-meta strong {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
    word-break: break-word;
}

.atak-paths-objects-list--stacked .atak-paths-objects-meta small,
.atak-paths-measures-list .atak-paths-objects-meta small {
    display: block;
    margin-top: 4px;
    line-height: 1.35;
    word-break: break-word;
}

.atak-paths-objects-list--stacked .atak-paths-objects-actions--stacked,
.atak-paths-measures-list .atak-paths-objects-actions--measure {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    flex-shrink: 1;
}

.atak-paths-objects-list--stacked .atak-paths-objects-actions--stacked.is-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.atak-paths-objects-list--stacked .atak-paths-objects-actions--stacked .btn-compact,
.atak-paths-measures-list .atak-paths-objects-actions--measure .btn-compact {
    width: 100%;
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
    justify-content: center;
}

@container atak-panel (max-width: 300px) {
    .atak-paths-objects-list--stacked .atak-paths-objects-actions--stacked,
    .atak-paths-measures-list .atak-paths-objects-actions--measure {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .atak-paths-objects-list--stacked .atak-paths-objects-actions--stacked.is-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.atak-paths-waypoints-panel {
    width: min(320px, 34vw);
    border-left: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.98);
    display: flex;
    flex-direction: column;
    max-height: min(68vh, 720px);
}

.atak-paths-waypoints-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.atak-paths-waypoints-count {
    font-size: 0.78rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.15);
    padding: 2px 8px;
    border-radius: 999px;
}

.atak-paths-waypoints-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow: auto;
    flex: 1 1 auto;
}

.atak-paths-waypoints-empty {
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 12px 8px;
}

.atak-paths-waypoints-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.atak-paths-waypoints-item:hover {
    background: rgba(56, 189, 248, 0.06);
    border-color: rgba(56, 189, 248, 0.15);
}

.atak-paths-waypoints-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.atak-paths-waypoints-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.atak-paths-waypoints-meta strong {
    display: block;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atak-paths-waypoints-meta small {
    color: #94a3b8;
    font-size: 0.75rem;
}

.atak-paths-waypoints-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.atak-waypoint-marker {
    background: transparent;
    border: none;
}

.atak-paths-map.is-object-move-mode .atak-waypoint-marker {
    touch-action: none;
    cursor: grab;
}

.atak-paths-map.is-object-move-mode .atak-waypoint-marker.is-atak-dragging {
    cursor: grabbing;
}

.atak-waypoint-marker-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    pointer-events: none;
}

.atak-waypoint-marker-label {
    font-size: 0.72rem;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atak-waypoint-marker-glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    font-size: 1.35rem;
    line-height: 1;
    pointer-events: auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.atak-aff-svg {
    display: block;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.atak-waypoint-marker-glyph .atak-aff-svg {
    width: 28px;
    height: 28px;
}

.atak-wp-shape {
    pointer-events: auto;
    box-sizing: border-box;
    border: 2px solid #0f172a;
    background: var(--wp-color, #38bdf8);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.atak-wp-shape--circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.atak-wp-shape--triangle {
    width: 24px;
    height: 22px;
    border: none;
    background: transparent;
    box-shadow: none;
}

.atak-wp-shape--triangle::before {
    content: "";
    display: block;
    width: 24px;
    height: 22px;
    background: var(--wp-color, #38bdf8);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
    border: none;
}

.atak-wp-shape--square {
    width: 20px;
    height: 20px;
}

.atak-wp-shape--rect {
    width: 28px;
    height: 16px;
}

.atak-paths-objects-swatch--glyph {
    background: rgba(30, 41, 59, 0.92) !important;
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
}

.atak-paths-objects-swatch--glyph .atak-paths-objects-swatch-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.2rem;
    line-height: 1;
}

.atak-paths-objects-swatch--atak .atak-aff-svg {
    width: 24px;
    height: 24px;
}

.atak-paths-objects-swatch--shape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 2px;
    background: rgba(30, 41, 59, 0.92) !important;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.atak-paths-objects-swatch--shape .atak-wp-shape {
    transform: scale(0.72);
    transform-origin: center;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-tab {
    margin: 0 0 -1px;
    padding: 8px 14px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-tab:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-tab:focus-visible {
    color: #e2e8f0;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-tab.is-active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-tabpanel {
    display: none;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-tabpanel.is-active {
    display: block;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coords-hint {
    margin: 0 0 10px;
    font-size: 0.76rem;
    line-height: 1.4;
    color: #94a3b8;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-formats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-row,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-extra {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: normal;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: calc(100% - 2.875rem);
    margin: 0;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-copy,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-share,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-qr,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-reset,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-share,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-qr,
.bsp-watch-toolbar .atak-paths-wp-coord-share,
.bsp-watch-toolbar .atak-paths-wp-coord-qr,
.bsp-watch-toolbar .atak-paths-wp-coord-reset,
.bsp-watch-head-main .atak-paths-wp-coord-back {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
    opacity: 0.48;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    line-height: 0;
    touch-action: manipulation;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-copy:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-copy:focus-visible,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-share:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-share:focus-visible,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-qr:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-qr:focus-visible,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-reset:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-reset:focus-visible,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-share:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-share:focus-visible,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-qr:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-qr:focus-visible,
.bsp-watch-toolbar .atak-paths-wp-coord-share:hover,
.bsp-watch-toolbar .atak-paths-wp-coord-share:focus-visible,
.bsp-watch-toolbar .atak-paths-wp-coord-qr:hover,
.bsp-watch-toolbar .atak-paths-wp-coord-qr:focus-visible,
.bsp-watch-toolbar .atak-paths-wp-coord-reset:hover,
.bsp-watch-toolbar .atak-paths-wp-coord-reset:focus-visible,
.bsp-watch-head-main .atak-paths-wp-coord-back:hover,
.bsp-watch-head-main .atak-paths-wp-coord-back:focus-visible {
    opacity: 1;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
    outline: none;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-copy:disabled,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-share:disabled,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-qr:disabled,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-reset:disabled,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-share:disabled,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-qr:disabled,
.bsp-watch-toolbar .atak-paths-wp-coord-share:disabled,
.bsp-watch-toolbar .atak-paths-wp-coord-qr:disabled,
.bsp-watch-toolbar .atak-paths-wp-coord-reset:disabled {
    opacity: 0.28;
    cursor: not-allowed;
    pointer-events: none;
}

.bsp-watch-toolbar .atak-paths-wp-coord-share,
.bsp-watch-toolbar .atak-paths-wp-coord-qr,
.bsp-watch-toolbar .atak-paths-wp-coord-reset,
.bsp-watch-head-main .atak-paths-wp-coord-back {
    opacity: 1;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-copy-icon,
.bsp-watch-toolbar .atak-paths-wp-coord-copy-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-copy-tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: opacity 0.15s ease;
    z-index: 2;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-copy:hover .atak-paths-wp-coord-copy-tip,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-copy:focus-visible .atak-paths-wp-coord-copy-tip,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-share:hover .atak-paths-wp-coord-copy-tip,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-share:focus-visible .atak-paths-wp-coord-copy-tip,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-qr:hover .atak-paths-wp-coord-copy-tip,
.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-qr:focus-visible .atak-paths-wp-coord-copy-tip {
    opacity: 1;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-qr.is-active,
.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-qr.is-active {
    opacity: 1;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.atak-paths-wp-coord-qr-screen {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
        max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.atak-paths-wp-coord-qr-screen[hidden] {
    display: none !important;
}

.atak-paths-wp-coord-qr-screen-backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.atak-paths-wp-coord-qr-screen-panel {
    position: relative;
    z-index: 1;
    width: min(96vw, 520px);
    max-height: min(96vh, 720px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 18px 22px;
    border-radius: 14px;
    background: var(--card, #0f172a);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    text-align: center;
}

.atak-paths-wp-coord-qr-screen-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: #e2e8f0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.atak-paths-wp-coord-qr-screen-close:hover,
.atak-paths-wp-coord-qr-screen-close:focus-visible {
    background: #1e293b;
    outline: none;
}

.atak-paths-wp-coord-qr-screen-title {
    margin: 0;
    padding: 0 36px 0 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.atak-paths-wp-coord-qr-screen-format {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7dd3fc;
}

.atak-paths-wp-coord-qr-screen-value {
    margin: 0;
    width: 100%;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-word;
}

.atak-paths-wp-coord-qr-screen-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.atak-paths-wp-coord-qr-screen-visual img {
    display: block;
    width: min(72vmin, 420px);
    height: auto;
    max-width: 100%;
    image-rendering: pixelated;
}

body.atak-paths-wp-qr-screen-open {
    overflow: hidden;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-error {
    margin: 8px 0 0;
    font-size: 0.76rem;
    color: #fca5a5;
    line-height: 1.35;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-extras {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-coord-extra--gmaps {
    flex-direction: row;
    align-items: center;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-gmaps-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-gmaps-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7dd3fc;
    text-decoration: none;
    line-height: 1.3;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-gmaps-link:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-gmaps-link:focus-visible {
    color: #bae6fd;
    text-decoration: underline;
    outline: none;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-osm-address {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 2.875rem);
    font-size: 0.78rem;
    line-height: 1.4;
    color: #cbd5e1;
    word-break: break-word;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.atak-paths-wp-icon-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(42vh, 320px);
    overflow-y: auto;
    padding: 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.atak-paths-wp-icon-picker-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atak-paths-wp-icon-picker-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.atak-paths-wp-icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.atak-paths-wp-icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.85);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.atak-paths-wp-icon-option:hover,
.atak-paths-wp-icon-option:focus-visible {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.08);
}

.atak-paths-wp-icon-option.is-active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.atak-paths-wp-icon-option-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.atak-paths-wp-icon-option-visual .atak-aff-svg {
    width: 28px;
    height: 28px;
}

.atak-paths-wp-icon-option-visual .atak-waypoint-marker-glyph {
    min-width: 0;
    min-height: 0;
    font-size: 1.25rem;
}

.atak-paths-wp-icon-option-visual .atak-wp-shape--circle {
    width: 20px;
    height: 20px;
}

.atak-paths-wp-icon-option-visual .atak-wp-shape--square {
    width: 18px;
    height: 18px;
}

.atak-paths-wp-icon-option-visual .atak-wp-shape--rect {
    width: 24px;
    height: 14px;
}

.atak-paths-wp-icon-option-visual .atak-wp-shape--triangle {
    width: 22px;
    height: 20px;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field--color {
    margin-bottom: 0;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-color-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-color-picker-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-color-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-navigate-hint {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--muted, #94a3b8);
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-color-preset {
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 2px solid rgba(15, 23, 42, 0.65);
    border-radius: 8px;
    background: var(--preset-color, #ef4444);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-color-preset:hover,
.admin-modal-panel--atak-waypoint .atak-paths-wp-color-preset:focus-visible {
    transform: scale(1.06);
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-color-preset.is-active {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.55);
    transform: none;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-color-picker-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    cursor: pointer;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field--color input[type="color"] {
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    margin: 0;
    padding: 2px;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    background: #1e293b;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field--color input[type="color"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field--color input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field--color input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field--color input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.atak-paths-modal-layer-warn {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: #fde68a;
    font-size: 0.84rem;
    line-height: 1.45;
}

.atak-paths-modal-layer-warn p {
    margin: 0 0 8px;
}

.atak-paths-modal-layer-warn[hidden] {
    display: none;
}

.atak-map-combo-popup .leaflet-popup-content-wrapper {
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #475569;
    border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}

.atak-map-combo-popup .leaflet-popup-tip {
    background: #0f172a;
    border: 1px solid #475569;
    box-shadow: none;
}

.atak-map-combo-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    line-height: 1.45;
    font-size: 0.84rem;
    color: #f1f5f9;
}

.atak-combo-popup-panel {
    padding: 12px 14px;
}

.atak-combo-popup-panel--bdl-only {
    padding: 12px 14px;
}

.atak-combo-popup-sectors {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.atak-combo-popup-sector {
    padding: 10px 12px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid #334155;
}

.atak-combo-popup-sector-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #f8fafc;
}

.atak-combo-popup-sector-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.atak-combo-popup-sector-sep {
    height: 8px;
}

.atak-combo-popup-section-sep {
    height: 1px;
    margin: 12px 0;
    background: #475569;
}

.atak-combo-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    color: #f8fafc;
}

.atak-combo-popup-btn--muted {
    background: #334155;
    border-color: #475569;
}

.atak-combo-popup-btn--primary {
    background: #0284c7;
    border-color: #0ea5e9;
}

.atak-combo-popup-btn--danger {
    background: #7f1d1d;
    border-color: #b91c1c;
}

.atak-combo-popup-bdl-ctx {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #14532d;
    border: 1px solid #22c55e;
}

.atak-combo-popup-bdl-ctx-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #bbf7d0;
    margin-bottom: 6px;
}

.atak-combo-popup-bdl-ctx-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.atak-combo-popup-bdl-ctx-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 2px 0;
}

.atak-combo-popup-bdl-ctx-value {
    font-weight: 700;
    font-size: 0.92rem;
    color: #f0fdf4;
}

.atak-combo-popup-bdl-ctx-meta {
    font-size: 0.78rem;
    color: #86efac;
}

.atak-combo-popup-bdl-block {
    padding: 10px 12px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid #334155;
}

.atak-combo-popup-bdl-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #f8fafc;
}

.atak-combo-popup-bdl-address {
    font-size: 0.8rem;
    line-height: 1.35;
    color: #cbd5e1;
    margin-bottom: 10px;
    word-break: break-word;
}

.atak-combo-popup-bdl-row {
    display: flex;
    gap: 8px;
    padding: 2px 0;
    font-size: 0.8rem;
}

.atak-combo-popup-bdl-k {
    flex: 0 0 auto;
    min-width: 5.5em;
    color: #94a3b8;
    font-weight: 600;
}

.atak-combo-popup-bdl-phone {
    margin-top: 4px;
}

.atak-combo-popup-bdl-phone a {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: none;
}

.atak-combo-popup-bdl-phone a:hover,
.atak-combo-popup-bdl-phone a:focus-visible {
    text-decoration: underline;
}

.atak-combo-popup-bdl-inspectorate-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.atak-combo-popup-bdl-inspectorate-group + .atak-combo-popup-bdl-inspectorate-group {
    margin-top: 8px;
}

.atak-combo-popup-bdl-inspectorate-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 2px;
}

.atak-combo-popup-bdl-v {
    flex: 1 1 auto;
    color: #e2e8f0;
    word-break: break-word;
}

.atak-map-combo-popup--multi .leaflet-popup-content {
    max-height: min(70vh, 420px);
    overflow-y: auto;
}

.atak-map-combo-popup--multi .atak-combo-popup-panel {
    max-height: min(70vh, 420px);
    overflow-y: auto;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field input:not([type="color"]),
.admin-modal-panel--atak-waypoint .atak-paths-wp-field select,
.admin-modal-panel--atak-waypoint .atak-paths-wp-field textarea {
    width: 100%;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-field textarea {
    min-height: 4.5rem;
    resize: vertical;
    font: inherit;
    line-height: 1.4;
}

.admin-modal-panel--atak-waypoint .atak-paths-wp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.atak-paths-wp-coords,
.atak-paths-wp-placed {
    color: #94a3b8;
    font-size: 0.82rem;
    margin: 0 0 10px;
}

.atak-paths-map-modal-panel.is-fullscreen .atak-paths-map-body {
    flex: 1;
    min-height: 0;
}

.atak-paths-map-modal-panel.is-fullscreen .atak-paths-waypoints-panel,
.atak-paths-map-modal-panel.is-fullscreen .atak-paths-objects-panel {
    max-height: none;
}

.atak-paths-map-modal-panel.is-fullscreen .atak-paths-map {
    flex: 1;
    height: auto;
    min-height: 0;
}

.atak-paths-map-panel.is-fullscreen {
    display: none;
}

body.atak-paths-fullscreen-active {
    overflow: hidden;
}

/* Panel mapy — telefony (Android / iOS) */
@media (max-width: 768px) {
    :root {
        --atak-mobile-safe-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    }

    .atak-paths-map-modal-panel .atak-paths-map-head {
        padding: max(8px, env(safe-area-inset-top, 0px)) 44px 8px 10px;
        gap: 8px;
    }

    .atak-paths-map-modal-panel .atak-paths-map-brand {
        font-size: 1rem;
    }

    .atak-paths-map-modal-panel .atak-paths-map-legend {
        gap: 6px 10px;
        font-size: 0.72rem;
    }

    .atak-paths-panel-toggle {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .atak-paths-map-modal-panel .atak-paths-map {
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
    }

    .atak-paths-map-modal-panel .atak-paths-map-body,
    .atak-paths-map-modal-panel.is-fullscreen .atak-paths-map-body {
        flex-direction: column;
        min-height: 0;
    }

    .atak-paths-map-modal-panel .atak-paths-map-stage {
        flex: 1 1 42%;
        min-height: 30vh;
        order: 1;
    }

    .atak-paths-map-body.is-panel-collapsed .atak-paths-map-stage {
        min-height: 0;
        flex: 1 1 auto;
    }

    .atak-paths-map-modal-panel .atak-paths-panel-resizer {
        display: none !important;
    }

    .atak-paths-map-modal-panel .atak-paths-objects-panel {
        order: 2;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: 1 1 58%;
        max-height: none;
        min-height: 0;
        overflow: hidden;
        border-left: none;
        border-top: 1px solid var(--border);
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.42);
    }

    .atak-paths-map-body.is-panel-collapsed .atak-paths-objects-panel {
        display: none !important;
    }

    .atak-paths-map-modal-panel .atak-paths-objects-panel::before {
        content: "";
        display: block;
        width: 42px;
        height: 4px;
        margin: 8px auto 2px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.45);
        flex-shrink: 0;
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-panel-mobile-nav {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 0 auto;
        padding: 6px 10px 8px;
        border-bottom: 1px solid var(--border);
        background: rgba(15, 23, 42, 0.98);
    }

    .atak-paths-panel-mobile-menu-btn {
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.72);
        color: #e2e8f0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        touch-action: manipulation;
    }

    .atak-paths-panel-mobile-menu-btn.is-active {
        border-color: rgba(56, 189, 248, 0.55);
        color: #7dd3fc;
    }

    .atak-paths-panel-mobile-menu-icon {
        width: 22px;
        height: 22px;
        display: block;
    }

    .atak-paths-panel-mobile-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.92rem;
        font-weight: 700;
        color: #f1f5f9;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-objects-tabs,
    .atak-paths-map-body.is-mobile-panel .atak-paths-layers-subtabs,
    .atak-paths-map-body.is-mobile-panel .atak-paths-elements-subtabs,
    .atak-paths-map-body.is-mobile-panel .atak-paths-settings-subtabs {
        display: none !important;
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-objects-panel {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-objects-tab-panel.is-active:not([hidden]) {
        display: flex !important;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .atak-paths-map-body.is-mobile-panel.is-elements-main-tab .atak-paths-objects-tabs {
        display: flex !important;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .atak-paths-map-body.is-mobile-panel.is-elements-main-tab .atak-paths-objects-tab[data-objects-tab="layers"],
    .atak-paths-map-body.is-mobile-panel.is-elements-main-tab .atak-paths-objects-tab[data-objects-tab="settings"] {
        display: none !important;
    }

    .atak-paths-map-body.is-mobile-panel.is-elements-main-tab .atak-paths-elements-subtabs {
        display: flex !important;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .atak-paths-map-body.is-mobile-panel.is-layers-main-tab .atak-paths-layers-subtabs--icons {
        display: flex !important;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .atak-paths-map-body.is-mobile-panel.is-settings-main-tab .atak-paths-settings-subtabs {
        display: flex !important;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .atak-paths-map-body.is-mobile-panel #atak-paths-layers-sub-objects.is-active,
    .atak-paths-map-body.is-mobile-panel #atak-paths-layers-sub-active.is-active {
        overflow-y: visible;
    }

    .atak-paths-map-body.is-mobile-panel #atak-paths-tab-elements.is-active {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .atak-paths-map-body.is-mobile-panel #atak-paths-tab-layers.is-active {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .atak-paths-map-body.is-mobile-panel #atak-paths-tab-settings.is-active {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .atak-paths-map-body.is-mobile-panel #atak-paths-tab-weather.is-active {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .atak-paths-map-body.is-mobile-panel #atak-paths-tab-bsp.is-active {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-weather-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px)));
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-elements-subpanel.is-active,
    .atak-paths-map-body.is-mobile-panel .atak-paths-layers-subpanel.is-active,
    .atak-paths-map-body.is-mobile-panel .atak-paths-settings-subpanel.is-active {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px)));
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-bdl-groups,
    .atak-paths-map-body.is-mobile-panel .atak-paths-dp-groups,
    .atak-paths-map-body.is-mobile-panel .atak-paths-osm-list {
        overflow: visible;
        flex: none;
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-objects-list,
    .atak-paths-map-body.is-mobile-panel .atak-paths-users-list {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding-bottom: var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px)));
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-settings-panel {
        padding-bottom: calc(12px + var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px))));
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-panel-mobile-menu {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 620;
    }

    .atak-paths-map-body.is-mobile-panel .atak-paths-panel-mobile-menu[hidden] {
        display: none !important;
    }

    .atak-paths-panel-mobile-menu-backdrop {
        position: absolute;
        inset: 0;
        border: none;
        padding: 0;
        background: rgba(2, 6, 23, 0.55);
        cursor: pointer;
    }

    .atak-paths-panel-mobile-menu-sheet {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: min(78vh, 640px);
        display: flex;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        border-top: 1px solid var(--border);
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.45);
        padding-bottom: var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px)));
    }

    .atak-paths-panel-mobile-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        color: #e2e8f0;
        font-size: 0.88rem;
        font-weight: 700;
        flex: 0 0 auto;
    }

    .atak-paths-panel-mobile-menu-close {
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: #94a3b8;
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        touch-action: manipulation;
    }

    .atak-paths-panel-mobile-menu-nav {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 8px 10px calc(14px + var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px))));
        flex: 1 1 auto;
        min-height: 0;
    }

    .atak-paths-panel-mobile-menu-group {
        margin-bottom: 12px;
    }

    .atak-paths-panel-mobile-menu-group-title {
        margin: 0 0 6px;
        padding: 0 6px;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #64748b;
    }

    .atak-paths-panel-mobile-menu-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .atak-paths-panel-mobile-menu-item {
        width: 100%;
        text-align: left;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: #e2e8f0;
        font-size: 0.92rem;
        font-weight: 600;
        padding: 12px 12px;
        min-height: 48px;
        cursor: pointer;
        touch-action: manipulation;
    }

    .atak-paths-panel-mobile-menu-item:hover,
    .atak-paths-panel-mobile-menu-item:focus-visible {
        background: rgba(56, 189, 248, 0.1);
        outline: none;
    }

    .atak-paths-panel-mobile-menu-item.is-active {
        background: rgba(56, 189, 248, 0.16);
        color: #7dd3fc;
        box-shadow: inset 3px 0 0 #38bdf8;
    }

    .atak-paths-objects-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    /* Zakładki ukryte na mobile — nawigacja przez menu hamburger */
    .atak-paths-map-body.is-mobile-panel .atak-paths-objects-tabs {
        display: none !important;
    }

    .atak-paths-objects-tabs::-webkit-scrollbar {
        display: none;
    }

    .atak-paths-objects-tab {
        flex: 0 0 auto;
        min-width: 48px;
        min-height: 48px;
        padding: 12px 10px;
        touch-action: manipulation;
    }

    .atak-paths-objects-tab-icon {
        width: 22px;
        height: 22px;
    }

    .atak-paths-objects-tab-tip {
        display: none;
    }

    .atak-paths-map-body:not(.is-mobile-panel) .atak-paths-layers-subtabs,
    .atak-paths-map-body:not(.is-mobile-panel) .atak-paths-elements-subtabs,
    .atak-paths-map-body:not(.is-mobile-panel) .atak-paths-settings-subtabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .atak-paths-map-body:not(.is-mobile-panel) .atak-paths-elements-subtabs .atak-paths-objects-tab {
        flex: 0 0 auto;
        min-width: 56px;
        min-height: 56px;
        padding: 8px 6px 10px;
        touch-action: manipulation;
    }

    .atak-paths-elements-subtabs .atak-paths-elements-subtab-label {
        font-size: 0.7rem;
    }

    .atak-paths-map-body:not(.is-mobile-panel) .atak-paths-layers-subtab,
    .atak-paths-map-body:not(.is-mobile-panel) .atak-paths-settings-subtab {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 10px 12px;
        touch-action: manipulation;
    }

    .atak-paths-map-modal-panel .atak-paths-objects-panel {
        position: relative;
    }

    .atak-paths-objects-head {
        padding: 10px 12px;
    }

    .atak-paths-objects-list,
    .atak-paths-users-list,
    .atak-paths-settings-panel,
    #atak-paths-tab-elements .atak-paths-elements-subpanel.is-active,
    #atak-paths-tab-layers .atak-paths-layers-subpanel.is-active {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .atak-paths-objects-panel input,
    .atak-paths-objects-panel select,
    .atak-paths-objects-panel textarea {
        font-size: 16px;
    }

    .atak-paths-user-main {
        padding: 12px 10px;
    }

    .atak-paths-user-meta {
        min-height: 44px;
        justify-content: center;
    }

    .atak-paths-user-tracks-btn,
    .atak-paths-user-track-map {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .atak-paths-objects-item {
        padding: 12px 10px;
        min-height: 52px;
    }

    .atak-paths-objects-list--stacked .atak-paths-objects-item--stacked,
    .atak-paths-measures-list .atak-paths-objects-item--measure {
        gap: 12px;
        padding: 12px 10px;
    }

    .atak-paths-objects-list--stacked .atak-paths-objects-actions--stacked,
    .atak-paths-measures-list .atak-paths-objects-actions--measure {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .atak-paths-objects-actions .btn-compact,
    .atak-paths-objects-list--stacked .atak-paths-objects-actions--stacked .btn-compact,
    .atak-paths-measures-list .atak-paths-objects-actions--measure .btn-compact {
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
    }

    .atak-paths-map-tools {
        top: auto;
        bottom: calc(12px + var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px))));
        transform: none;
    }

    .atak-paths-map-body.is-mobile-panel:not(.is-panel-collapsed) .atak-paths-map-tools {
        bottom: 12px;
    }

    .atak-paths-map-mode-bars {
        left: 8px;
        right: 8px;
        bottom: calc(8px + var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px))));
    }

    .atak-paths-map-body.is-mobile-panel:not(.is-panel-collapsed) .atak-paths-map-mode-bars {
        bottom: 8px;
    }

    .atak-paths-map-search-panel {
        top: 8px;
        left: 8px;
        right: 8px;
        max-width: none;
    }

    .atak-paths-fire-dock {
        left: 8px;
        right: 8px;
        bottom: calc(8px + var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px))));
    }

    .atak-paths-map-body.is-mobile-panel:not(.is-panel-collapsed) .atak-paths-fire-dock {
        bottom: 8px;
    }

    .atak-paths-map-modal-panel .atak-paths-map .leaflet-control-scale {
        margin: 0 0 calc(14px + var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px)))) 14px !important;
    }

    .atak-paths-map-body.is-mobile-panel:not(.is-panel-collapsed) .atak-paths-map .leaflet-control-scale {
        margin: 0 0 14px 14px !important;
    }

    .atak-paths-map-modal-panel .atak-paths-map .leaflet-bottom.leaflet-right {
        margin-bottom: var(--atak-mobile-safe-bottom, max(16px, env(safe-area-inset-bottom, 0px)));
    }

    .atak-paths-map-body.is-mobile-panel:not(.is-panel-collapsed) .atak-paths-map .leaflet-bottom.leaflet-right {
        margin-bottom: 0;
    }

    .atak-paths-measure-toolbar,
    .atak-paths-draw-toolbar {
        flex-wrap: wrap;
        gap: 6px;
        max-width: 100%;
        max-height: 34vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

}

@media (max-width: 640px) {
    .atak-paths-map-tools {
        right: 8px;
        gap: 6px;
    }

    .atak-paths-map-tool {
        width: 44px;
        height: 44px;
        touch-action: manipulation;
    }

    .atak-paths-map-tool-icon {
        width: 22px;
        height: 22px;
    }

    .atak-paths-map-tool-tip {
        display: none;
    }

}

.atak-paths-weather-intro {
    margin: 0 0 10px;
    padding-top: 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--muted, #64748b);
}

.atak-paths-weather-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 12px 12px;
}

#atak-paths-tab-weather .atak-paths-objects-head {
    flex-shrink: 0;
}

.atak-paths-weather-toolbar {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.atak-paths-weather-location {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #e2e8f0;
    font-weight: 600;
}

.atak-paths-weather-toolbar--bsp .atak-paths-weather-actions {
    order: 1;
}

.atak-paths-bsp-location-btn {
    order: 2;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #e2e8f0;
    font-weight: 600;
    cursor: pointer;
}

.atak-paths-bsp-location-btn:hover,
.atak-paths-bsp-location-btn:focus-visible {
    color: #7dd3fc;
    text-decoration: underline;
    outline: none;
}

.atak-paths-bsp-dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 4px;
}

.atak-paths-bsp-dashboard:not(.is-ready),
.atak-paths-bsp-dashboard[hidden] {
    display: none;
}

.atak-paths-bsp-dashboard-tile {
    position: relative;
    display: block;
    width: 100%;
    min-height: 64px;
    padding: 8px;
    margin: 0;
    border-radius: 10px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    background: rgba(30, 58, 95, 0.55);
    text-align: center;
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.atak-paths-bsp-dashboard-tile:hover,
.atak-paths-bsp-dashboard-tile:focus-visible {
    border-color: rgba(125, 211, 252, 0.5);
    background: rgba(30, 58, 95, 0.78);
    outline: none;
    box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.25);
}

.atak-paths-bsp-dashboard-tile.is-ok {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(20, 83, 45, 0.28);
}

.atak-paths-bsp-dashboard-tile.is-caution {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(120, 53, 15, 0.32);
}

.atak-paths-bsp-dashboard-tile.is-warn {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.32);
}

.atak-paths-bsp-dashboard-tile__label {
    display: block;
    margin: 0 0 4px;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.2;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.atak-paths-bsp-dashboard-tile__value {
    display: block;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.15;
    color: #f1f5f9;
}

.atak-paths-bsp-dashboard-tile__value.is-empty {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
}

.atak-paths-bsp-tile-detail__value {
    margin: 0 0 12px;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
    color: #f1f5f9;
}

.atak-paths-bsp-tile-detail__row {
    margin: 0 0 10px;
}

.atak-paths-bsp-tile-detail__row:last-child {
    margin-bottom: 0;
}

.atak-paths-bsp-tile-detail__meta--compact {
    padding: 8px 0 10px;
}

.atak-paths-bsp-tile-detail__row--meta-line {
    margin: 0 0 4px;
}

.atak-paths-bsp-tile-detail__row--meta-line:last-child {
    margin-bottom: 0;
}

.atak-paths-bsp-tile-detail__row--location .atak-paths-bsp-tile-detail__row-value,
.atak-paths-bsp-tile-detail__row--time-source .atak-paths-bsp-tile-detail__row-value {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    color: #cbd5e1;
}

.atak-paths-bsp-tile-detail__row--location .atak-paths-bsp-tile-detail__row-value {
    color: #e2e8f0;
}

.atak-paths-bsp-tile-detail__row-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 3px;
}

.atak-paths-bsp-tile-detail__row-value {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.45;
    color: #f1f5f9;
    word-break: break-word;
}

.atak-paths-weather-alert-panel.is-bsp-detail-view .atak-paths-bsp-tile-detail__row-value {
    color: #f1f5f9;
}

.atak-paths-bsp-tile-detail__note {
    margin: 10px 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #94a3b8;
}

.atak-paths-weather-section.is-highlighted {
    box-shadow: inset 0 0 0 2px rgba(125, 211, 252, 0.55);
    border-radius: 8px;
    transition: box-shadow 0.25s ease;
}

.atak-paths-weather-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.atak-paths-panel-icon-btn {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
    opacity: 0.72;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    line-height: 0;
    touch-action: manipulation;
}

.atak-paths-panel-icon-btn-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

.atak-paths-panel-icon-btn-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: opacity 0.15s ease;
    z-index: 2;
}

.atak-paths-panel-icon-btn:hover,
.atak-paths-panel-icon-btn:focus-visible {
    opacity: 1;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.24);
    outline: none;
}

.atak-paths-panel-icon-btn:hover .atak-paths-panel-icon-btn-tip,
.atak-paths-panel-icon-btn:focus-visible .atak-paths-panel-icon-btn-tip {
    opacity: 1;
}

.atak-paths-panel-icon-btn.is-active {
    opacity: 1;
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(14, 116, 144, 0.28);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.22);
}

.atak-paths-panel-icon-btn--sky.is-active,
.atak-paths-panel-icon-btn--sky:hover,
.atak-paths-panel-icon-btn--sky:focus-visible {
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.45);
}

.atak-paths-panel-icon-btn:disabled {
    opacity: 0.28;
    cursor: not-allowed;
    pointer-events: none;
}

.atak-paths-bsp-kp-alert-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(167, 139, 250, 0.45);
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.16);
    color: #ddd6fe;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.atak-paths-bsp-kp-alert-btn:hover,
.atak-paths-bsp-kp-alert-btn:focus-visible,
.atak-paths-bsp-kp-alert-btn.is-active {
    border-color: rgba(167, 139, 250, 0.85);
    background: rgba(139, 92, 246, 0.28);
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.18);
    color: #ede9fe;
    outline: none;
}

.atak-paths-bsp-kp-alert-btn.is-kp-high,
.atak-paths-bsp-kp-alert-btn.is-kp-high:hover,
.atak-paths-bsp-kp-alert-btn.is-kp-high:focus-visible,
.atak-paths-bsp-kp-alert-btn.is-kp-high.is-active {
    border-color: rgba(248, 113, 113, 0.85);
    background: rgba(239, 68, 68, 0.28);
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.18);
    color: #fecaca;
}

.atak-paths-bsp-kp-alert-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.atak-paths-bsp-kp-alert-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 28px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.atak-paths-bsp-kp-alert-value {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #ddd6fe;
    font-variant-numeric: tabular-nums;
}

.atak-paths-bsp-kp-alert-text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #e2e8f0;
}

.atak-paths-weather-status {
    margin: 0 0 10px;
    min-height: 1.2em;
    font-size: 0.76rem;
    color: #94a3b8;
}

.atak-paths-weather-status.is-ok {
    color: #86efac;
}

.atak-paths-weather-status.is-error {
    color: #fca5a5;
}

.atak-paths-weather-content.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.atak-paths-weather-source {
    margin: 0 0 12px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.atak-paths-weather-section {
    margin-bottom: 10px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.atak-paths-weather-section.is-headerless .atak-paths-weather-section__body {
    padding: 10px 12px;
    border-top: none;
}

.atak-paths-weather-section__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}

.atak-paths-weather-section__head:hover {
    background: rgba(148, 163, 184, 0.06);
}

.atak-paths-weather-section__toggle {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 0 2px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.atak-paths-weather-section__toggle-spacer {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-top: 1px;
}

.atak-paths-weather-section.is-pinned .atak-paths-weather-section__head {
    cursor: default;
}

.atak-paths-weather-section.is-pinned .atak-paths-weather-section__head:hover {
    background: transparent;
}

.atak-paths-weather-section__head-text {
    flex: 1 1 auto;
    min-width: 0;
}

.atak-paths-weather-section__body {
    padding: 0 12px 10px 34px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.atak-paths-weather-section.is-collapsed .atak-paths-weather-section__body {
    display: none;
}

.atak-paths-weather-section__title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
}

.atak-paths-weather-section__sub {
    margin: 4px 0 0;
    font-size: 0.74rem;
    color: #cbd5e1;
}

.atak-paths-weather-section__dist {
    display: inline-block;
    margin-left: 4px;
    color: #94a3b8;
}

.atak-paths-weather-fields {
    margin: 0;
    display: grid;
    gap: 6px;
}

.atak-paths-weather-field {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    font-size: 0.76rem;
}

.atak-paths-weather-field dt {
    margin: 0;
    color: #94a3b8;
    font-weight: 500;
}

.atak-paths-weather-field dd {
    margin: 0;
    color: #f1f5f9;
    font-weight: 600;
}

.atak-paths-weather-empty {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.atak-paths-weather-warning {
    padding: 8px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.atak-paths-weather-warning:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.atak-paths-weather-warning__title {
    margin: 0 0 4px;
    font-size: 0.82rem;
    color: #fde68a;
}

.atak-paths-weather-warning__text,
.atak-paths-weather-warning__comment,
.atak-paths-weather-warning__office,
.atak-paths-weather-warning__valid {
    margin: 0 0 4px;
    font-size: 0.74rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.atak-paths-weather-warning__valid {
    color: #94a3b8;
    font-size: 0.7rem;
}

.atak-paths-bsp-summary {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.55);
}

.atak-paths-bsp-summary.is-ok {
    border-color: rgba(52, 211, 153, 0.45);
}

.atak-paths-bsp-summary.is-caution {
    border-color: rgba(251, 191, 36, 0.5);
}

.atak-paths-bsp-summary.is-warn {
    border-color: rgba(248, 113, 113, 0.55);
}

.atak-paths-bsp-summary__label {
    margin: 0;
    font-weight: 600;
    line-height: 1.45;
    color: #f1f5f9;
}

.atak-paths-bsp-summary__notes {
    margin: 10px 0 0;
    padding: 0;
}

.atak-paths-bsp-summary__note {
    margin: 0 0 6px;
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.45;
}

.atak-paths-bsp-summary__note:last-child {
    margin-bottom: 0;
}

.atak-paths-bsp-cat {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    vertical-align: middle;
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
}

.atak-paths-bsp-cat.is-ok {
    border-color: rgba(52, 211, 153, 0.55);
    color: #6ee7b7;
}

.atak-paths-bsp-cat.is-caution {
    border-color: rgba(251, 191, 36, 0.55);
    color: #fcd34d;
}

.atak-paths-bsp-cat.is-warn {
    border-color: rgba(248, 113, 113, 0.55);
    color: #fca5a5;
}

.atak-paths-bsp-kp-subtitle {
    margin: 12px 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.atak-paths-bsp-kp-current {
    margin: 0 0 14px;
    padding: 16px 18px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.55);
}

.atak-paths-bsp-kp-current.is-ok {
    border-color: rgba(52, 211, 153, 0.45);
}

.atak-paths-bsp-kp-current.is-caution {
    border-color: rgba(251, 191, 36, 0.5);
}

.atak-paths-bsp-kp-current.is-warn {
    border-color: rgba(248, 113, 113, 0.55);
}

.atak-paths-bsp-kp-current__label {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}

.atak-paths-bsp-kp-current__value {
    margin: 0;
    font-size: clamp(2.4rem, 8vw, 3.25rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
}

.atak-paths-bsp-kp-current.is-ok .atak-paths-bsp-kp-current__value {
    color: #6ee7b7;
}

.atak-paths-bsp-kp-current.is-caution .atak-paths-bsp-kp-current__value {
    color: #fcd34d;
}

.atak-paths-bsp-kp-current.is-warn .atak-paths-bsp-kp-current__value {
    color: #fca5a5;
}

.atak-paths-bsp-kp-current__meta {
    margin: 10px 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: #cbd5e1;
}

.atak-paths-bsp-kp-details {
    margin-top: 4px;
}

.atak-paths-bsp-kp-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.atak-paths-bsp-kp-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    font-size: 0.78rem;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}

.atak-paths-bsp-kp-list li:last-child {
    border-bottom: none;
}

.atak-paths-bsp-wind-profile__meta,
.atak-paths-bsp-wind-profile__note {
    margin: 0 0 10px;
    font-size: 0.74rem;
    line-height: 1.45;
    color: #94a3b8;
}

.atak-paths-bsp-wind-profile__note {
    margin-top: 10px;
    margin-bottom: 0;
}

.atak-paths-bsp-wind-chart-svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 10px;
}

.atak-paths-bsp-wind-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 10px;
}

.atak-paths-bsp-wind-legend__item {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.atak-paths-bsp-wind-legend__item.is-wind-caution {
    color: #fdba74;
    background: rgba(251, 146, 60, 0.14);
    border-color: rgba(251, 146, 60, 0.35);
}

.atak-paths-bsp-wind-legend__item.is-wind-warn {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.35);
}

.atak-paths-bsp-wind-legend__item.is-wind-mean {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
}

.atak-paths-bsp-wind-legend__item.is-wind-gust {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.4);
}

.atak-paths-bsp-wind-legend__swatch {
    display: inline-block;
    width: 14px;
    height: 0;
    margin-right: 6px;
    border-top: 2px solid currentColor;
    vertical-align: middle;
}

.atak-paths-bsp-wind-legend__item.is-wind-gust .atak-paths-bsp-wind-legend__swatch {
    border-top-style: dashed;
}

.atak-paths-bsp-wind-profile__note--compact {
    margin-top: 6px;
    font-size: 0.72rem;
}

.atak-paths-bsp-wind-table__gust.is-wind-warn {
    color: #fca5a5;
}

.atak-paths-bsp-wind-table__gust.is-wind-caution {
    color: #fdba74;
}

.atak-paths-bsp-wind-table__gust.is-wind-gust {
    color: #fcd34d;
}

.atak-paths-bsp-wind-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.atak-paths-bsp-wind-table th,
.atak-paths-bsp-wind-table td {
    padding: 5px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}

.atak-paths-bsp-wind-table th {
    color: #94a3b8;
    font-weight: 600;
}

.atak-paths-bsp-wind-table td:last-child,
.atak-paths-bsp-wind-table th:last-child {
    text-align: right;
}

.atak-paths-bsp-wind-table tr.is-wind-caution td {
    color: #fdba74;
    background: rgba(251, 146, 60, 0.1);
}

.atak-paths-bsp-wind-table tr.is-wind-warn td {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
}

.atak-paths-bsp-taf-periods {
    margin: 0 0 10px;
    padding-left: 1.1rem;
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.45;
}

.atak-paths-bsp-taf-periods li {
    margin: 0 0 6px;
}

.atak-paths-bsp-taf-periods li:last-child {
    margin-bottom: 0;
}

.atak-paths-bsp-raw {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(51, 65, 85, 0.65);
    font-size: 0.72rem;
    line-height: 1.45;
    color: #94a3b8;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.admin-modal-panel--atak-comment textarea {
    width: 100%;
    min-height: 120px;
    margin-top: 8px;
}

.atak-paths-comment-track {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0 0 8px;
}

/* Aplikacja Android Capacitor — panel uprawnień GPS */
.taksar-cap-setup-banner {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 100000;
    max-height: 55vh;
    overflow-y: auto;
    padding: 12px 14px calc(12px + env(safe-area-inset-top, 0px));
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: rgba(120, 53, 15, 0.97);
    border-bottom: 2px solid #f59e0b;
    color: #fef3c7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    font-size: 0.9rem;
    line-height: 1.45;
}

.taksar-cap-setup-banner__head p {
    margin: 6px 0 10px;
    color: #fde68a;
}

.taksar-cap-setup-banner__issue {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.taksar-cap-setup-banner__text {
    flex: 1 1 200px;
}

.taksar-cap-setup-banner__btn {
    flex: 0 0 auto;
    border: 1px solid #fbbf24;
    background: #b45309;
    color: #fffbeb;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.taksar-cap-setup-banner__btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.taksar-cap-setup-banner__foot {
    margin-top: 4px;
    text-align: right;
}

.taksar-cap-setup-banner__dismiss {
    border: none;
    background: transparent;
    color: #fcd34d;
    text-decoration: underline;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 0;
}

html.taksar-cap-setup-active .main-header {
    margin-top: 0;
}

html.taksar-cap-setup-active.admin-page .atak-paths-map-head {
    top: auto;
}
