/* GIS CCTV Camera Monitoring - Nagar Parishad Sultanganj */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #020617;
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.4);
    --accent-light: #eff6ff;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --surface: rgba(255, 255, 255, 0.85);
    --bg-main: #f8fafc;
    --border-color: rgba(226, 232, 240, 0.8);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --header-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(226, 232, 240, 0.8);
}

[data-theme='dark'] {
    --primary: #000000;
    --accent: #60a5fa;
    --accent-glow: rgba(96, 165, 250, 0.4);
    --accent-light: rgba(30, 41, 59, 0.5);
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --surface: rgba(15, 23, 42, 0.8);
    --bg-main: #020617;
    --border-color: rgba(30, 41, 59, 0.6);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --header-bg: rgba(6, 78, 59, 0.95);
    /* Deep emerald green for dark mode */
    --glass-border: rgba(16, 185, 129, 0.2);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    background-image:
        radial-gradient(at 0% 0%, hsla(225, 39%, 30%, 0.1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 20%, 0.1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(225, 39%, 30%, 0.1) 0, transparent 50%);
    color: var(--text-main);
    letter-spacing: -0.015em;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    position: relative;
}

/* Base Overrides for Dark Mode Compatibility */
.text-muted {
    color: var(--text-muted) !important;
}

::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
}

/* Background Decorations */
.bg-blur-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--accent);
    filter: blur(140px);
    opacity: 0.12;
    border-radius: 50%;
}

.blob-1 {
    top: -200px;
    right: -100px;
    background: #3b82f6;
}

.blob-2 {
    bottom: -200px;
    left: -100px;
    background: #10b981;
}

.blob-3 {
    top: 40%;
    left: 30%;
    background: #6366f1;
    width: 400px;
    height: 400px;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    color: var(--accent);
    opacity: 0.03;
    pointer-events: none;
}

[data-theme='dark'] .blob {
    opacity: 0.18;
}

[data-theme='dark'] .bg-pattern {
    opacity: 0.05;
}

.fw-extrabold {
    font-weight: 800;
}

.text-accent {
    color: var(--accent);
}

[data-theme='dark'] body {
    background-image:
        radial-gradient(at 0% 0%, hsla(225, 80%, 15%, 0.2) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(217, 91%, 32%, 0.2) 0, transparent 50%);
}

/* Header & Branding */
.custom-header {
    background-color: var(--header-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    height: 76px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.premium-logo {
    background: linear-gradient(135deg, var(--accent) 0%, #312e81 100%);
    box-shadow: 0 0 25px var(--accent-glow), inset 0 0 10px rgba(255, 255, 255, 0.2);
    color: white !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-box:hover .premium-logo {
    transform: rotate(15deg) scale(1.1);
}

.gradient-text {
    background: linear-gradient(to right, #60a5fa, #a78bfa, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
}

[data-theme='light'] .gradient-text {
    background: linear-gradient(to right, #1d4ed8, #4338ca, #6d28d9);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.navbar-brand {
    font-size: 1.25rem !important;
    letter-spacing: -0.03em;
    color: var(--text-main) !important;
}

.header-right-text {
    color: var(--text-main);
    font-weight: 600 !important;
}

/* Premium Theme Switch */
.theme-switch-container {
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 0;
    width: 62px;
    height: 32px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-switch-container:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.theme-switch-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    /* Balanced padding */
    position: relative;
}

.toggle-sun,
.toggle-moon {
    font-size: 13px;
    z-index: 1;
    transition: all 0.3s ease;
}

.toggle-sun {
    color: #facc15;
}

.toggle-moon {
    color: #94a3b8;
}

.switch-handle {
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    left: 4px;
    /* Centered */
    top: 4px;
    /* Centered (32-24)/2 */
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Night Mode Switch Handle Position */
[data-theme='dark'] .switch-handle {
    transform: translateX(30px);
    background: #0f172a;
    box-shadow: inset 0 0 0 2px var(--accent);
}

[data-theme='dark'] .toggle-sun {
    opacity: 0.3;
}

[data-theme='dark'] .toggle-moon {
    color: #f1f5f9;
    opacity: 1;
}

[data-theme='dark'] .theme-switch-container {
    background: rgba(0, 0, 0, 0.4);
}

/* Card Image Backgrounds */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    background-repeat: repeat;
}

.stat-card:hover::before {
    opacity: 0.15;
}

.total-card::before {
    /* Tech Grid Image */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: pan-bg-diag 40s linear infinite;
}

.active-card::before {
    /* Dots Pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2310b981' fill-opacity='1' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    animation: pan-bg-up 20s linear infinite;
}

.speaker-card::before {
    /* Soundwave lines */
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20zM20 0h20v20H20V0z' fill='%238b5cf6' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    animation: pan-bg-right 25s linear infinite;
}

.sos-card::before {
    /* Alert stripes */
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2306b6d4' fill-opacity='1' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    animation: pan-bg-diag-reverse 20s linear infinite;
}

@keyframes pan-bg-diag {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: -120px -120px;
    }
}

@keyframes pan-bg-up {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 -120px;
    }
}

@keyframes pan-bg-right {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 120px 0;
    }
}

@keyframes pan-bg-diag-reverse {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 120px -120px;
    }
}

.card-body {
    position: relative;
    z-index: 1;
}

/* Main Dashboard Layout Refinements */
.main-wrapper {
    padding-top: 2rem;
    max-width: 1400px;
}

.dashboard-main-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.highlight-text {
    color: var(--accent);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    opacity: 0.2;
    border-radius: 2px;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

@media (max-width: 1200px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-stats-card {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-stats-card {
        grid-column: span 1;
    }
}

/* Refined Stat Cards */
/* Vibrant Stat Cards */
.stat-card {
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    border: 1.2px solid rgba(255, 255, 255, 0.1) !important;
}

.stat-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    position: relative;
    transition: transform 0.3s ease;
}

.stat-icon-box svg {
    width: 18px;
    height: 18px;
}

.custom-stat-number {
    font-size: 1.5rem;
    line-height: 1.1;
}

.stat-card:hover .stat-icon-box {
    transform: scale(1.1) rotate(5deg);
}

/* Colorful Card Variants */
.total-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    color: white !important;
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.4) !important;
}

.active-card {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%) !important;
    color: white !important;
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4) !important;
}

.speaker-card {
    background: linear-gradient(135deg, #4c1d95 0%, #8b5cf6 100%) !important;
    color: white !important;
    box-shadow: 0 10px 30px -5px rgba(139, 92, 246, 0.4) !important;
}

.sos-card {
    background: linear-gradient(135deg, #164e63 0%, #06b6d4 100%) !important;
    color: white !important;
    box-shadow: 0 10px 30px -5px rgba(6, 182, 212, 0.4) !important;
}

/* Base Icon Box for Colorful Cards */
.stat-icon-box {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card h6.card-subtitle {
    color: rgba(255, 255, 255, 0.8) !important;
}

.stat-card h2.custom-stat-number {
    color: white !important;
}

/* Animated Icon Definitions */
.total-card .stat-icon-box svg {
    animation: ani-scan 4s ease-in-out infinite;
    transform-origin: center;
}

.active-card .stat-icon-box svg {
    animation: ani-scan 3s ease-in-out infinite;
    transform-origin: center;
}

.speaker-card .stat-icon-box svg {
    animation: ani-wave 1.5s ease-in-out infinite;
}

.sos-card .stat-icon-box svg {
    animation: ani-flash-red 1s steps(2, start) infinite;
}

@keyframes ani-scan {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(20deg);
    }

    75% {
        transform: rotate(-20deg);
    }
}

@keyframes ani-vibrate {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(1px, 1px);
    }

    50% {
        transform: translate(-1px, -1px);
    }

    75% {
        transform: translate(1px, -1px);
    }

    100% {
        transform: translate(-1px, 1px);
    }
}

@keyframes ani-swing {

    0%,
    100% {
        transform: rotate(-15deg);
    }

    50% {
        transform: rotate(15deg);
    }
}

@keyframes ani-wave {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px currentColor);
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px currentColor);
    }
}

@keyframes ani-flash-red {
    0% {
        opacity: 1;
        color: inherit;
    }

    100% {
        opacity: 0.4;
        color: #ef4444;
    }
}

/* Colorful Card Text Overrides (Removed specific h2 colors as they are now white) */

/* Status Indicators - Updated for Colorful Backgrounds */
.trend-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.status-dot-active,
.status-dot-offline,
.status-dot-warning {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.status-dot-active::before,
.status-dot-offline::before,
.status-dot-warning::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px white, 0 0 4px rgba(0, 0, 0, 0.5) inset;
}

.chart-stats-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1.2px solid var(--border-color);
    border-radius: 20px;
    padding: 0.75rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-container {
    height: 90px !important;
    width: 90px !important;
    position: relative;
    margin-top: 5px;
}

[data-theme='dark'] .stat-card,
[data-theme='dark'] .chart-stats-card {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--accent) !important;
}

.card-subtitle {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: var(--text-muted) !important;
}

.display-6 {
    font-size: 2rem !important;
    font-weight: 800 !important;
    line-height: 1;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

/* Filters Glassmorphism panel */
.glass-panel {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.filter-section label {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.filter-section .form-control,
.filter-section .form-select {
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
    border-color: var(--border-color);
}

/* Map Professional Outer */
.map-outer-wrapper {
    border: 1px solid var(--border-color) !important;
    background: #f1f5f9;
}

.map-container {
    height: 600px;
    border-radius: 12px !important;
}

/* Professional Markers */
.marker-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.camera-marker-pin {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    background-color: var(--accent);
    transform: rotate(-45deg);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.camera-marker-pin:hover {
    transform: rotate(-45deg) scale(1.2);
    z-index: 1000;
}

.camera-marker-pin i {
    transform: rotate(45deg);
    color: white;
    font-size: 14px;
}

.camera-marker-pin.active {
    background-color: var(--success);
}

.camera-marker-pin.inactive {
    background-color: var(--danger);
}

.camera-marker-pin.maintenance {
    background-color: var(--warning);
}

/* Map & Sidebar Wrapper */
.gis-container {
    height: 700px;
    display: flex;
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.camera-list-sidebar {
    width: 340px;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-search-box {
    padding: 1.25rem;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-search-box .input-group {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar-search-box .input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    transform: translateY(-1px);
}

.sidebar-search-box .input-group-text {
    border: none;
    background: transparent;
    padding-left: 1rem;
    color: var(--accent);
}

.sidebar-search-box .form-control {
    border: none;
    background: transparent;
    padding: 0.6rem 1rem 0.6rem 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.sidebar-search-box .form-control:focus {
    box-shadow: none;
}

.camera-list-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.camera-item {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: var(--surface);
    color: var(--text-main);
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.camera-item:hover {
    background: var(--surface);
    transform: scale(1.01) translateX(4px);
    border-color: var(--accent);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.03);
}

.camera-item.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white !important;
}

.camera-item.active .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.camera-item.active i {
    color: white !important;
}

.camera-item .status-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

[data-theme='dark'] .camera-item .status-indicator-dot {
    border-color: var(--surface);
}

/* Map Overlay Controls */
.map-overlay-controls {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1000;
    display: flex;
    gap: 12px;
    padding: 8px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Fix Map Control Selects */
.map-overlay-controls select {
    background: transparent;
    color: var(--text-main);
    border: none;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s;
}

.map-overlay-controls select:hover {
    background-color: var(--accent-light);
}

/* Popup Live Feed Simulation */
.popup-live-feed {
    width: 100%;
    height: 120px;
    background: #000;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.popup-live-feed .cam-label {
    position: absolute;
    top: 8px;
    left: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    font-family: 'Courier New', monospace;
    text-shadow: 1px 1px 2px #000;
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
}

.popup-live-feed::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg,
            rgba(255, 0, 0, 0.03),
            rgba(0, 255, 0, 0.01),
            rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

.popup-live-feed .live-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #ff0000;
    font-size: 8px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.btn-nav-google {
    background: #4285F4;
    color: white !important;
    border: none;
    font-weight: 600;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-nav-google:hover {
    background: #357ae8;
}

/* Cluster Styling Professional */
.marker-cluster {
    background-color: rgba(30, 41, 59, 0.2) !important;
}

.marker-cluster div {
    background-color: var(--accent) !important;
    color: white !important;
    font-weight: 700 !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    width: 34px !important;
    height: 34px !important;
    margin-left: 3px !important;
    margin-top: 3px !important;
    line-height: 34px !important;
    border-radius: 50% !important;
    border: 2px solid white !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Modern Popup */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden;
    background: var(--surface) !important;
    color: var(--text-main) !important;
}

.leaflet-popup-tip {
    background: var(--surface) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 280px !important;
}

.camera-popup-header {
    background: var(--primary) !important;
    padding: 12px 16px !important;
    font-size: 0.95rem;
    line-height: 1.4;
}

.camera-popup-body {
    padding: 16px !important;
    background: var(--surface);
}

/* Pulse Badge Animation */
.pulse-badge {
    border-radius: 50px;
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    font-weight: 800;
    display: flex;
    align-items: center;
    border: none;
    background: rgba(220, 38, 38, 0.9) !important;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    display: inline-block;
    animation: grow-pulse 1.5s infinite ease-out;
}

@keyframes grow-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.btn-modern {
    padding: 0.6rem 1.25rem !important;
    font-size: 0.9rem !important;
    border-radius: 12px !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.custom-reset-btn {
    background: var(--surface);
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

.custom-reset-btn:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-container {
        height: 450px;
    }
}