:root {
    --bg-main: #0b0f19;
    --bg-card: #151d30;
    --bg-hover: #1e2942;
    --border: #2b3853;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #e11d48;
    --psp-color: #2563eb;
    --osp-color: #16a34a;
    --inne-color: #d97706;
    --broken-color: #dc2626;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--bg-main); color: var(--text); overflow: hidden; height: 100vh; }

.app-container { display: flex; flex-direction: column; height: 100vh; }

* {
  scrollbar-width: thin;
  scrollbar-color: #2b3a58 #0b1329;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0b1329;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #2a3d61;
  border-radius: 4px;
  border: 1px solid #162238;
}

::-webkit-scrollbar-thumb:hover {
  background: #3b5585;
}

.header-stack {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.top-nav-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 14px;
    background: #090d16;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 38px;
}

.brand-title {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.brand-logo {
    height: 36px;
    width: 32px;
    object-fit: contain;
    border-radius: 1px;
}

.action-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-nav-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    background: var(--bg-card);
    gap: 12px;
    flex-wrap: wrap;
    min-height: 44px;
}

.search-tools-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.city-search-box {
    position: relative;
    width: 220px;
}

.vehicle-search-box {
    display: flex;
    gap: 4px;
    align-items: center;
}

.vehicle-search-box input {
    font-size: 0.85em;
    padding: 5px 8px;
    width: 170px;
}

.main-workspace {
    display: flex;
    flex: 1;
    min-height: 0;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: bold; }
.incident-badge { background: var(--accent); color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.8em; }
.incident-number { font-size: 1.1em; color: #38bdf8; }

.command-level { display: flex; align-items: center; gap: 8px; font-size: 0.9em; }
.city-search-box { position: relative; width: 260px; }
.city-search-box input { width: 100%; padding: 6px 12px; border-radius: 4px; background: var(--bg-main); border: 1px solid var(--border); color: #fff; }
.search-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 4px; display: none; z-index: 2000; max-height: 200px; overflow-y: auto;
}
.dropdown-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 0.85em; }
.dropdown-item:hover { background: var(--bg-hover); }

.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none; 
    position: absolute; 
    left: 0;
    top: 100%;
    background: var(--bg-card); 
    min-width: 190px;
    border: 1px solid var(--border); 
    box-shadow: 0 8px 16px rgba(0,0,0,0.5); 
    z-index: 2000; 
    border-radius: 4px;
}
.dropdown-content a { color: var(--text); padding: 10px 14px; text-decoration: none; display: block; font-size: 0.9em; }
.dropdown-content a:hover { background: var(--bg-hover); }
.dropdown:hover .dropdown-content { display: block; }

.summary-bar {
    display: flex; gap: 3px; background: #0f172a; padding: 8px 16px;
    border-bottom: 1px solid var(--border); overflow-x: auto;
}
.summary-card {
    background: var(--bg-card); padding: 6px 12px; border-radius: 4px; border: 1px solid var(--border);
    font-size: 0.85em; white-space: nowrap;
}

.map-view { flex: 1; height: 100%; z-index: 1; }
.side-panel { width: 440px; background: var(--bg-card); border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; }

.panel-box { padding: 14px; border-bottom: 1px solid var(--border); }
.panel-box h3 { margin-bottom: 10px; font-size: 1em; color: #38bdf8; }

.realtime-clock { font-size: 0.9em; font-family: monospace; color: #22c55e; margin-bottom: 8px; text-align: right; }
.km-log-list { max-height: 220px; overflow-y: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.km-item { background: var(--bg-main); padding: 8px; border-radius: 4px; border-left: 3px solid #38bdf8; font-size: 0.85em; }
.km-head { display: flex; justify-content: space-between; font-size: 0.8em; color: var(--text-muted); margin-bottom: 4px; }
.km-tag { background: #334155; padding: 1px 4px; border-radius: 2px; }

.sectors-grid { display: flex; flex-direction: column; gap: 8px; }
.sector-card { background: var(--bg-main); padding: 8px 12px; border-radius: 4px; border-left: 4px solid #eab308; }
.sector-card.is-sztab { border-left-color: #ef4444; }
.sector-head { display: flex; justify-content: space-between; align-items: center; }
.badge-channel { background: #1e293b; border: 1px solid var(--border); padding: 2px 6px; border-radius: 3px; font-size: 0.8em; }
.sector-actions { margin-top: 6px; display: flex; gap: 6px; }

.btn { padding: 6px 12px; border: none; border-radius: 4px; cursor: pointer; color: white; background: #334155; font-size: 0.85em; }
.btn-primary { background: #0284c7; }
.btn-success { background: #16a34a; }
.btn-warning { background: #d97706; }
.btn-danger { background: #dc2626; }
.btn-error-del { background: #7f1d1d; }
.btn-outline { background: transparent; border: 1px solid var(--border); }
.btn-xs { padding: 2px 6px; font-size: 0.75em; }
.btn-block { width: 100%; }

.form-control { width: 100%; padding: 6px 10px; background: var(--bg-main); border: 1px solid var(--border); color: #fff; border-radius: 4px; font-size: 0.85em; }
.form-group { margin-bottom: 8px; }
.form-row { display: flex; gap: 8px; }
.input-inline { display: flex; gap: 6px; }
.hidden-form { display: none; }

.custom-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 9999; justify-content: center; align-items: center; }
.modal-dialog { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; width: auto; max-width: 95%; max-height: 90vh; overflow-y: auto; }
.modal-lg { width: 850px; }
.modal-header { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px; }
.close { cursor: pointer; font-size: 1.4em; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.85em; margin-top: 10px; }
.data-table th, .data-table td { padding: 8px; border: 1px solid var(--border); text-align: left; }
.data-table tr.v-type-psp td { color: #93c5fd; }
.data-table tr.v-type-osp td { color: #86efac; }
.data-table tr.v-type-inne td { color: #fde047; }
.data-table tr.v-status-uszkodzony td { color: #fca5a5 !important; background: rgba(220, 38, 38, 0.15); }

.badge-v-kind { padding: 2px 6px; border-radius: 3px; font-weight: bold; font-size: 0.85em; color: #fff; }
.badge-psp { background: var(--psp-color); }
.badge-osp { background: var(--osp-color); }
.badge-inne { background: var(--inne-color); }
.badge-broken { background: var(--broken-color); color: #fff; padding: 2px 4px; border-radius: 2px; font-size: 0.75em; }

.sector-map-label { background: #fbbf24; color: #000; font-weight: bold; border-radius: 3px; border: 1px solid #000; padding: 2px 4px; font-size: 0.75em; }
.qrcode-wrapper { display: flex; justify-content: center; padding: 15px; background: white; width: fit-content; margin: 0 auto 10px; border-radius: 6px; }

.user-session-info {
    font-size: 0.85em;
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
}
.user-session-info strong {
    color: #38bdf8;
    margin: 0 4px;
}
.modal-force-show {
    display: flex;
}
.error-text {
    color: #ef4444;
    font-size: 0.85em;
    margin-bottom: 8px;
    font-weight: 500;
}
.input-prefix-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}
.prefix-badge {
    background: #0284c7;
    color: #fff;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.95em;
}
.help-text {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}
.map-crosshair, .map-crosshair .leaflet-interactive {
    cursor: crosshair !important;
}

.command-info-bar {
    background: #1e293b;
    padding: 10px 16px;
    border-bottom: 1px solid #334155;
    color: #f8fafc;
}
.command-info-bar .location-field {
    margin-bottom: 8px;
}
.command-info-bar .location-field input {
    font-size: 1.05rem;
    font-weight: 600;
    border-color: #38bdf8;
}
.info-grid-staff {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.command-info-bar label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 3px;
    display: block;
}
.command-info-bar input.form-control {
    background: #0f172a;
    color: #fff;
    border: 1px solid #475569;
    padding: 5px 8px;
    font-size: 0.85rem;
    border-radius: 4px;
}

.summary-card.badge-services {
    background: #0f172a;
    border: 1px solid #334155;
}
.summary-card .badge-val {
    color: #38bdf8;
    font-weight: bold;
}

.sub-form-box {
    background: var(--bg-main);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}
.radio-group-services {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 5px;
}
.radio-group-services label {
    cursor: pointer;
    font-weight: normal;
    font-size: 0.9rem;
}

.leaflet-popup-content-wrapper {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}
.leaflet-popup-content {
    margin: 12px 14px;
    line-height: 1.3;
}
.sector-map-popup .btn {
    font-size: 0.75rem;
    padding: 3px 6px;
}
.map-color-picker-box {
    display: none;
    position: absolute;
    top: 10px;
    left: 50px;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 6px;
    align-items: center;
    gap: 8px;
    border: 1px solid #334155;
    color: #fff;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.btn-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transition: transform 0.15s ease;
}
.btn-color-swatch:hover,
.btn-color-swatch.active {
    transform: scale(1.25);
    border-color: #38bdf8;
}
#customDrawColor {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}
.badge-v-kind[draggable="true"] {
    cursor: grab;
    user-select: none;
}
.badge-v-kind[draggable="true"]:active {
    cursor: grabbing;
}

.custom-vehicle-marker {
    background: transparent;
    border: none;
}
.vehicle-map-badge {
    background: #1e293b;
    color: #fff;
    font-size: 0.78rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    border: 2px solid #38bdf8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: move;
}
.vehicle-map-badge.v-marker-psp { border-color: #ef4444; background: #7f1d1d; }
.vehicle-map-badge.v-marker-osp { border-color: #f59e0b; background: #78350f; }
.vehicle-map-badge.v-marker-inne { border-color: #3b82f6; background: #1e3a8a; }
.vehicle-map-badge.v-marker-broken { border-color: #dc2626; background: #450a0a; text-decoration: line-through; }
.leaflet-popup-content .btn-outline,
.vehicle-map-popup .btn-outline {
    color: #0f172a !important;
    border: 1px solid #64748b !important;
    background-color: #f8fafc !important;
}

.leaflet-popup-content .btn-outline:hover,
.vehicle-map-popup .btn-outline:hover {
    background-color: #e2e8f0 !important;
    color: #000000 !important;
    border-color: #334155 !important;
}
.btn-map-toggle {
    position: absolute;
    top: 10px;
    left: 50px;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(4px);
    color: #fff;
    border: 1px solid #334155;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-map-toggle:hover {
    background: #1e293b;
    border-color: #38bdf8;
}

.btn-map-toggle.is-hidden {
    background: #b91c1c;
    border-color: #ef4444;
}
.custom-vehicle-pictogram-marker {
    background: transparent;
    border: none;
}

.pictogram-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: move;
}

.tactical-pictogram {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.15s ease;
}

.tactical-pictogram:hover {
    transform: scale(1.1);
}

.tactical-pictogram.is-broken {
    filter: drop-shadow(0 0 4px #ef4444) brightness(0.9);
}

.pictogram-label {
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #38bdf8;
    white-space: nowrap;
    margin-top: -2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.pictogram-label.is-broken {
    border-color: #ef4444;
    color: #fca5a5;
    text-decoration: line-through;
}
.sector-card.drag-target-hover {
    border: 2px dashed #38bdf8 !important;
    background: rgba(56, 189, 248, 0.1) !important;
    transform: scale(1.01);
    transition: all 0.15s ease-in-out;
}
.sector-card.drag-target-hover * {
    pointer-events: none;
}

.badge-v-kind.is-selected {
    outline: 2px solid #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.9) !important;
    transform: translateY(-2px);
}
#modalAlert .modal-dialog {
    border-top: 4px solid #3b82f6;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}
.map-scroll-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.map-scroll-overlay.is-active {
    opacity: 1;
}
.app-container.is-idle-locked {
    filter: blur(8px) brightness(0.6);
    pointer-events: none;
    user-select: none;
    transition: filter 0.4s ease;
}
#modalAlert,
#modalConfirm {
    z-index: 999999 !important;
}
@keyframes pulse-pictogram-glow {
    0%, 100% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 6px #fbbf24); 
    }
    50% { 
        transform: scale(1.35); 
        filter: drop-shadow(0 0 16px #ef4444) drop-shadow(0 0 8px #f59e0b); 
    }
}

.custom-vehicle-pictogram-marker.search-highlighted-marker {
    z-index: 10000 !important;
}

.custom-vehicle-pictogram-marker.search-highlighted-marker .pictogram-wrapper {
    animation: pulse-pictogram-glow 1.1s infinite ease-in-out;
    transform-origin: center center;
}

@keyframes pulse-badge-border {
    0%, 100% { box-shadow: 0 0 0 2px #fbbf24; transform: scale(1.05); }
    50% { box-shadow: 0 0 12px 3px #ef4444; transform: scale(1.15); }
}

.badge-v-kind.search-highlighted-badge {
    animation: pulse-badge-border 0.9s infinite ease-in-out !important;
    border: 1px solid #ffffff !important;
    position: relative;
    z-index: 5;
}
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .submenu-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.dropdown-submenu-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--bg-card, #151d30);
    min-width: 210px;
    border: 1px solid var(--border, #2b3853);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    z-index: 2010;
}

.dropdown-submenu:hover .dropdown-submenu-content,
.dropdown-submenu.is-active .dropdown-submenu-content {
    display: block;
}
.module-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 15px;
}
.module-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.module-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.module-card-primary:hover {
    border-color: #38bdf8;
}
.module-card-accent:hover {
    border-color: #ef4444;
}
.module-icon {
    font-size: 2.4rem;
}
.module-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
}
.module-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.35;
}
.leaflet-tooltip.sector-map-label {
    font-size: 13px !important;
    font-weight: 500;
    line-height: 1.35;
    padding: 6px 10px !important;
    background-color: rgba(15, 23, 42, 0.92) !important;
    color: #ffffff !important;
    border: 1px solid #38bdf8 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
    text-align: center;
	pointer-events: auto !important;
    cursor: default;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.leaflet-tooltip.sector-map-label:hover,
.leaflet-tooltip.sector-map-label.is-hovered {
    z-index: 99999 !important;
    border: 2px solid #38bdf8 !important;
    background: rgba(15, 23, 42, 0.98) !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.8), 0 8px 24px rgba(0, 0, 0, 0.9) !important;
}
.leaflet-tooltip-top.sector-map-label:hover::before,
.leaflet-tooltip-top.sector-map-label.is-hovered::before {
    border-top-color: #38bdf8 !important;
}

.leaflet-tooltip.sector-map-label b {
    font-size: 14px;
    color: #38bdf8;
    display: inline-block;
    margin-bottom: 2px;
}

.leaflet-tooltip-top.sector-map-label::before {
    border-top-color: rgba(15, 23, 42, 0.92) !important;
}

.leaflet-control-geocoder {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}
.leaflet-control-geocoder-icon {
    filter: invert(1);
}
.leaflet-control-geocoder-form input {
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    padding: 6px 8px !important;
}
.leaflet-control-geocoder-alternatives {
    background: rgba(15, 23, 42, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f1f5f9 !important;
}
.leaflet-control-geocoder-alternatives a {
    color: #f1f5f9 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.leaflet-control-geocoder-alternatives a:hover,
.leaflet-control-geocoder-selected {
    background: rgba(56, 189, 248, 0.2) !important;
}
#modalSymbole.custom-modal {
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(2px) !important;
    pointer-events: none;
}
#modalSymbole .modal-dialog {
    pointer-events: auto;
    position: absolute;
    top: 60px;
    right: 20px;
    width: 440px;
    max-width: 94vw;
    margin: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.symbol-card {
    background: rgba(210, 214, 233, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
    cursor: grab;
    transition: all 0.18s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.symbol-card:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: translateY(-2px);
}
.symbol-card:active {
    cursor: grabbing;
}
.symbol-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    pointer-events: none;
}
.symbol-card span {
    font-size: 0.7rem;
    color: #f1f5f9;
    word-break: break-word;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
#kategoriaSymboliSelect {
    cursor: pointer;
    background-color: var(--bg-main);
    color: #f1f5f9;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#kategoriaSymboliSelect:hover,
#kategoriaSymboliSelect:focus {
    border-color: #38bdf8;
    outline: none;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

#kategoriaSymboliSelect option {
    background: #0f172a;
    color: #f1f5f9;
    padding: 6px;
}
.folder-card {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid #38bdf8;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 85px;
}
.folder-card:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}
.folder-card .folder-icon {
    font-size: 2.1rem;
    line-height: 1;
}
.folder-card .folder-name {
    font-size: 0.72rem;
    font-weight: bold;
    color: #38bdf8;
    word-break: break-word;
    line-height: 1.15;
}
.folder-card .folder-badge {
    font-size: 0.65rem;
    color: #94a3b8;
}

.folder-card-back {
    border-style: dashed;
    border-color: #f59e0b;
}
.folder-card-back .folder-name {
    color: #fbbf24;
}

.symbol-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow-x: auto;
    white-space: nowrap;
}
.symbol-breadcrumb span.sep {
    color: #64748b;
}
.symbol-breadcrumb a {
    color: #38bdf8;
    text-decoration: none;
    cursor: pointer;
}
.symbol-breadcrumb a:hover {
    text-decoration: underline;
    color: #fbbf24;
}
.leaflet-weather-control {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Segoe UI', sans-serif;
    color: #f1f5f9;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, border-color 0.2s;
}

.leaflet-weather-control:hover {
    background: rgba(30, 41, 59, 0.98);
    border-color: #38bdf8;
}

.wind-compass-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

.wind-arrow-icon {
    font-size: 20px;
    line-height: 1;
    color: #38bdf8;
    transform-origin: center center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.wind-data-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.wind-main-val {
    font-size: 0.95rem;
    font-weight: bold;
    color: #ffffff;
}

.wind-gust-val {
    font-size: 0.72rem;
    color: #94a3b8;
}

#map.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99990 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.leaflet-tooltip.drawing-tooltip {
    background: rgba(15, 23, 42, 0.94);
    color: #f1f5f9;
    border: 1px solid #f97316;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;
    line-height: 1.35;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    white-space: nowrap;
}

.leaflet-tooltip-top.drawing-tooltip::before {
    border-top-color: #f97316;
}
.leaflet-tooltip-bottom.drawing-tooltip::before {
    border-bottom-color: #f97316;
}
.leaflet-tooltip-left.drawing-tooltip::before {
    border-left-color: #f97316;
}
.leaflet-tooltip-right.drawing-tooltip::before {
    border-right-color: #f97316;
}

.leaflet-popup-content {
    font-size: 1.05rem !important;
    line-height: 1.45 !important;
}

.leaflet-popup-content input,
.leaflet-popup-content select,
.leaflet-popup-content textarea {
    font-size: 0.95rem !important;
}

.leaflet-popup-content .btn {
    font-size: 0.85rem !important;
    padding: 4px 8px !important;
}

.leaflet-control-layers-overlays label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 3px;
}

.leaflet-control-layers-overlays label > span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100%;
    text-align: left !important;
    gap: 4px;
}

.btn-layer-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto !important;
    padding: 0 4px;
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    border-radius: 3px;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-layer-del:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

#modalWybierzZdarzenie .modal-dialog {
    width: 460px;
    max-width: 95%;
}

/* SMARTFONY */
@media (max-width: 992px) {
    
    body {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
    }

    .app-container {
        height: auto !important;
        min-height: 100vh;
    }

    .top-nav-primary {
        height: auto !important;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 10px;
        gap: 8px;
    }

    .action-menu {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: flex-start;
    }

    .action-menu .btn-menu {
        font-size: 0.75rem;
        padding: 5px 8px;
        flex: 1 1 auto;
        text-align: center;
    }

    .user-session-info {
        width: 100%;
        justify-content: space-between;
        font-size: 0.78rem;
    }

    .top-nav-secondary {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 10px;
    }

    .search-tools-group {
        flex-direction: column;
        width: 100%;
        gap: 6px;
    }

    .city-search-box, 
    .vehicle-search-box {
        width: 100% !important;
    }

    .vehicle-search-box input {
        flex: 1;
        width: 100% !important;
    }

    .command-info-bar {
        padding: 8px 10px;
    }

    .info-grid-staff {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .main-workspace {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    #map.map-view {
        height: 50vh !important;
        min-height: 300px;
        width: 100% !important;
        flex: none !important;
    }

    .side-panel {
        width: 100% !important;
        height: auto !important;
        overflow-y: visible !important;
        border-left: none !important;
        border-top: 2px solid var(--border);
    }

    .map-view > div:first-child {
        flex-wrap: wrap;
        bottom: 8px !important;
        left: 8px !important;
        right: 8px !important;
        gap: 4px !important;
    }

    .btn-map-toggle {
        font-size: 0.72rem !important;
        padding: 4px 6px !important;
        flex: 1 1 auto;
        justify-content: center;
    }

    .floating-calc-panel {
        top: 8px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
    }

    #modalSymbole .modal-dialog {
        top: 8px !important;
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
    }

    .modal-dialog, 
    .modal-lg {
        width: 95% !important;
        max-width: 95% !important;
        margin: 12px auto !important;
    }

    .form-row {
        flex-direction: column !important;
        gap: 6px !important;
    }

    .module-cards-container {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .info-grid-staff {
        grid-template-columns: 1fr;
    }

    .command-info-bar .location-field input {
        font-size: 0.95rem;
    }

    .summary-card {
        font-size: 0.78rem;
        padding: 4px 8px;
    }
}

.btn-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.custom-vehicle-pictogram-marker:hover {
    z-index: 99999 !important;
}

.custom-vehicle-pictogram-marker:hover .pictogram-wrapper {
    z-index: 99999 !important;
}

.custom-vehicle-pictogram-marker:hover .pictogram-label {
    transform: scale(1.12);
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    background: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.9) !important;
}

.custom-vehicle-pictogram-marker:hover .tactical-pictogram {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.85)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.7));
}
/*.leaflet-marker-pane:has(.custom-vehicle-pictogram-marker:hover) {
    z-index: 1000 !important;
}
*/
.custom-sector-marker {
    background: transparent;
    border: none;
}

.sector-point-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fbbf24;
    border: 2px solid #000000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.sector-point-circle.is-sztab {
    background-color: #ef4444;
}

.custom-sector-marker:hover,
.custom-sector-marker:hover,
.custom-sector-marker.is-active-hover {
    z-index: 99999 !important;
}

.custom-sector-marker:hover .sector-point-circle,
.custom-sector-marker.is-active-hover .sector-point-circle {
    transform: scale(1.3);
    border-width: 3px;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.95);
}

.custom-sector-marker:hover .sector-point-circle.is-sztab,
.custom-sector-marker.is-active-hover .sector-point-circle.is-sztab {
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.95);
}

.help-pulse-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background-color: #f59e0b;
    color: #0f172a;
    font-weight: 900;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: pulseHelpAnimation 1.6s infinite;
    user-select: none;
    transition: transform 0.15s ease;
    z-index: 1200;
}

.help-pulse-marker:hover {
    transform: scale(1.25);
    background-color: #fbbf24;
}

@keyframes pulseHelpAnimation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.8);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}