/* AusDefCo Drone Management System - Futuristic Military Interface */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    /* Professional Dark Color Palette */
    --primary-accent: #4a90e2;
    --primary-light: #6ba3f0;
    --primary-dark: #2c5aa0;
    --accent-secondary: #5a6c7d;
    --danger-red: #e74c3c;
    --warning-amber: #f39c12;
    --success-green: #27ae60;

    /* Matrix/Cyber Theme Colors */
    --primary-matrix: #00ff88;
    --primary-cyan: #00d4ff;
    --primary-blue: #0099ff;

    /* Glass/Transparent Effects */
    --glass-bg: rgba(20, 25, 35, 0.85);
    --glass-border: rgba(74, 144, 226, 0.3);
    --glass-highlight: rgba(74, 144, 226, 0.1);

    /* Professional Dark Backgrounds */
    --bg-primary: #1a1d23;
    --bg-secondary: #2c3e50;
    --bg-tertiary: #34495e;
    --bg-surface: #252a34;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --text-muted: #78909c;
    --text-success: #27ae60;
    --text-warning: #f39c12;
    --text-danger: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', 'Orbitron', monospace;
    background:
        radial-gradient(circle at 20% 80%, rgba(74, 144, 226, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(90, 108, 125, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    overflow: hidden;
    font-weight: 400;
    letter-spacing: 0.5px;
    position: relative;
}

/* Subtle professional grid overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(74, 144, 226, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 144, 226, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.2;
}

/* Professional Toolbar */
.toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg,
        rgba(26, 29, 35, 0.95) 0%,
        rgba(44, 62, 80, 0.9) 50%,
        rgba(52, 73, 94, 0.85) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--primary-accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    box-shadow:
        0 2px 20px rgba(74, 144, 226, 0.2),
        0 0 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(74, 144, 226, 0.1);
}

.toolbar-left h1 {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-accent);
    text-shadow:
        0 0 8px rgba(74, 144, 226, 0.3),
        0 0 16px rgba(74, 144, 226, 0.2);
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    animation: pulse-glow 2s ease-in-out infinite;
}

.status-dot::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1px solid currentColor;
    animation: radar-ping 2s ease-out infinite;
}

.status-dot.online {
    background: var(--success-green);
    color: var(--success-green);
    box-shadow:
        0 0 12px var(--success-green),
        0 0 24px rgba(39, 174, 96, 0.3);
}

.status-dot.offline {
    background: var(--danger-red);
    color: var(--danger-red);
    box-shadow:
        0 0 12px var(--danger-red),
        0 0 24px rgba(231, 76, 60, 0.3);
}

.status-dot.connecting {
    background: var(--warning-amber);
    color: var(--warning-amber);
    box-shadow:
        0 0 12px var(--warning-amber),
        0 0 24px rgba(243, 156, 18, 0.3);
}

/* Futuristic Animations */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes radar-ping {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    70% {
        opacity: 0.3;
        transform: scale(1.8);
    }
    100% {
        opacity: 0;
        transform: scale(2.2);
    }
}


@keyframes hologram-flicker {
    0%, 100% { opacity: 1; }
    2% { opacity: 0.8; }
    4% { opacity: 1; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    98% { opacity: 1; }
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Futuristic Military Menu Items */
.menu-items {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-menu {
    position: relative;
    padding: 12px 24px;
    background: linear-gradient(135deg,
        rgba(74, 144, 226, 0.1) 0%,
        rgba(90, 108, 125, 0.05) 100%);
    color: var(--primary-accent);
    border: 1px solid rgba(74, 144, 226, 0.4);
    border-radius: 8px;
    font-family: 'Rajdhani', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(74, 144, 226, 0.2),
        transparent);
    transition: left 0.4s ease;
}

.btn-menu:hover {
    background: linear-gradient(135deg,
        rgba(74, 144, 226, 0.2) 0%,
        rgba(90, 108, 125, 0.1) 100%);
    border-color: var(--primary-accent);
    box-shadow:
        0 4px 12px rgba(74, 144, 226, 0.2),
        inset 0 1px 0 rgba(74, 144, 226, 0.2);
    transform: translateY(-1px);
    color: var(--text-primary);
}

.btn-menu:hover::before {
    left: 100%;
}

.btn-menu.active {
    background: linear-gradient(135deg,
        rgba(74, 144, 226, 0.3) 0%,
        rgba(39, 174, 96, 0.2) 100%);
    border-color: var(--primary-accent);
    box-shadow:
        0 4px 16px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(74, 144, 226, 0.3);
    color: var(--text-primary);
}

.btn-menu:active {
    transform: translateY(1px);
}

.control-buttons {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00b8e6, #0088bb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #333, #555);
    color: white;
    border: 1px solid #666;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #444, #666);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cesium Container */
.cesium-container {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

/* Override Cesium timeline to match our design */
.cesium-viewer-toolbar {
    background: rgba(26, 26, 46, 0.9) !important;
    border: 1px solid #00d4ff !important;
}

.cesium-button {
    background: rgba(51, 51, 51, 0.8) !important;
    border: 1px solid #666 !important;
}

.cesium-button:hover {
    background: rgba(68, 68, 68, 0.9) !important;
    border-color: #00d4ff !important;
}

/* Info Panel */
.info-panel {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 350px;
    max-height: calc(100vh - 120px);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border: 2px solid #00d4ff;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    z-index: 1500;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.info-panel.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.panel-header {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Ensure drone control panel close button is clickable */
.drone-control-panel .close-btn {
    position: relative;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
}

.drone-control-panel .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.panel-content {
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.info-section {
    margin-bottom: 25px;
}

.info-section h4 {
    color: #00d4ff;
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.info-item .label {
    color: #aaa;
    font-size: 0.9rem;
}

.info-item .value {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .toolbar {
        flex-wrap: wrap;
        height: auto;
        min-height: 70px;
        padding: 10px 20px;
    }

    .toolbar-right {
        gap: 20px;
    }

    .stats-container {
        gap: 15px;
    }

    .info-panel {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .toolbar {
        padding: 10px 15px;
    }

    .toolbar-left h1 {
        font-size: 1.2rem;
    }

    .stats-container {
        display: none;
    }

    .info-panel {
        width: calc(100vw - 30px);
        right: 15px;
    }

    .control-buttons {
        flex-wrap: wrap;
        gap: 5px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Cesium Credit Container - hide default credits */
.cesium-credit-textContainer {
    display: none !important;
}

/* Custom status indicators for drones */
.drone-status-connected {
    color: #00ff88;
    text-shadow: 0 0 8px #00ff88, 0 0 16px rgba(0, 255, 136, 0.5);
    font-weight: 600;
}
.drone-status-degraded {
    color: #ffaa00;
    text-shadow: 0 0 8px #ffaa00, 0 0 16px rgba(255, 170, 0, 0.5);
    font-weight: 600;
}
.drone-status-disconnected {
    color: #ff4444;
    text-shadow: 0 0 8px #ff4444, 0 0 16px rgba(255, 68, 68, 0.5);
    font-weight: 600;
}
.drone-status-maintenance {
    color: #00d4ff;
    text-shadow: 0 0 8px #00d4ff, 0 0 16px rgba(0, 212, 255, 0.5);
    font-weight: 600;
}

/* Futuristic Military Admin Panel */
.admin-panel {
    position: fixed;
    top: 80px;
    right: -650px;
    width: 620px;
    height: calc(100vh - 80px);
    background: linear-gradient(135deg,
        rgba(0, 5, 17, 0.95) 0%,
        rgba(0, 17, 34, 0.9) 50%,
        rgba(0, 34, 51, 0.85) 100%);
    backdrop-filter: blur(25px);
    border-left: 2px solid var(--primary-cyan);
    border-image: linear-gradient(180deg, var(--primary-matrix), var(--primary-cyan), var(--primary-blue)) 1;
    box-shadow:
        -10px 0 40px rgba(0, 0, 0, 0.7),
        -5px 0 25px rgba(0, 255, 255, 0.2),
        inset 2px 0 0 rgba(0, 255, 255, 0.1);
    overflow-y: auto;
    z-index: 999;
    transition: right 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: hologram-flicker 10s infinite;
}

.admin-panel.visible {
    right: 0;
}

.admin-section {
    margin-bottom: 20px;
    padding: 0 25px;
}

.admin-section h4 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-cyan);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, var(--primary-cyan), transparent) 1;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 0 10px var(--primary-cyan);
    position: relative;
}

.admin-section h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-matrix);
    box-shadow: 0 0 10px var(--primary-matrix);
}

.admin-list {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 20, 40, 0.3) 100%);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    padding: 16px;
    min-height: 80px;
    backdrop-filter: blur(10px);
}

.admin-item {
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.08) 0%,
        rgba(0, 153, 255, 0.05) 100%);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.admin-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--primary-cyan),
        transparent);
    transition: left 0.6s ease;
}

.admin-item:hover {
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.15) 0%,
        rgba(0, 153, 255, 0.1) 100%);
    border-color: var(--primary-cyan);
    box-shadow:
        0 5px 25px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(0, 255, 255, 0.3);
    transform: translateX(5px);
}

.admin-item:hover::before {
    left: 100%;
}

.admin-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.admin-item-title {
    font-family: 'Rajdhani', monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.admin-item-status {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 0 10px currentColor;
    animation: pulse-glow 3s ease-in-out infinite;
}

.status-active {
    background: var(--primary-matrix);
    color: var(--bg-primary);
    text-shadow: 0 0 8px var(--primary-matrix);
    border: 2px solid var(--primary-matrix);
    box-shadow:
        0 0 15px rgba(0, 255, 136, 0.6),
        inset 0 0 10px rgba(0, 255, 136, 0.2);
    font-weight: 700;
}
.status-inactive {
    background: var(--danger-red);
    color: var(--text-primary);
    text-shadow: 0 0 8px var(--danger-red);
    border: 2px solid var(--danger-red);
    box-shadow:
        0 0 15px rgba(231, 76, 60, 0.6),
        inset 0 0 10px rgba(231, 76, 60, 0.2);
    font-weight: 700;
}
.status-revoked {
    background: var(--warning-amber);
    color: var(--bg-primary);
    text-shadow: 0 0 5px var(--warning-amber);
}

.admin-item-details {
    font-family: 'Rajdhani', monospace;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* Location Information Styling */
.location-info {
    margin: 10px 0;
    padding: 8px;
    background: rgba(0, 212, 255, 0.05);
    border-left: 2px solid var(--primary-cyan);
    border-radius: 4px;
}

.coordinates-row {
    margin-top: 5px;
    text-align: left;
}

.coordinates-text {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: var(--primary-cyan);
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.section-title {
    font-weight: 700;
    color: var(--primary-matrix);
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

/* Connectivity Timestamps Styling */
.connectivity-timestamps {
    margin-top: 8px;
    padding: 6px;
    background: rgba(0, 255, 136, 0.05);
    border-left: 2px solid var(--primary-matrix);
    border-radius: 4px;
}

.timestamp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0;
    font-size: 0.75rem;
}

.timestamp-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 85px;
}

.timestamp-value {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: right;
}

.timestamp-value.connected {
    color: var(--primary-matrix);
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

.timestamp-value.disconnected {
    color: var(--text-muted);
}

.loading-spinner-small {
    text-align: center;
    color: var(--primary-cyan);
    padding: 25px;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.loading-spinner-small::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-cyan);
    border-right: 2px solid var(--primary-matrix);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Filter Controls */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg,
        rgba(0, 255, 136, 0.05) 0%,
        rgba(0, 212, 255, 0.05) 50%,
        rgba(0, 153, 255, 0.05) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.filter-controls label {
    font-family: 'Rajdhani', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0;
}

.filter-select {
    background: linear-gradient(135deg,
        rgba(26, 29, 35, 0.9) 0%,
        rgba(44, 62, 80, 0.8) 100%);
    border: 1px solid var(--primary-accent);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Rajdhani', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 12px;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-select:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.filter-select:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.filter-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px;
}

/* Futuristic Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 20, 40, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-cyan), var(--primary-matrix));
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-matrix), var(--primary-cyan));
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

/* Menu Navigation Tabs */
.menu-nav-tabs {
    display: flex;
    background: linear-gradient(135deg,
        rgba(74, 144, 226, 0.05) 0%,
        rgba(90, 108, 125, 0.03) 100%);
    border-bottom: 2px solid rgba(74, 144, 226, 0.2);
    margin: 0;
    padding: 0;
}

.menu-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-family: 'Rajdhani', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.menu-tab:hover {
    background: rgba(74, 144, 226, 0.08);
    color: var(--text-primary);
}

.menu-tab.active {
    background: rgba(74, 144, 226, 0.12);
    border-bottom-color: var(--primary-accent);
    color: var(--text-primary);
    box-shadow: inset 0 -3px 0 var(--primary-accent);
}

.menu-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
}

/* Tab Content */
.tab-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Geofences Sub-tabs */
.geofences-sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.sub-tab-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(90, 108, 125, 0.05));
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: 'Rajdhani', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sub-tab-btn.active,
.sub-tab-btn:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(39, 174, 96, 0.1));
    border-color: var(--primary-accent);
    color: var(--text-primary);
}

/* Admin Controls */
.admin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-controls .control-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(90, 108, 125, 0.05));
    border: 1px solid rgba(74, 144, 226, 0.4);
    border-radius: 8px;
    color: var(--primary-accent);
    font-family: 'Rajdhani', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-controls .control-btn:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(90, 108, 125, 0.1));
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Geofence Controls */
.geofence-controls {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.geofence-controls .control-btn.small {
    padding: 6px 12px;
    font-size: 0.8rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(90, 108, 125, 0.04));
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: 'Rajdhani', monospace;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.geofence-controls .control-btn.small:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(90, 108, 125, 0.08));
    color: var(--text-primary);
    border-color: var(--primary-accent);
}

/* Empty states and errors */
.empty-state, .error {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-family: 'Rajdhani', monospace;
    font-style: italic;
}

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

/* General hidden class */
.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Selection styling */
::selection {
    background: rgba(74, 144, 226, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(74, 144, 226, 0.3);
    color: var(--text-primary);
}

/* Futuristic Animated Drone Control Component */
.drone-control-panel {
    position: fixed;
    background: linear-gradient(135deg,
        rgba(0, 5, 17, 0.98) 0%,
        rgba(0, 17, 34, 0.95) 50%,
        rgba(0, 34, 51, 0.92) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid var(--primary-cyan);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 10px 40px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(0, 255, 255, 0.3);
    z-index: 1001;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: hologram-flicker 8s infinite;
}

.drone-control-panel.visible {
    opacity: 1;
    transform: scale(1);
}

/* Drone Control Panel Animation Stages */
.drone-control-panel.stage-point {
    border-radius: 50%;
    background: radial-gradient(circle,
        var(--primary-accent),
        var(--primary-dark));
    border: none;
    box-shadow:
        0 0 8px var(--primary-accent),
        0 0 16px rgba(74, 144, 226, 0.4);
    transition: all 0.1s ease-out;
}

.drone-control-panel.stage-line {
    border-radius: 2px;
    background: linear-gradient(180deg,
        var(--primary-accent),
        var(--primary-dark));
    border: none;
    box-shadow:
        0 0 12px var(--primary-accent),
        0 0 24px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease-out;
}

.drone-control-panel.stage-expand {
    height: 250px;
    background: linear-gradient(135deg,
        rgba(26, 29, 35, 0.98) 0%,
        rgba(44, 62, 80, 0.95) 50%,
        rgba(52, 73, 94, 0.92) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid var(--primary-accent);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 10px 40px rgba(74, 144, 226, 0.2),
        0 0 20px rgba(74, 144, 226, 0.1);
    transition: all 0.4s ease-out;
}

.control-panel-header {
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.15) 0%,
        rgba(0, 153, 255, 0.1) 100%);
    padding: 16px 20px;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, var(--primary-cyan), var(--primary-matrix)) 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.control-panel-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--primary-matrix);
    box-shadow: 0 0 15px var(--primary-matrix);
}

.control-panel-header h4 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-cyan);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--primary-cyan);
}

.control-panel-content {
    padding: 20px;
}

.control-section {
    margin-bottom: 20px;
}

.control-section h5 {
    font-family: 'Rajdhani', monospace;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid var(--primary-matrix);
    padding-left: 10px;
    text-shadow: 0 0 5px var(--text-secondary);
}

.control-status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.status-item {
    font-family: 'Rajdhani', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 20, 40, 0.4) 100%);
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 6px 10px;
    border-radius: 8px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.control-location {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 8px 0;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.location-text {
    font-family: 'Rajdhani', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.control-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.control-btn {
    position: relative;
    padding: 12px 16px;
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.1) 0%,
        rgba(0, 153, 255, 0.05) 100%);
    color: var(--primary-cyan);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    font-family: 'Rajdhani', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 255, 255, 0.3),
        transparent);
    transition: left 0.6s ease;
}

.control-btn:hover {
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.2) 0%,
        rgba(0, 153, 255, 0.1) 100%);
    border-color: var(--primary-cyan);
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.4),
        0 5px 15px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--primary-cyan);
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:active {
    transform: translateY(1px);
}

.control-btn.active {
    background: linear-gradient(135deg,
        rgba(0, 255, 65, 0.3) 0%,
        rgba(0, 255, 255, 0.2) 100%);
    border-color: var(--primary-matrix);
    box-shadow:
        0 0 25px rgba(0, 255, 65, 0.5),
        0 0 50px rgba(0, 255, 65, 0.2);
    color: var(--text-primary);
    text-shadow: 0 0 15px var(--primary-matrix);
}

/* ============================================ */
/* ENHANCED MOBILE RESPONSIVE DESIGN */
/* ============================================ */

/* Large screens */
@media (min-width: 1400px) {
    .admin-panel {
        width: 450px;
    }

    .admin-item-details {
        font-size: 0.9rem;
    }
}

/* Medium screens - Enhanced tablet support */
@media (max-width: 1200px) {
    .admin-panel {
        width: 400px;
        right: 15px;
        top: 70px;
    }

    .drone-control-panel {
        max-width: 350px;
    }

    .control-status {
        flex-direction: column;
        gap: 4px;
    }

    .admin-item-details {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* Tablet Portrait and Small Laptops */
@media (max-width: 992px) {
    .admin-panel {
        width: 380px;
        max-height: 85vh;
    }

    .admin-list {
        max-height: 450px;
    }

    .connectivity-timestamps {
        margin-top: 8px;
    }

    .timestamp-row {
        padding: 2px 0;
    }

    .menu-nav-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .menu-tab {
        flex: 1 1 calc(33.333% - 4px);
        min-width: 80px;
    }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 768px) {
    .admin-panel {
        width: calc(100vw - 20px);
        max-width: 500px;
        right: 10px;
        top: 60px;
        max-height: 80vh;
        border-radius: 12px;
    }

    .panel-header h3 {
        font-size: 1.1rem;
    }

    .admin-list {
        max-height: 400px;
        padding: 8px;
    }

    .admin-item {
        margin-bottom: 12px;
        border-radius: 8px;
        padding: 12px;
    }

    .admin-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .admin-item-title {
        font-size: 1rem;
    }

    .admin-item-status {
        align-self: flex-end;
        padding: 3px 8px;
        font-size: 0.75rem;
    }

    .admin-item-details {
        font-size: 0.8rem;
        line-height: 1.5;
        margin-top: 8px;
    }

    .connectivity-timestamps .section-title {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .timestamp-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 3px 0;
        gap: 2px;
    }

    .timestamp-label {
        font-size: 0.75rem;
        font-weight: 600;
    }

    .timestamp-value {
        font-size: 0.75rem;
        padding-left: 12px;
    }

    .coordinates-row {
        margin-top: 4px;
    }

    .coordinates-text {
        font-size: 0.75rem;
        word-break: break-all;
    }

    /* Mobile-optimized drone control panel */
    .drone-control-panel {
        width: calc(100vw - 20px) !important;
        max-width: 400px !important;
        height: auto !important;
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        position: fixed !important;
        border-radius: 12px;
    }

    .control-panel-header {
        padding: 12px 16px;
    }

    .control-panel-header h4 {
        font-size: 1rem;
    }

    .control-panel-content {
        padding: 16px;
    }

    .control-section {
        margin-bottom: 16px;
    }

    .control-buttons-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .control-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    /* Mobile menu tabs */
    .menu-nav-tabs {
        padding: 8px;
        gap: 4px;
    }

    .menu-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 8px;
        flex: 1;
        text-align: center;
    }

    /* Sub-tabs for mobile */
    .geofences-sub-tabs {
        padding: 8px;
        gap: 4px;
    }

    .sub-tab-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-radius: 6px;
        flex: 1;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .admin-panel {
        width: calc(100vw - 16px);
        right: 8px;
        top: 55px;
        max-height: 75vh;
        border-radius: 10px;
    }

    .panel-header {
        padding: 12px 16px;
    }

    .panel-header h3 {
        font-size: 1rem;
    }

    .close-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .admin-list {
        max-height: 350px;
        padding: 6px;
    }

    .admin-item {
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 6px;
    }

    .admin-item-title {
        font-size: 0.95rem;
    }

    .admin-item-details {
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .basic-info, .location-info {
        margin-bottom: 8px;
    }

    .connectivity-timestamps {
        margin-top: 6px;
    }

    .timestamp-row {
        padding: 2px 0;
    }

    .timestamp-label, .timestamp-value {
        font-size: 0.7rem;
    }

    /* Extra compact drone control for small phones */
    .drone-control-panel {
        width: calc(100vw - 16px) !important;
        max-width: none !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        border-radius: 10px;
    }

    .control-panel-header {
        padding: 10px 14px;
    }

    .control-panel-header h4 {
        font-size: 0.9rem;
    }

    .control-panel-content {
        padding: 12px;
    }

    .control-section h5 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .control-status {
        flex-direction: column;
        gap: 2px;
    }

    .status-item {
        font-size: 0.75rem;
    }

    .control-location {
        margin-top: 6px;
    }

    .location-text {
        font-size: 0.7rem;
        display: block;
        margin-bottom: 2px;
    }

    .control-buttons-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .control-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    /* Menu tabs stack on very small screens */
    .menu-nav-tabs {
        flex-direction: column;
        gap: 3px;
        padding: 6px;
    }

    .menu-tab {
        padding: 8px;
        font-size: 0.8rem;
        text-align: center;
    }

    .geofences-sub-tabs {
        flex-direction: column;
        gap: 3px;
        padding: 6px;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .control-btn, .menu-tab, .sub-tab-btn, .close-btn {
        min-height: 44px; /* iOS accessibility minimum */
        min-width: 44px;
    }

    .admin-item {
        cursor: default;
    }

    .admin-item:hover {
        transform: none;
        background: var(--bg-surface);
    }

    /* Remove hover effects on touch devices */
    .control-btn:hover, .menu-tab:hover {
        transform: none;
        box-shadow: none;
    }

    .control-btn:active, .menu-tab:active {
        transform: scale(0.98);
        background: rgba(74, 144, 226, 0.2);
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .drone-control-panel, .admin-panel {
        backdrop-filter: blur(25px);
    }

    .panel-header::after, .control-panel-header::after {
        height: 1px;
        box-shadow: 0 0 10px var(--primary-matrix);
    }
}

/* ============================================ */
/* GEOFENCE CREATION MODAL */
/* ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(74, 144, 226, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(74, 144, 226, 0.05);
}

.modal-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-matrix);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--danger-red);
    background: rgba(231, 76, 60, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--primary-cyan);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-matrix);
    background: rgba(0, 255, 136, 0.05);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.control-btn.primary {
    background: linear-gradient(135deg, var(--primary-matrix) 0%, var(--primary-cyan) 100%);
    color: var(--bg-primary);
    font-weight: 600;
}

.control-btn.primary:hover {
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
    transform: translateY(-2px);
}

.control-btn.small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

#drawing-instructions {
    display: none;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* ============================================ */
/* LAYER TOGGLES */
/* ============================================ */

.layer-section {
    margin-bottom: 25px;
    padding: 0 0 20px 0;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.layer-section:last-child {
    border-bottom: none;
}

.layer-category-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-matrix);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid var(--primary-matrix);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.layer-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.layer-toggle-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.05) 0%,
        rgba(0, 153, 255, 0.03) 100%);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.layer-toggle-item:hover {
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.1) 0%,
        rgba(0, 153, 255, 0.06) 100%);
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.15);
}

.layer-label {
    flex: 1;
    font-family: 'Rajdhani', monospace;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.layer-count {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-cyan);
    background: rgba(0, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 35px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(200, 200, 200, 0.8) 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg,
        var(--primary-matrix) 0%,
        var(--primary-cyan) 100%);
    border-color: var(--primary-matrix);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background: linear-gradient(135deg,
        #ffffff 0%,
        var(--primary-matrix) 100%);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* ============================================ */
/* DRAWING TOOLS PANEL */
/* ============================================ */

.drawing-tools-panel {
    background: linear-gradient(135deg,
        rgba(0, 255, 136, 0.08) 0%,
        rgba(0, 212, 255, 0.05) 100%);
    border: 2px solid var(--primary-matrix);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow:
        0 0 20px rgba(0, 255, 136, 0.2),
        inset 0 1px 0 rgba(0, 255, 136, 0.2);
}

.drawing-tools-panel h5 {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-matrix);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.tool-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.1) 0%,
        rgba(0, 153, 255, 0.05) 100%);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Rajdhani', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    background: linear-gradient(135deg,
        rgba(0, 255, 255, 0.2) 0%,
        rgba(0, 153, 255, 0.1) 100%);
    border-color: var(--primary-cyan);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.tool-btn.active {
    background: linear-gradient(135deg,
        var(--primary-matrix) 0%,
        var(--primary-cyan) 100%);
    border-color: var(--primary-matrix);
    color: var(--bg-primary);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.tool-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.drawing-instructions {
    background: rgba(0, 212, 255, 0.1);
    border-left: 3px solid var(--primary-cyan);
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.drawing-instructions p {
    font-family: 'Rajdhani', monospace;
    font-size: 0.9rem;
    color: var(--primary-cyan);
    margin: 0;
    line-height: 1.4;
}

.drawing-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.drawing-actions .control-btn {
    flex: 1;
    max-width: 150px;
}

/* Mobile responsive for drawing tools */
@media (max-width: 768px) {
    .tool-buttons {
        grid-template-columns: 1fr;
    }

    .drawing-actions .control-btn {
        max-width: none;
    }
}

/* Camera Controls */
.camera-controls {
    position: fixed;
    left: 20px;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.camera-control-btn {
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--primary-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.camera-control-btn:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.camera-control-btn:active {
    transform: scale(0.95);
}

.camera-control-btn svg {
    width: 24px;
    height: 24px;
}

#reset-view-btn:hover svg {
    animation: pulse-glow 1.5s infinite;
}

@media (max-width: 768px) {
    .camera-controls {
        left: 10px;
        bottom: 50px;
        gap: 4px;
    }

    .camera-control-btn {
        width: 40px;
        height: 40px;
    }
}

/* Entity Info Dialog */
.entity-info-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.entity-info-dialog.show {
    opacity: 1;
    pointer-events: all;
}

.entity-info-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(0, 212, 255, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: dialog-slide-in 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

@keyframes dialog-slide-in {
    0% {
        transform: scale(0.8) translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.entity-info-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--primary-cyan);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
}

.entity-info-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
    transform: rotate(90deg);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.entity-info-body {
    padding: 25px;
}

.entity-info-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.entity-info-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    color: var(--primary-cyan);
    margin: 0 0 5px 0;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.entity-info-subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.entity-info-section {
    margin-bottom: 20px;
}

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

.entity-info-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: var(--secondary-green);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.entity-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 15px;
    font-family: 'Rajdhani', sans-serif;
}

.entity-info-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entity-info-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.entity-info-value.highlight {
    color: var(--primary-cyan);
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.entity-info-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entity-info-badge.aircraft {
    background: rgba(74, 144, 226, 0.2);
    color: #4A90E2;
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.entity-info-badge.satellite {
    background: rgba(192, 192, 192, 0.2);
    color: #C0C0C0;
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.entity-info-badge.drone {
    background: rgba(0, 255, 135, 0.2);
    color: var(--secondary-green);
    border: 1px solid rgba(0, 255, 135, 0.3);
}

/* Custom scrollbar for dialog */
.entity-info-content::-webkit-scrollbar {
    width: 8px;
}

.entity-info-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.entity-info-content::-webkit-scrollbar-thumb {
    background: var(--primary-cyan);
    border-radius: 4px;
}

.entity-info-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.8);
}

/* Responsive design */
@media (max-width: 768px) {
    .entity-info-dialog {
        padding: 10px;
    }

    .entity-info-content {
        max-height: 90vh;
    }

    .entity-info-body {
        padding: 20px 15px;
    }

    .entity-info-title {
        font-size: 18px;
    }

    .entity-info-grid {
        gap: 6px 10px;
    }
}

/* ========================================
   UI REDESIGN - Command Center Layout
   ======================================== */

/* Quick Access Control Bar */
.quick-access-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 15px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 900;
    transition: all 0.3s ease;
}

.quick-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.quick-toggle:hover {
    background: rgba(0, 212, 255, 0.1);
}

.toggle-switch.mini {
    transform: scale(0.8);
}

.quick-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
}

.quick-count {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: var(--primary-cyan);
    background: rgba(0, 212, 255, 0.15);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Menu Search */
.menu-search {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.search-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Collapsible Sections */
.collapsible-section {
    border-bottom: 1px solid var(--glass-border);
}

.section-header {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.section-header:hover {
    background: rgba(0, 212, 255, 0.05);
}

.section-header:active {
    background: rgba(0, 212, 255, 0.1);
}

.section-chevron {
    font-size: 14px;
    color: var(--primary-cyan);
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.section-header[data-expanded="true"] .section-chevron {
    transform: rotate(90deg);
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}

.section-badge {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: var(--secondary-green);
    background: rgba(0, 255, 135, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.section-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-content.collapsed {
    max-height: 0;
}

/* Subsections */
.subsection {
    padding: 10px 15px 10px 40px;
}

.subsection-details {
    margin-top: 10px;
    padding-left: 10px;
}

/* Filter Group (Satellite Filters) */
.filter-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
}

.checkbox-label:hover {
    background: rgba(0, 212, 255, 0.1);
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--primary-cyan);
}

/* Button Row */
.button-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

/* Compact Styles */
.control-btn.compact {
    padding: 6px 12px;
    font-size: 12px;
}

.control-btn.full-width {
    width: 100%;
}

.admin-list.compact {
    max-height: 300px;
}

.status-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    color: #888;
    margin-left: 8px;
}

/* Remove old tab styles */
.menu-nav-tabs {
    display: none;
}

.tab-content {
    display: block !important;
}

.tab-content.hidden {
    display: none !important;
}

/* Responsive adjustments for quick access bar */
@media (max-width: 1200px) {
    .quick-access-bar {
        flex-wrap: wrap;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .quick-access-bar {
        top: 10px;
        right: 10px;
        padding: 8px 10px;
        gap: 8px;
    }

    .quick-label {
        font-size: 11px;
    }

    .quick-count {
        font-size: 10px;
        padding: 1px 4px;
    }

    .filter-group {
        grid-template-columns: 1fr;
    }
}
