/* =============================================
   SGP TACTICAL - MILITARY TACTICAL INTERFACE
   ============================================= */

:root {
    /* Core Military Colors */
    --primary: #00ff41;
    --primary-dim: #00cc33;
    --primary-dark: #006b1d;
    --primary-glow: rgba(0, 255, 65, 0.15);
    --danger: #ff2d2d;
    --danger-glow: rgba(255, 45, 45, 0.2);
    --warning: #ffaa00;
    --warning-glow: rgba(255, 170, 0, 0.15);
    --info: #00b4ff;
    --info-glow: rgba(0, 180, 255, 0.15);
    --neutral: #4a90d9;

    /* Backgrounds */
    --bg-primary: #0a0e0a;
    --bg-secondary: #0f140f;
    --bg-tertiary: #141a14;
    --bg-panel: rgba(10, 14, 10, 0.95);
    --bg-glass: rgba(10, 14, 10, 0.85);

    /* Text */
    --text-primary: #c8e6c9;
    --text-secondary: #7da67e;
    --text-dim: #3d5a3e;
    --text-bright: #e8ffe9;

    /* Borders */
    --border: rgba(0, 255, 65, 0.15);
    --border-active: rgba(0, 255, 65, 0.4);

    /* Sizing */
    --top-bar-height: 48px;
    --bottom-bar-height: 60px;
    --sidebar-width: 60px;
    --panel-width: 320px;

    /* Fonts */
    --font-mono: 'Share Tech Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
    --font-ui: 'Rajdhani', sans-serif;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 2px; }

/* =============================================
   BOOT SCREEN
   ============================================= */
#boot-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.boot-content {
    text-align: center;
    z-index: 2;
}

.boot-logo {
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
    animation: boot-pulse 2s ease-in-out infinite;
}

.boot-emblem {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    filter: drop-shadow(0 0 30px rgba(0, 255, 65, 0.3));
}

.boot-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 8px;
    text-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    margin-bottom: 8px;
}

.boot-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 4px;
    margin-bottom: 40px;
}

.boot-progress {
    width: 280px;
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.boot-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}

.boot-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary-dim);
    letter-spacing: 2px;
    animation: boot-blink 1s infinite;
}

.boot-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.015) 2px,
        rgba(0, 255, 65, 0.015) 4px
    );
    pointer-events: none;
    z-index: 1;
}

@keyframes boot-pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes boot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* =============================================
   TOP BAR
   ============================================= */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 1000;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.icon-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: fill 0.2s;
}

.icon-btn:hover {
    background: var(--primary-glow);
    border-color: var(--border-active);
}

.icon-btn:hover svg {
    fill: var(--primary);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-icon {
    color: var(--primary);
    font-size: 0.9rem;
}

.brand-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(0, 255, 65, 0.3));
}

.brand-text {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 3px;
}

.coord-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 65, 0.05);
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.coord-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--primary-dim);
    letter-spacing: 2px;
}

.coord-value {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 1px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 45, 45, 0.1);
}

.status-indicator.active {
    background: rgba(0, 255, 65, 0.1);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
}

.status-indicator.active .status-dot {
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
    animation: dot-pulse 2s infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.time-display {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 2px;
    padding: 2px 8px;
    background: rgba(0, 255, 65, 0.05);
    border-radius: 3px;
    border: 1px solid var(--border);
}

/* =============================================
   MAP CONTAINER
   ============================================= */
#map-container {
    position: fixed;
    top: var(--top-bar-height);
    left: var(--sidebar-width);
    right: 0;
    bottom: var(--bottom-bar-height);
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
    background: #0d1117;
}

/* Override Leaflet controls */
.leaflet-control-zoom {
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: var(--bg-glass) !important;
    color: var(--primary) !important;
    border-color: var(--border) !important;
    font-family: var(--font-mono) !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
}

.leaflet-control-zoom a:hover {
    background: var(--primary-glow) !important;
}

.leaflet-control-attribution {
    background: var(--bg-glass) !important;
    color: var(--text-dim) !important;
    font-size: 0.55rem !important;
    font-family: var(--font-mono) !important;
}

.leaflet-control-attribution a {
    color: var(--primary-dark) !important;
}

/* =============================================
   CROSSHAIR
   ============================================= */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    pointer-events: none;
}

.crosshair-h, .crosshair-v {
    position: absolute;
    background: var(--primary);
    opacity: 0.5;
}

.crosshair-h {
    width: 30px;
    height: 1px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.crosshair-v {
    width: 1px;
    height: 30px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.crosshair-circle {
    width: 16px;
    height: 16px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.4;
}

/* =============================================
   COMPASS WIDGET
   ============================================= */
#compass-widget {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.compass-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--border-active);
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 255, 65, 0.05);
}

.compass-arrow {
    position: relative;
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.arrow-north {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 16px solid var(--danger);
    filter: drop-shadow(0 0 3px rgba(255, 45, 45, 0.5));
}

.arrow-south {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 16px solid var(--text-dim);
}

.compass-n, .compass-e, .compass-s, .compass-w {
    position: absolute;
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.compass-n { top: 4px; left: 50%; transform: translateX(-50%); color: var(--danger); }
.compass-e { right: 6px; top: 50%; transform: translateY(-50%); }
.compass-s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.compass-w { left: 6px; top: 50%; transform: translateY(-50%); }

.compass-bearing {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--primary);
    background: var(--bg-glass);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--border);
    letter-spacing: 2px;
}

/* =============================================
   INFO BAR
   ============================================= */
#info-bar {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 4px;
    z-index: 600;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 12px;
    border-right: 1px solid var(--border);
}

.info-item:last-child {
    border-right: none;
}

.info-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.info-value {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 1px;
}

/* =============================================
   TOOL SIDEBAR
   ============================================= */
#tool-sidebar {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    width: var(--sidebar-width);
    bottom: var(--bottom-bar-height);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 4px;
    z-index: 900;
    overflow-y: auto;
}

.tool-btn {
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s;
    position: relative;
}

.tool-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: fill 0.2s;
}

.tool-btn span {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    transition: color 0.2s;
}

.tool-btn:hover {
    background: var(--primary-glow);
    border-color: var(--border);
}

.tool-btn:hover svg { fill: var(--primary); }
.tool-btn:hover span { color: var(--primary-dim); }

.tool-btn.active {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--border-active);
}

.tool-btn.active svg { fill: var(--primary); }
.tool-btn.active span { color: var(--primary); }

.tool-btn.active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 25%;
    height: 50%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--primary);
}

.tool-separator {
    width: 32px;
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* =============================================
   SIDE PANEL
   ============================================= */
#side-panel {
    position: fixed;
    top: var(--top-bar-height);
    left: var(--sidebar-width);
    width: var(--panel-width);
    bottom: var(--bottom-bar-height);
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border);
    z-index: 800;
    display: flex;
    flex-direction: column;
    animation: panel-slide-in 0.3s ease;
}

@keyframes panel-slide-in {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    min-height: 48px;
}

.panel-header h2 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 3px;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* Panel Items */
.panel-section {
    margin-bottom: 16px;
}

.panel-section-title {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.panel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.panel-item:hover {
    background: var(--primary-glow);
    border-color: var(--border);
}

.panel-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.panel-item-info {
    flex: 1;
    min-width: 0;
}

.panel-item-name {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-item-detail {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.panel-item-actions {
    display: flex;
    gap: 4px;
}

.panel-item-actions button {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-item-actions button svg {
    width: 14px;
    height: 14px;
    fill: var(--text-secondary);
}

.panel-item-actions button:hover {
    background: var(--danger-glow);
    border-color: var(--danger);
}

.panel-item-actions button:hover svg {
    fill: var(--danger);
}

/* Friendly/Hostile indicators */
.marker-friendly { background: rgba(0, 255, 65, 0.15); border: 1px solid rgba(0, 255, 65, 0.3); }
.marker-hostile { background: rgba(255, 45, 45, 0.15); border: 1px solid rgba(255, 45, 45, 0.3); }
.marker-unknown { background: rgba(255, 170, 0, 0.15); border: 1px solid rgba(255, 170, 0, 0.3); }
.marker-neutral { background: rgba(74, 144, 217, 0.15); border: 1px solid rgba(74, 144, 217, 0.3); }
.marker-objective { background: rgba(255, 215, 0, 0.15); border: 1px solid rgba(255, 215, 0, 0.3); }
.marker-hazard { background: rgba(255, 140, 0, 0.15); border: 1px solid rgba(255, 140, 0, 0.3); }
.marker-medevac { background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.3); }
.marker-hq { background: rgba(138, 43, 226, 0.15); border: 1px solid rgba(138, 43, 226, 0.3); }

/* Layer toggles */
.layer-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.layer-toggle:hover {
    background: var(--primary-glow);
}

.layer-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-toggle-label span {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-switch {
    width: 36px;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-switch.active {
    background: var(--primary-dark);
    border-color: var(--primary);
}

.toggle-switch.active::after {
    transform: translateX(16px);
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

/* =============================================
   BOTTOM BAR
   ============================================= */
#bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-bar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 16px;
    z-index: 1000;
}

.bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.bottom-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--text-secondary);
    transition: fill 0.2s;
}

.bottom-btn span {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    transition: color 0.2s;
}

.bottom-btn:hover, .bottom-btn:active {
    background: var(--primary-glow);
}

.bottom-btn:hover svg { fill: var(--primary); }
.bottom-btn:hover span { color: var(--primary); }

.bottom-btn.emergency {
    position: relative;
}

.bottom-btn.emergency svg {
    fill: var(--danger);
}

.bottom-btn.emergency span {
    color: var(--danger);
    font-weight: 700;
}

.bottom-btn.emergency:hover {
    background: var(--danger-glow);
}

.bottom-btn.emergency::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    border: 1px solid transparent;
    animation: sos-glow 2s infinite;
}

@keyframes sos-glow {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--danger); box-shadow: 0 0 12px var(--danger-glow); }
}

/* =============================================
   MODAL / MARKER FORM
   ============================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: modal-fade-in 0.2s ease;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-active);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.1);
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--primary);
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-align: center;
}

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

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ff41'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-dark);
    color: var(--bg-primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--primary-glow);
    color: var(--text-primary);
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
#toast {
    position: fixed;
    top: calc(var(--top-bar-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-active);
    border-radius: 8px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 3000;
    animation: toast-in 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

@keyframes toast-in {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.toast-msg {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 1px;
}

/* Grid Label */
#grid-label {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 600;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--primary-dim);
    background: var(--bg-glass);
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid var(--border);
    letter-spacing: 2px;
}

/* =============================================
   CUSTOM MAP MARKERS
   ============================================= */
.tactical-marker {
    position: relative;
}

.marker-mil {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
    border: 2px solid;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.marker-mil:hover {
    transform: scale(1.2);
    z-index: 1000 !important;
}

.marker-mil.type-friendly {
    background: rgba(0, 255, 65, 0.2);
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.marker-mil.type-hostile {
    background: rgba(255, 45, 45, 0.2);
    border-color: #ff2d2d;
    color: #ff2d2d;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 45, 45, 0.3);
}

.marker-mil.type-unknown {
    background: rgba(255, 170, 0, 0.2);
    border-color: #ffaa00;
    color: #ffaa00;
    transform: rotate(45deg);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.marker-mil.type-unknown:hover {
    transform: rotate(45deg) scale(1.2);
}

.marker-mil.type-neutral {
    background: rgba(74, 144, 217, 0.2);
    border-color: #4a90d9;
    color: #4a90d9;
    box-shadow: 0 0 10px rgba(74, 144, 217, 0.3);
}

.marker-mil.type-objective {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.marker-mil.type-hazard {
    background: rgba(255, 140, 0, 0.2);
    border-color: #ff8c00;
    color: #ff8c00;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
}

.marker-mil.type-medevac {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    color: #ff2d2d;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.marker-mil.type-hq {
    background: rgba(138, 43, 226, 0.2);
    border-color: #8a2be2;
    color: #8a2be2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.marker-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-primary);
    background: var(--bg-glass);
    padding: 1px 6px;
    border-radius: 2px;
    white-space: nowrap;
    letter-spacing: 1px;
    border: 1px solid var(--border);
}

/* Map Popup */
.leaflet-popup-content-wrapper {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-active) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-content {
    color: var(--text-primary) !important;
    font-family: var(--font-ui) !important;
    margin: 12px !important;
}

.leaflet-popup-tip {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-active) !important;
}

.popup-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.popup-info {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.popup-coords {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--primary-dim);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.popup-btn-delete {
    margin-top: 8px;
    padding: 6px 12px;
    background: var(--danger-glow);
    border: 1px solid var(--danger);
    border-radius: 4px;
    color: var(--danger);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.popup-btn-delete:hover {
    background: var(--danger);
    color: #fff;
}

/* =============================================
   ROUTE LINE STYLE
   ============================================= */
.route-distance-label {
    font-family: var(--font-mono) !important;
    font-size: 0.6rem !important;
    color: var(--primary) !important;
    background: var(--bg-glass) !important;
    border: 1px solid var(--border) !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
}

/* =============================================
   PANEL FULLSCREEN MODE
   ============================================= */

.panel-header-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

#side-panel.panel-fullscreen {
    left: 0 !important;
    width: 100% !important;
    top: var(--top-bar-height) !important;
    bottom: 0 !important;
    z-index: 1200 !important;
    border-right: none;
}

#side-panel.panel-fullscreen .panel-body {
    padding: 16px;
}

#side-panel.panel-fullscreen .panel-header {
    padding: 14px 16px;
    background: rgba(0,255,65,0.03);
}

#side-panel.panel-fullscreen .panel-header h2 {
    font-size: 0.9rem;
}

/* =============================================
   MOBILE TOOL DRAWER
   ============================================= */
#mobile-tools {
    position: fixed;
    bottom: var(--bottom-bar-height);
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 8px;
    z-index: 900;
    gap: 4px;
    overflow-x: auto;
    justify-content: center;
    display: none;
}

.mobile-tool-btn {
    min-width: 52px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-shrink: 0;
}

.mobile-tool-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--text-secondary);
}

.mobile-tool-btn span {
    font-family: var(--font-mono);
    font-size: 0.4rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.mobile-tool-btn.active {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--primary);
}

.mobile-tool-btn.active svg { fill: var(--primary); }
.mobile-tool-btn.active span { color: var(--primary); }

/* =============================================
   RESPONSIVE - MOBILE
   ============================================= */

/* --- Safe area support for notched phones --- */
@supports (padding: env(safe-area-inset-top)) {
    #top-bar {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--top-bar-height) + env(safe-area-inset-top));
    }
    #bottom-bar {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom));
    }
    #map-container {
        top: calc(var(--top-bar-height) + env(safe-area-inset-top));
        bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom));
    }
    #tool-sidebar {
        top: calc(var(--top-bar-height) + env(safe-area-inset-top));
        bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom));
        padding-left: env(safe-area-inset-left);
    }
    #side-panel {
        top: calc(var(--top-bar-height) + env(safe-area-inset-top));
    }
    #mobile-tools {
        bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom));
    }
}

/* --- Base mobile (portrait + landscape) --- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
        --panel-width: 100%;
        --bottom-bar-height: 56px;
    }

    #tool-sidebar {
        display: none;
    }

    #map-container {
        left: 0;
    }

    .coord-display {
        display: none;
    }

    .top-bar-center {
        display: none;
    }

    #side-panel {
        left: 0;
        width: 100%;
        bottom: var(--bottom-bar-height);
    }

    /* On mobile, auto-fullscreen panels for better UX */
    #side-panel:not(.hidden) {
        z-index: 1200;
    }

    .brand-text {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }

    /* Bigger touch targets */
    .atk-btn, .walkie-connect-btn, .trk-ctrl-btn {
        min-height: 40px;
        font-size: 0.6rem !important;
    }

    .atk-input, .walkie-callsign-input, .chat-input {
        min-height: 38px;
        font-size: 0.65rem !important;
    }

    /* Better panel body spacing */
    .panel-body {
        padding: 10px;
    }

    .panel-section {
        margin-bottom: 12px;
    }

    /* Chat messages bigger */
    .chat-messages {
        height: 280px;
    }

    .chat-msg {
        font-size: 0.6rem !important;
    }

    .chat-input {
        padding: 10px !important;
    }

    /* PTT button bigger */
    .walkie-ptt-btn {
        min-height: 80px !important;
    }

    /* Comms tabs bigger */
    .comms-tab {
        padding: 10px !important;
        font-size: 0.6rem !important;
    }

    /* Cyber tabs bigger */
    .cyber-tabs .cyber-tab {
        padding: 8px 6px !important;
        font-size: 0.5rem !important;
    }

    /* Tracker device cards */
    .trk-device-card {
        padding: 10px !important;
    }

    /* Mobile tool drawer */
    #mobile-tools {
        display: flex;
    }

    /* Bottom bar compact */
    #bottom-bar {
        padding: 0 8px;
    }

    .bottom-btn {
        padding: 6px 8px;
    }

    .bottom-btn svg {
        width: 20px;
        height: 20px;
    }

    .bottom-btn span {
        font-size: 0.45rem;
    }

    /* Info bar responsive */
    #info-bar {
        bottom: 6px;
        padding: 4px 2px;
        gap: 1px;
    }

    .info-item {
        padding: 2px 8px;
    }

    .info-value {
        font-size: 0.6rem;
    }

    /* Compass smaller */
    .compass-ring {
        width: 56px;
        height: 56px;
    }

    .compass-arrow {
        width: 30px;
        height: 30px;
    }

    .arrow-north {
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 12px solid var(--danger);
    }

    .arrow-south {
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 12px solid var(--text-dim);
    }

    .compass-n, .compass-e, .compass-s, .compass-w {
        font-size: 0.45rem;
    }

    .compass-bearing {
        font-size: 0.55rem;
    }

    /* Radar display responsive */
    .radar-display {
        width: min(280px, 80vw) !important;
        height: min(280px, 80vw) !important;
    }

    /* CSI ring responsive */
    .csi-status-ring {
        width: min(140px, 40vw);
        height: min(140px, 40vw);
    }

    .csi-status-inner {
        width: min(120px, 34vw);
        height: min(120px, 34vw);
    }

    /* Modal responsive */
    .modal-content {
        width: 94%;
        max-width: 360px;
        padding: 18px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Toast responsive */
    #toast {
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
    }

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

    /* Grid labels */
    #grid-label {
        top: 8px;
        left: 8px;
        font-size: 0.5rem;
    }

    /* Live stats compact */
    #live-stats {
        top: 8px;
        left: 8px;
        gap: 4px;
    }

    .live-stat {
        padding: 2px 6px;
    }

    .live-stat-text {
        font-size: 0.4rem;
    }

    .live-stat-value {
        font-size: 0.45rem;
    }

    /* Route grids 2-col on mobile */
    .route-quick-grid {
        grid-template-columns: 1fr 1fr;
    }

    .route-eta-display {
        grid-template-columns: 1fr 1fr;
        padding: 8px;
    }

    .route-eta-value {
        font-size: 0.8rem;
    }
}

/* --- Mobile LANDSCAPE specific --- */
@media (max-width: 900px) and (orientation: landscape) {
    :root {
        --top-bar-height: 36px;
        --bottom-bar-height: 42px;
        --sidebar-width: 0px;
    }

    /* Compact top bar in landscape */
    #top-bar {
        height: var(--top-bar-height);
        padding: 0 8px;
    }

    .brand-logo {
        width: 20px;
        height: 20px;
    }

    .brand-text {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }

    .icon-btn {
        width: 30px;
        height: 30px;
    }

    .icon-btn svg {
        width: 16px;
        height: 16px;
    }

    .status-indicator {
        padding: 1px 4px;
    }

    .status-text {
        font-size: 0.45rem;
    }

    .time-display {
        font-size: 0.6rem;
        padding: 1px 6px;
    }

    /* Map uses full available space */
    #map-container {
        left: 0;
        top: var(--top-bar-height);
        bottom: var(--bottom-bar-height);
    }

    /* Compact bottom bar in landscape */
    #bottom-bar {
        height: var(--bottom-bar-height);
        padding: 0 12px;
    }

    .bottom-btn {
        padding: 4px 10px;
        gap: 1px;
    }

    .bottom-btn svg {
        width: 18px;
        height: 18px;
    }

    .bottom-btn span {
        font-size: 0.4rem;
    }

    /* Hide mobile tools drawer in landscape to save vertical space */
    #mobile-tools {
        display: none !important;
    }

    /* Tool sidebar appears in landscape instead */
    #tool-sidebar {
        display: flex !important;
        width: 44px;
        padding: 4px 0;
        gap: 2px;
        top: var(--top-bar-height);
        bottom: var(--bottom-bar-height);
    }

    #tool-sidebar .tool-btn {
        width: 38px;
        height: 36px;
    }

    #tool-sidebar .tool-btn svg {
        width: 16px;
        height: 16px;
    }

    #tool-sidebar .tool-btn span {
        font-size: 0.35rem;
    }

    #map-container {
        left: 44px;
    }

    /* Side panel as a narrow column in landscape, not fullscreen */
    #side-panel {
        left: 44px;
        width: min(320px, 50vw);
        bottom: var(--bottom-bar-height);
        top: var(--top-bar-height);
    }

    #side-panel.panel-fullscreen {
        left: 0 !important;
        width: 100% !important;
    }

    /* Compass widget smaller and lower */
    #compass-widget {
        top: 8px;
        right: 8px;
    }

    .compass-ring {
        width: 48px;
        height: 48px;
    }

    .compass-arrow {
        width: 26px;
        height: 26px;
    }

    .arrow-north {
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-bottom: 10px solid var(--danger);
    }

    .arrow-south {
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 10px solid var(--text-dim);
    }

    .compass-n, .compass-e, .compass-s, .compass-w {
        font-size: 0.4rem;
    }

    .compass-bearing {
        font-size: 0.5rem;
        padding: 1px 6px;
    }

    /* Info bar horizontal and compact */
    #info-bar {
        bottom: 4px;
        padding: 3px 2px;
        gap: 1px;
    }

    .info-item {
        padding: 1px 8px;
    }

    .info-label {
        font-size: 0.4rem;
    }

    .info-value {
        font-size: 0.55rem;
    }

    /* Chat area smaller in landscape */
    .chat-messages {
        height: 120px !important;
    }

    /* PTT button compact */
    .walkie-ptt-btn {
        min-height: 50px !important;
        padding: 10px !important;
    }

    .walkie-ptt-icon {
        font-size: 1.5rem;
    }

    /* Radar display fit landscape height */
    .radar-display {
        width: min(200px, 35vh) !important;
        height: min(200px, 35vh) !important;
    }

    /* CSI ring smaller in landscape */
    .csi-status-ring {
        width: min(100px, 20vh);
        height: min(100px, 20vh);
    }

    .csi-status-inner {
        width: min(80px, 16vh);
        height: min(80px, 16vh);
    }

    .csi-status-icon {
        font-size: 1.4rem;
    }

    /* Modal shrink in landscape */
    .modal-content {
        max-height: 85vh;
        padding: 14px;
        overflow-y: auto;
    }

    .modal-content h3 {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }

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

    /* Route ETA 4-col in landscape */
    .route-eta-display {
        grid-template-columns: repeat(4, 1fr);
        padding: 6px;
    }

    .route-eta-value {
        font-size: 0.75rem;
    }

    /* Walkie channel display compact */
    .walkie-ch-number {
        font-size: 1.5rem;
    }

    .walkie-channel-display {
        padding: 4px 16px;
    }

    /* Live stats inline */
    #live-stats {
        top: 6px;
        left: 52px;
        gap: 4px;
    }

    /* Grid label position */
    #grid-label {
        top: 6px;
        left: 52px;
    }

    /* Toast centered */
    #toast {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 80vw;
    }
}

/* --- Extra small portrait phones (< 380px) --- */
@media (max-width: 380px) and (orientation: portrait) {
    .brand-text {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }

    .brand-logo {
        width: 20px;
        height: 20px;
    }

    #bottom-bar {
        padding: 0 4px;
    }

    .bottom-btn {
        padding: 4px 6px;
    }

    .bottom-btn svg {
        width: 18px;
        height: 18px;
    }

    .bottom-btn span {
        font-size: 0.4rem;
        letter-spacing: 0;
    }

    /* Mobile tools scroll horizontally */
    #mobile-tools {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px;
    }

    .mobile-tool-btn {
        min-width: 46px;
        height: 38px;
    }

    .mobile-tool-btn span {
        font-size: 0.35rem;
    }

    /* Cyber tabs wrap */
    .cyber-tabs {
        flex-wrap: wrap;
    }

    .cyber-tabs .cyber-tab {
        font-size: 0.45rem !important;
        padding: 6px 4px !important;
    }

    /* Route mode grid single column */
    .route-mode-grid {
        grid-template-columns: 1fr;
    }

    /* Quick grid 2 col */
    .route-quick-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Short landscape phones (height < 500px) --- */
@media (max-height: 500px) and (orientation: landscape) {
    :root {
        --top-bar-height: 32px;
        --bottom-bar-height: 36px;
    }

    #top-bar {
        height: var(--top-bar-height);
    }

    .brand-text {
        display: none;
    }

    #bottom-bar {
        height: var(--bottom-bar-height);
    }

    .bottom-btn span {
        display: none;
    }

    .bottom-btn {
        padding: 4px 8px;
    }

    /* Panel body scroll optimized */
    .panel-body {
        padding: 6px;
    }

    .panel-section {
        margin-bottom: 6px;
    }

    .panel-header {
        padding: 6px 10px;
        min-height: 32px;
    }

    .panel-header h2 {
        font-size: 0.65rem;
    }
}

@media (min-width: 769px) {
    #mobile-tools {
        display: none;
    }
}



/* =============================================
   SCANLINE OVERLAY (AESTHETIC)
   ============================================= */
#app::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        transparent,
        transparent 3px,
        rgba(0, 255, 65, 0.008) 3px,
        rgba(0, 255, 65, 0.008) 6px
    );
    pointer-events: none;
    z-index: 9998;
}

/* =============================================
   ZONE OVERLAY
   ============================================= */
.zone-overlay {
    fill: rgba(255, 45, 45, 0.15);
    stroke: var(--danger);
    stroke-width: 2;
    stroke-dasharray: 8 4;
}

/* =============================================
   CELL TOWER MARKERS
   ============================================= */
.cell-tower-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell-tower-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: rgba(255, 100, 0, 0.2);
    border: 1.5px solid #ff6400;
    border-radius: 4px;
    color: #ff6400;
    position: relative;
    z-index: 2;
}

.cell-tower-signal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 100, 0, 0.25);
    animation: tower-pulse 3s ease-out infinite;
    z-index: 1;
}

.cell-tower-signal::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 100, 0, 0.1);
    animation: tower-pulse 3s ease-out infinite 0.5s;
}

@keyframes tower-pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.cell-tower-label {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.4rem;
    color: #ff6400;
    white-space: nowrap;
    letter-spacing: 1px;
    background: rgba(10, 14, 10, 0.8);
    padding: 1px 4px;
    border-radius: 2px;
}

/* =============================================
   VEHICLE MARKERS (TRAFFIC SIMULATION)
   ============================================= */
.vehicle-dot {
    border-radius: 50%;
    transition: none;
}

.vehicle-dot.vehicle-car {
    background: #ffdd44;
    box-shadow: 0 0 4px rgba(255, 221, 68, 0.6);
}

.vehicle-dot.vehicle-car-red {
    background: #ff4444;
    box-shadow: 0 0 4px rgba(255, 68, 68, 0.5);
}

.vehicle-dot.vehicle-truck {
    background: #ffffff;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* =============================================
   INFRASTRUCTURE MARKERS
   ============================================= */
.infra-marker {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 11px;
    border: 1.5px solid;
    cursor: pointer;
    transition: transform 0.2s;
}

.infra-marker:hover {
    transform: scale(1.3);
    z-index: 1000 !important;
}

.infra-police {
    background: rgba(0, 100, 255, 0.2);
    border-color: #0064ff;
    color: #0064ff;
    box-shadow: 0 0 8px rgba(0, 100, 255, 0.2);
}

.infra-hospital {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    color: #ff3333;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.infra-fire {
    background: rgba(255, 50, 0, 0.2);
    border-color: #ff3200;
    color: #ff3200;
    box-shadow: 0 0 8px rgba(255, 50, 0, 0.2);
}

.infra-military {
    background: rgba(107, 142, 35, 0.2);
    border-color: #6b8e23;
    color: #6b8e23;
    box-shadow: 0 0 8px rgba(107, 142, 35, 0.2);
}

.infra-government {
    background: rgba(138, 43, 226, 0.15);
    border-color: #8a2be2;
    color: #8a2be2;
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.15);
}

.infra-label {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.4rem;
    white-space: nowrap;
    letter-spacing: 1px;
    background: rgba(10, 14, 10, 0.85);
    padding: 1px 4px;
    border-radius: 2px;
}

/* =============================================
   DATA LOADING INDICATOR
   ============================================= */
#data-loading {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    animation: fade-in-out 1s ease infinite alternate;
}

#data-loading .spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#data-loading span {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--primary-dim);
    letter-spacing: 2px;
}

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

@keyframes fade-in-out {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* =============================================
   LIVE DATA STATS BAR
   ============================================= */
#live-stats {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 650;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.live-stat {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-stat-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    animation: dot-pulse 2s infinite;
}

.live-stat-text {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.live-stat-value {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--primary);
    letter-spacing: 1px;
}

/* =============================================
   CYBER MODULE STYLES
   ============================================= */

/* Tabs */
.cyber-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    padding: 3px;
    border: 1px solid var(--border);
}

.cyber-tab {
    flex: 1;
    padding: 8px 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cyber-tab:hover {
    color: var(--primary);
    background: rgba(0, 255, 65, 0.05);
}

.cyber-tab.active {
    background: rgba(0, 255, 65, 0.15);
    color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.1);
}

/* Sections */
.cyber-section {
    margin-bottom: 16px;
}

.cyber-section-title {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

/* Scan Button */
.cyber-scan-btn {
    width: 100%;
    margin-bottom: 10px;
    font-family: var(--font-mono) !important;
    font-size: 0.7rem !important;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cyber-scan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.cyber-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: cyber-spin 0.8s linear infinite;
}

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

/* Empty state */
.cyber-empty {
    text-align: center;
    padding: 24px 12px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    line-height: 1.8;
}

/* Connected WiFi Card */
.cyber-connected-card {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-active);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.cyber-connected-ssid {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.cyber-connected-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cyber-detail-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    padding: 2px 0;
}

.cyber-val {
    color: var(--primary);
}

/* WiFi Network List */
.cyber-wifi-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cyber-wifi-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    transition: all 0.2s;
}

.cyber-wifi-item:hover {
    border-color: var(--border-active);
    background: rgba(0, 255, 65, 0.03);
}

.cyber-wifi-bar-wrap {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.cyber-wifi-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 6px currentColor;
}

.cyber-wifi-ssid {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.cyber-wifi-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
}

.cyber-wifi-bssid {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    opacity: 0.5;
    margin-top: 2px;
}

/* Channel Chart */
.cyber-channel-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3px;
    height: 80px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.cyber-ch-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    height: 100%;
    justify-content: flex-end;
}

.cyber-ch-bar {
    width: 100%;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
    min-height: 2px;
    box-shadow: 0 0 4px currentColor;
}

.cyber-ch-label {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
}

.cyber-ch-count {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--primary);
    position: absolute;
    top: -12px;
}

.cyber-ch-bar-wrap {
    position: relative;
}

/* Network Devices (NetCut) */
.cyber-device-summary {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.cyber-summary-item {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.cyber-summary-num {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
}

.cyber-summary-label {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.cyber-device-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cyber-device-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    transition: all 0.2s;
}

.cyber-device-item:hover {
    border-color: var(--border-active);
}

.cyber-device-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.cyber-device-info {
    flex: 1;
    min-width: 0;
}

.cyber-device-name {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cyber-device-ip {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--primary);
}

.cyber-device-mac {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
}

.cyber-device-host {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    opacity: 0.6;
}

.cyber-device-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.cyber-small-btn {
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cyber-small-btn:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

/* BLE Devices */
.cyber-ble-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cyber-ble-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    transition: all 0.2s;
}

.cyber-ble-item:hover {
    border-color: var(--border-active);
}

.cyber-ble-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.cyber-ble-info {
    flex: 1;
    min-width: 0;
}

.cyber-ble-name {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cyber-ble-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
}

.cyber-ble-addr {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    opacity: 0.5;
}

.cyber-ble-signal {
    width: 8px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
}

.cyber-ble-signal-bar {
    width: 100%;
    border-radius: 4px;
    transition: height 0.3s ease;
    box-shadow: 0 0 4px currentColor;
}

/* Port Scanner */
.cyber-port-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 3px;
}

.cyber-port-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 40px;
}

.cyber-port-service {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-primary);
    flex: 1;
}

.cyber-port-state {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 1px;
}

/* =============================================
   WALKIE-TALKIE MODULE STYLES
   ============================================= */

.walkie-module {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Status Bar */
.walkie-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.walkie-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.walkie-status-dot.online {
    background: #00ff41;
    box-shadow: 0 0 8px #00ff41;
    animation: walkie-pulse-dot 2s ease infinite;
}

.walkie-status-dot.offline {
    background: #ff2d2d;
    opacity: 0.5;
}

@keyframes walkie-pulse-dot {
    0%, 100% { box-shadow: 0 0 4px #00ff41; }
    50% { box-shadow: 0 0 12px #00ff41, 0 0 20px rgba(0, 255, 65, 0.3); }
}

.walkie-status-text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    flex: 1;
}

.walkie-connect-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    padding: 4px 10px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.walkie-connect-btn:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

/* Callsign */
.walkie-callsign-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.walkie-callsign-section label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.walkie-callsign-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.walkie-callsign-input:focus {
    border-color: var(--primary);
}

/* Channel Selector */
.walkie-channel-section {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.walkie-ch-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.walkie-ch-btn:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.walkie-channel-display {
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid var(--border-active);
    border-radius: 8px;
    padding: 8px 24px;
    text-align: center;
    min-width: 80px;
}

.walkie-ch-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 3px;
}

.walkie-ch-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
    letter-spacing: 4px;
}

/* PTT Button */
.walkie-ptt-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.walkie-ptt-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0, 255, 65, 0.08) 0%, rgba(0, 255, 65, 0.02) 100%);
    border: 2px solid var(--border-active);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

.walkie-ptt-btn:active,
.walkie-ptt-btn.active {
    background: linear-gradient(180deg, rgba(255, 45, 45, 0.2) 0%, rgba(255, 45, 45, 0.05) 100%);
    border-color: #ff2d2d;
    box-shadow: 0 0 20px rgba(255, 45, 45, 0.3);
    transform: scale(0.98);
}

.walkie-ptt-btn.active .walkie-ptt-icon {
    animation: walkie-ptt-pulse 0.8s ease infinite;
}

.walkie-ptt-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.walkie-ptt-icon {
    font-size: 2rem;
}

.walkie-ptt-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 2px;
}

.walkie-ptt-btn.active .walkie-ptt-text {
    color: #ff2d2d;
}

.walkie-ptt-hint {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    opacity: 0.5;
}

@keyframes walkie-ptt-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

/* Volume */
.walkie-volume-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.walkie-vol-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.walkie-volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.walkie-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
}

.walkie-vol-val {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-dim);
    min-width: 30px;
    text-align: right;
}

/* Sections */
.walkie-section {
    margin-bottom: 4px;
}

.walkie-section-title {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.walkie-empty {
    text-align: center;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    opacity: 0.5;
}

/* Users List */
.walkie-users-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.walkie-user-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
}

.walkie-user-item.me {
    border-color: var(--border-active);
    background: rgba(0, 255, 65, 0.05);
}

.walkie-user-dot {
    width: 6px;
    height: 6px;
    background: #00ff41;
    border-radius: 50%;
    box-shadow: 0 0 4px #00ff41;
    flex-shrink: 0;
}

.walkie-user-name {
    flex: 1;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.walkie-user-time {
    color: var(--text-dim);
    font-size: 0.5rem;
}

/* Activity Log */
.walkie-log {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 180px;
    overflow-y: auto;
}

.walkie-log-entry {
    display: flex;
    gap: 8px;
    padding: 3px 6px;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    border-radius: 3px;
    line-height: 1.6;
}

.walkie-log-entry.tx {
    background: rgba(255, 45, 45, 0.05);
    border-left: 2px solid #ff2d2d;
}

.walkie-log-entry.rx {
    background: rgba(0, 170, 255, 0.05);
    border-left: 2px solid #00aaff;
}

.walkie-log-entry.success {
    background: rgba(0, 255, 65, 0.05);
    border-left: 2px solid #00ff41;
}

.walkie-log-entry.join {
    background: rgba(0, 255, 65, 0.03);
    border-left: 2px solid rgba(0, 255, 65, 0.3);
}

.walkie-log-entry.leave {
    background: rgba(255, 170, 0, 0.03);
    border-left: 2px solid rgba(255, 170, 0, 0.3);
}

.walkie-log-entry.error {
    background: rgba(255, 45, 45, 0.05);
    border-left: 2px solid rgba(255, 45, 45, 0.5);
}

.walkie-log-entry.info {
    border-left: 2px solid var(--border);
}

.walkie-log-time {
    color: var(--text-dim);
    opacity: 0.6;
    flex-shrink: 0;
    min-width: 45px;
}

.walkie-log-msg {
    color: var(--text-primary);
}

/* =============================================
   CYBER ATTACK TOOLKIT STYLES
   ============================================= */

.atk-module {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.atk-root-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.atk-root-status {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 1px;
}

.atk-btn-sm {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.5rem;
    padding: 3px 8px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.atk-btn-sm:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.atk-tools-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Attack Card */
.atk-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    overflow: hidden;
    transition: all 0.3s;
}

.atk-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.15), inset 0 0 20px rgba(0, 255, 65, 0.03);
}

.atk-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 255, 65, 0.03);
    border-bottom: 1px solid var(--border);
}

.atk-card-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.atk-card-title {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--primary);
    letter-spacing: 2px;
    font-weight: 600;
}

.atk-card-status {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 1px;
}

.atk-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.atk-desc {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    line-height: 1.5;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

/* Inputs */
.atk-input-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.atk-input-group label {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.atk-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.atk-input:focus {
    border-color: var(--primary);
}

.atk-input.mono {
    letter-spacing: 2px;
    text-transform: uppercase;
}

select.atk-input {
    cursor: pointer;
    appearance: auto;
}

/* Buttons */
.atk-btn-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.atk-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s;
    text-align: center;
}

.atk-btn:hover {
    border-color: var(--primary);
}

.atk-btn.primary {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
    color: var(--primary);
}

.atk-btn.primary:hover {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

.atk-btn.warning {
    background: rgba(255, 170, 0, 0.1);
    border-color: rgba(255, 170, 0, 0.3);
    color: #ffaa00;
}

.atk-btn.warning:hover {
    background: rgba(255, 170, 0, 0.2);
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.2);
}

.atk-btn.danger {
    background: rgba(255, 45, 45, 0.1);
    border-color: rgba(255, 45, 45, 0.3);
    color: #ff2d2d;
}

.atk-btn.danger:hover {
    background: rgba(255, 45, 45, 0.2);
    box-shadow: 0 0 8px rgba(255, 45, 45, 0.2);
}

/* Results */
.atk-result-box {
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.atk-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-dim);
}

.atk-result-row.success {
    background: rgba(0, 255, 65, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.atk-result-row.success .cyber-val {
    font-size: 0.8rem;
    font-weight: 700;
}

/* Progress Bar */
.atk-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.atk-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.atk-progress-fill.pulse {
    animation: atkPulseGreen 1s ease infinite;
}

.atk-progress-fill.pulse-red {
    background: #ff2d2d;
    animation: atkPulseRed 0.5s ease infinite;
}

@keyframes atkPulseGreen {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(0, 255, 65, 0.5); }
    50% { opacity: 0.5; box-shadow: 0 0 8px rgba(0, 255, 65, 0.8); }
}

@keyframes atkPulseRed {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(255, 45, 45, 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 8px rgba(255, 45, 45, 0.8); }
}

/* Terminal */
.atk-terminal {
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--primary);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.6;
}

/* =============================================
   GPS TRACKER MODULE STYLES
   ============================================= */

.trk-module {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trk-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.trk-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.trk-mycode-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.trk-code-display {
    background: #0a0a0a;
    border: 1px solid var(--border-active);
    border-radius: 6px;
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--primary);
    text-align: center;
    letter-spacing: 1px;
    word-break: break-all;
    user-select: all;
    cursor: text;
}

.trk-btn-row {
    display: flex;
    gap: 6px;
}

.trk-hint {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    text-align: center;
    opacity: 0.5;
    letter-spacing: 0.5px;
}

.trk-section-sm {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trk-add-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.trk-add-row {
    display: flex;
    gap: 6px;
}

.trk-section {
    margin-top: 4px;
}

.trk-devices-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Device Card */
.trk-device-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    overflow: hidden;
    transition: all 0.3s;
}

.trk-device-card.online {
    border-color: rgba(0, 255, 65, 0.3);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.08);
}

.trk-device-card.offline {
    opacity: 0.7;
}

.trk-device-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 255, 65, 0.03);
    border-bottom: 1px solid var(--border);
}

.trk-device-name {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--primary);
    letter-spacing: 1px;
    font-weight: 600;
}

.trk-device-status {
    font-size: 0.6rem;
}

.trk-device-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.trk-info-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
}

.trk-device-controls {
    display: flex;
    gap: 4px;
    padding: 6px 10px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
}

.trk-ctrl-btn {
    flex: 1;
    padding: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.trk-ctrl-btn:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.trk-ctrl-btn.alarm:hover {
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.trk-ctrl-btn.flash:hover {
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
}

.trk-ctrl-btn.danger:hover {
    border-color: #ff2d2d;
    background: rgba(255, 45, 45, 0.1);
}

/* Map marker animation */
.trk-map-icon {
    background: none !important;
    border: none !important;
}

@keyframes trkPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0,180,255,0.4); }
    50% { box-shadow: 0 0 20px rgba(0,180,255,0.7), 0 0 30px rgba(0,180,255,0.2); }
}

/* =============================================
   COMMS TABS + CHAT MODULE
   ============================================= */

.comms-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border);
}

.comms-tab {
    flex: 1;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.comms-tab.active {
    background: var(--primary);
    color: #000;
    font-weight: 700;
}

.comms-tab:hover:not(.active) {
    background: rgba(0,255,65,0.08);
}

.chat-module {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-groups-section { margin-top: 4px; }

.chat-groups-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-group-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-group-item:hover {
    border-color: var(--primary);
}

.chat-group-item.active {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.chat-group-icon { font-size: 1rem; }

.chat-group-info { flex: 1; min-width: 0; }

.chat-group-name {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--primary);
    letter-spacing: 1px;
}

.chat-group-code {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    opacity: 0.6;
}

.chat-unread {
    background: #ff2d2d;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.chat-active-section {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(0,255,65,0.04);
    border-bottom: 1px solid var(--border);
}

.chat-header-name {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--primary);
    letter-spacing: 1px;
    font-weight: 600;
}

.chat-header-users {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
}

.chat-messages {
    height: 220px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #0a0a0a;
}

.chat-msg {
    max-width: 85%;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
}

.chat-msg.me {
    align-self: flex-end;
    background: rgba(0,255,65,0.12);
    border: 1px solid rgba(0,255,65,0.2);
    color: var(--primary);
}

.chat-msg.other {
    align-self: flex-start;
    background: rgba(0,180,255,0.1);
    border: 1px solid rgba(0,180,255,0.2);
    color: #88ccff;
}

.chat-msg-name {
    font-size: 0.45rem;
    color: #00aaff;
    margin-bottom: 2px;
    font-weight: 600;
    letter-spacing: 1px;
}

.chat-msg-text {
    word-break: break-word;
    line-height: 1.4;
}

.chat-msg-time {
    font-size: 0.4rem;
    color: var(--text-dim);
    opacity: 0.5;
    margin-top: 2px;
    text-align: right;
}

.chat-input-section {
    display: flex;
    gap: 4px;
    padding: 6px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.3);
}

.chat-input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 10px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--primary);
}

.chat-send-btn {
    background: var(--primary);
    border: none;
    border-radius: 4px;
    padding: 8px 14px;
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    filter: brightness(1.2);
}

/* =============================================
   AIRCRAFT MARKERS
   ============================================= */

.aircraft-icon {
    background: none !important;
    border: none !important;
    transition: transform 0.3s ease;
}

.aircraft-icon:hover {
    transform: scale(1.3);
    z-index: 10000 !important;
}

/* =============================================
   WEATHER POPUP
   ============================================= */

.weather-popup .leaflet-popup-content-wrapper {
    background: rgba(10, 14, 20, 0.95) !important;
    color: #c0c0c0;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.15);
}

.weather-popup .leaflet-popup-tip {
    background: rgba(10, 14, 20, 0.95) !important;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

/* =============================================
   ROUTE PLANNER PANEL
   ============================================= */

/* Drawing Status */
.route-draw-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    transition: all 0.3s;
}

.route-draw-status.active {
    border-color: var(--primary);
    background: rgba(0, 255, 65, 0.05);
    color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.1);
}

.route-draw-dot {
    font-size: 10px;
    color: var(--text-dim);
}

.route-draw-dot.pulse {
    color: var(--primary);
    animation: routePulse 1s ease infinite;
}

@keyframes routePulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 4px var(--primary); }
    50% { opacity: 0.3; text-shadow: 0 0 12px var(--primary); }
}

/* Transport Mode Grid */
.route-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.route-mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.route-mode-btn:hover {
    border-color: rgba(0, 180, 255, 0.4);
    background: rgba(0, 180, 255, 0.05);
}

.route-mode-btn.active {
    border-color: var(--primary);
    background: rgba(0, 255, 65, 0.08);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.1), inset 0 0 12px rgba(0, 255, 65, 0.03);
}

.route-mode-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.route-mode-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    line-height: 1.2;
    flex: 1;
}

.route-mode-btn.active .route-mode-label {
    color: var(--primary);
}

.route-mode-speed {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    opacity: 0.6;
}

.route-mode-btn.active .route-mode-speed {
    color: var(--primary);
    opacity: 0.8;
}

/* Color Row */
.route-color-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.route-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.route-color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.route-color-swatch.active {
    border-color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(255,255,255,0.3);
}

/* Style Row */
.route-style-row {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.route-style-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.route-style-btn span {
    font-family: var(--font-mono);
    font-size: 0.4rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.route-style-btn:hover {
    border-color: rgba(0, 180, 255, 0.4);
}

.route-style-btn.active {
    border-color: var(--primary);
    background: rgba(0, 255, 65, 0.05);
}

.route-style-btn.active span {
    color: var(--primary);
}

/* Width Control */
.route-width-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.route-width-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    flex-shrink: 0;
}

.route-width-value {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--primary);
    letter-spacing: 1px;
    min-width: 30px;
    text-align: right;
}

/* Terrain Grid */
.route-terrain-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.route-terrain-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.route-terrain-btn:hover {
    border-color: rgba(0, 180, 255, 0.4);
    background: rgba(0, 180, 255, 0.05);
}

.route-terrain-btn.active {
    border-color: var(--primary);
    background: rgba(0, 255, 65, 0.08);
    color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.1);
}

/* Tactical Options Toggles */
.route-tactical-opts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.route-opt-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.route-opt-toggle:hover {
    border-color: rgba(0, 180, 255, 0.3);
    background: rgba(0, 180, 255, 0.03);
}

/* ETA Display */
.route-eta-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px;
    margin: 6px 0;
    background: rgba(0, 180, 255, 0.05);
    border: 1px solid rgba(0, 180, 255, 0.2);
    border-radius: 8px;
}

.route-eta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
}

.route-eta-label {
    font-family: var(--font-mono);
    font-size: 0.4rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.route-eta-value {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: #00b4ff;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Waypoint List */
.route-waypoints-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
}

.route-waypoint-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
}

.route-waypoint-item:hover {
    border-color: rgba(0, 180, 255, 0.3);
}

.route-wp-index {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: #00b4ff;
    min-width: 18px;
    text-align: center;
}

.route-wp-coord {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.route-wp-remove {
    background: none;
    border: 1px solid transparent;
    color: var(--text-dim);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.route-wp-remove:hover {
    color: #ff2d2d;
    border-color: rgba(255, 45, 45, 0.3);
    background: rgba(255, 45, 45, 0.1);
}

/* Saved Routes List */
.route-saved-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 250px;
    overflow-y: auto;
}

.route-saved-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.route-saved-item:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 65, 0.03);
}

.route-saved-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.route-saved-info {
    flex: 1;
    min-width: 0;
}

.route-saved-name {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.route-saved-detail {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    opacity: 0.6;
}

.route-saved-actions {
    display: flex;
    gap: 2px;
}

.route-saved-actions button {
    background: none;
    border: 1px solid transparent;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.route-saved-actions button:hover {
    border-color: var(--border);
    background: rgba(255,255,255,0.05);
}

/* Quick Tools Grid */
.route-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.route-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.route-quick-btn span:first-child {
    font-size: 1.2rem;
}

.route-quick-btn span:last-child {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.route-quick-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 65, 0.05);
    transform: translateY(-1px);
}

.route-quick-btn:hover span:last-child {
    color: var(--primary);
}

.route-quick-btn:active {
    transform: translateY(0);
}

/* Navigation Progress */
.route-nav-progress {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.route-nav-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 6px var(--primary);
}

/* Nav sim icon */
.nav-sim-icon {
    background: none !important;
    border: none !important;
}

/* =============================================
   SETTINGS PANEL STYLES
   ============================================= */

/* Toggle switch row */
.route-tactical-toggle {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 255, 65, 0.05);
}
.route-tactical-toggle:last-child { border-bottom: none; }

/* Custom checkbox */
.route-tactical-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 36px;
    height: 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.route-tactical-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.route-tactical-toggle input[type="checkbox"]:checked {
    background: var(--primary-dark);
    border-color: var(--primary);
}
.route-tactical-toggle input[type="checkbox"]:checked::after {
    left: 20px;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

/* Settings dropdowns */
.panel-body select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.panel-body select:focus {
    border-color: var(--border-active);
}
.panel-body select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Settings range sliders */
.panel-body input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.panel-body input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--primary-dark);
    cursor: pointer;
    box-shadow: 0 0 6px var(--primary-glow);
}
.panel-body input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--primary-dark);
    cursor: pointer;
}

/* =========================================
   SHOP BUTTON
   ========================================= */
.bottom-btn.shop-btn {
    background: linear-gradient(135deg, rgba(0,180,255,0.12), rgba(0,255,65,0.08));
    border: 1px solid rgba(0,180,255,0.3);
}
.bottom-btn.shop-btn:active {
    background: rgba(0,180,255,0.2);
}
.bottom-btn.shop-btn svg { fill: var(--info); }
.bottom-btn.shop-btn span { color: var(--info); }

/* =========================================
   RADAR TAB
   ========================================= */
.radar-container { padding: 4px 0; }
.radar-display {
    position: relative;
    width: 280px; height: 280px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 2px solid rgba(0,255,65,0.15);
    box-shadow: 0 0 30px rgba(0,255,65,0.08), inset 0 0 20px rgba(0,0,0,0.5);
}
.radar-display canvas { border-radius: 50%; }
.radar-center-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 1.8rem; font-weight: 700;
    color: var(--primary);
    text-align: center;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(0,255,65,0.5);
}
.radar-stats {
    display: flex; justify-content: center; gap: 20px;
    margin-bottom: 8px;
}
.radar-stat { text-align: center; }
.radar-stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem; font-weight: 700;
}
.radar-stat-label {
    font-family: var(--font-mono);
    font-size: 0.55rem; color: var(--text-dim);
    letter-spacing: 1px;
}
.radar-legend {
    display: flex; justify-content: center; gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.6rem; color: var(--text-dim);
    padding: 6px 0;
}
.radar-device-list { display: flex; flex-direction: column; gap: 4px; }
.radar-device-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    transition: background 0.2s;
}
.radar-device-item:hover { background: var(--bg-tertiary); }
.radar-dev-icon { font-size: 1.1rem; flex-shrink: 0; }
.radar-dev-info { flex: 1; min-width: 0; }
.radar-dev-name {
    font-family: var(--font-mono);
    font-size: 0.7rem; color: var(--text-primary);
    font-weight: 600; letter-spacing: 0.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.radar-dev-meta {
    font-family: var(--font-mono);
    font-size: 0.55rem; color: var(--text-dim);
    margin-top: 2px;
}
.radar-dev-dist {
    font-family: var(--font-display);
    font-size: 0.85rem; font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
}

/* =========================================
   CSI ANALYSIS PANEL
   ========================================= */
.csi-status-display { text-align: center; padding: 8px 0; }
.csi-status-ring {
    width: 140px; height: 140px;
    border-radius: 50%;
    border: 3px solid;
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    animation: csi-pulse 2s ease-in-out infinite;
}
@keyframes csi-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0,255,65,0.1); }
    50% { box-shadow: 0 0 30px rgba(0,255,65,0.2); }
}
.csi-status-inner {
    width: 120px; height: 120px;
    border-radius: 50%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.csi-status-icon { font-size: 2rem; margin-bottom: 4px; }
.csi-status-text {
    font-family: var(--font-mono);
    font-size: 0.6rem; font-weight: 600;
    letter-spacing: 1px;
}
.csi-metrics-row {
    display: flex; justify-content: center; gap: 16px;
}
.csi-metric { text-align: center; }
.csi-metric-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.4rem; font-weight: 700;
}
.csi-metric-label {
    font-family: var(--font-mono);
    font-size: 0.5rem; color: var(--text-dim);
    letter-spacing: 1px;
}
.csi-waveform-container {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(10,14,10,0.92);
}
.csi-waveform-container canvas {
    display: block; width: 100%; height: 120px;
}
.csi-waveform-legend {
    display: flex; justify-content: center; gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.55rem; color: var(--text-dim);
    padding: 6px 0;
}
.csi-event-log {
    max-height: 250px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 3px;
}
.csi-event {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    background: var(--bg-secondary);
    font-family: var(--font-mono);
    font-size: 0.6rem;
}
.csi-event.motion { border-left: 3px solid var(--danger); }
.csi-event.breathing { border-left: 3px solid var(--warning); }
.csi-event.clear { border-left: 3px solid var(--primary); }
.csi-event.info { border-left: 3px solid var(--info); }
.csi-event-time {
    color: var(--text-dim);
    flex-shrink: 0; width: 60px;
}
.csi-event-icon { flex-shrink: 0; }
.csi-event-text { color: var(--text-primary); }
.btn-danger {
    background: linear-gradient(135deg, rgba(255,45,45,0.15), rgba(255,45,45,0.08));
    border: 1px solid rgba(255,45,45,0.3);
    color: var(--danger);
}
.btn-danger:hover { background: rgba(255,45,45,0.2); }

/* CSI Network List */
.csi-network-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.csi-net-item {
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    position: relative;
}
.csi-net-item:hover { background: var(--bg-tertiary); border-color: var(--border); }
.csi-net-selected {
    border-color: var(--primary) !important;
    background: rgba(0,255,65,0.05) !important;
    box-shadow: 0 0 10px rgba(0,255,65,0.08);
}
.csi-net-header {
    display: flex; align-items: center; gap: 6px;
    font-family: var(--font-mono); font-size: 0.7rem;
}
.csi-net-lock { font-size: 0.8rem; }
.csi-net-ssid {
    flex: 1; color: var(--text-primary);
    font-weight: 600; letter-spacing: 0.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.csi-net-signal { font-weight: 700; flex-shrink: 0; }
.csi-net-details {
    display: flex; gap: 8px; margin-top: 4px;
    font-family: var(--font-mono); font-size: 0.5rem; color: var(--text-dim);
}
.csi-net-badge {
    position: absolute; top: 4px; right: 6px;
    font-family: var(--font-mono); font-size: 0.45rem;
    color: var(--primary); letter-spacing: 1px;
    animation: csi-badge-pulse 1.5s infinite;
}
@keyframes csi-badge-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* CSI Subcarrier Heatmap */
.csi-subcarrier-grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 2px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}
.csi-sc-cell {
    aspect-ratio: 1;
    border-radius: 2px;
    transition: background 0.3s;
}
.csi-event.scan { border-left: 3px solid #8a2be2; }

/* =========================================
   SGP DEVICES PANEL
   ========================================= */
.devices-btn {
    background: linear-gradient(135deg, rgba(0,255,65,0.12), rgba(0,180,255,0.08)) !important;
    border: 1px solid rgba(0,255,65,0.25) !important;
}
.devices-btn svg { fill: var(--primary) !important; }
.devices-btn span { color: var(--primary) !important; }

.sgp-dev-scanning {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; margin-top: 8px;
    background: rgba(0,255,65,0.05);
    border: 1px solid rgba(0,255,65,0.15);
    border-radius: 6px;
    font-family: var(--font-mono); font-size: 0.6rem; color: var(--primary);
}
.sgp-dev-scan-anim {
    width: 16px; height: 16px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: sgp-spin 1s linear infinite;
}
@keyframes sgp-spin { to { transform: rotate(360deg); } }

.sgp-dev-discovered-list { display: flex; flex-direction: column; gap: 6px; }
.sgp-dev-discovered {
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.sgp-dev-discovered.sgp-dev-connected {
    border-color: var(--primary);
    background: rgba(0,255,65,0.05);
}
.sgp-dev-disc-header {
    display: flex; align-items: center; gap: 8px;
}
.sgp-dev-disc-icon { font-size: 1.4rem; }
.sgp-dev-disc-info { flex: 1; }
.sgp-dev-disc-name {
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--text-primary); font-weight: 600;
}
.sgp-dev-disc-meta {
    font-family: var(--font-mono); font-size: 0.5rem;
    color: var(--text-dim); margin-top: 2px;
}
.sgp-dev-conn-badge {
    font-family: var(--font-mono); font-size: 0.5rem;
    color: var(--primary); margin-top: 6px;
    animation: csi-badge-pulse 1.5s infinite;
}

.sgp-dev-connected-info {
    padding: 12px;
    background: rgba(0,255,65,0.05);
    border: 1px solid rgba(0,255,65,0.2);
    border-radius: 8px;
}
.sgp-dev-conn-name {
    font-family: var(--font-display); font-size: 1rem;
    color: var(--primary); font-weight: 700;
}
.sgp-dev-conn-status {
    font-family: var(--font-mono); font-size: 0.55rem;
    color: var(--primary); margin: 4px 0 10px;
}
.sgp-dev-conn-actions {
    display: flex; gap: 6px;
}

.sgp-dev-catalog { display: flex; flex-direction: column; gap: 6px; }
.sgp-dev-card {
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.sgp-dev-card:hover {
    border-color: rgba(0,255,65,0.3);
    background: var(--bg-tertiary);
}
.sgp-dev-card-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 4px;
}
.sgp-dev-card-icon { font-size: 1.3rem; }
.sgp-dev-card-title {
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--text-primary); font-weight: 600;
    letter-spacing: 0.5px;
}
.sgp-dev-card-desc {
    font-family: var(--font-mono); font-size: 0.55rem;
    color: var(--text-dim); line-height: 1.5;
    margin-bottom: 6px;
}
.sgp-dev-card-features {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 4px;
}
.sgp-dev-tag {
    font-family: var(--font-mono); font-size: 0.45rem;
    color: var(--primary); letter-spacing: 0.5px;
    padding: 2px 6px;
    background: rgba(0,255,65,0.08);
    border: 1px solid rgba(0,255,65,0.15);
    border-radius: 3px;
}
.sgp-dev-card-chip {
    font-family: var(--font-mono); font-size: 0.5rem;
    color: var(--info); opacity: 0.7;
}

/* ============================================================
   RADIO INTERNACIONAL — panel propio
   ============================================================ */
.radio-panel { padding: 4px 2px 16px; }
.radio-hero { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-glow), transparent); border: 1px solid var(--border); border-radius: 10px; }
.radio-hero-icon { font-size: 2.2rem; filter: drop-shadow(0 0 6px var(--primary-glow)); }
.radio-hero-icon.spin { animation: radioSpin 4s linear infinite; }
@keyframes radioSpin { to { transform: rotate(360deg); } }
.radio-hero-title { font-family: var(--font-display); font-weight: 800; letter-spacing: 1px; color: var(--text-bright); font-size: 0.95rem; }
.radio-hero-sub { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-secondary); margin-top: 2px; }
.radio-now { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px;
    background: var(--bg-tertiary); border: 1px solid var(--border-active); border-radius: 8px; }
.radio-now-name { flex: 1; font-family: var(--font-mono); font-size: 0.7rem; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-now-stop { background: transparent; border: 1px solid var(--danger); color: var(--danger); border-radius: 6px; padding: 4px 8px; font-size: 0.5rem; cursor: pointer; font-family: var(--font-mono); }
.radio-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.radio-eq i { width: 3px; background: var(--primary); animation: radioEq 0.8s ease-in-out infinite; }
.radio-eq i:nth-child(1){height:40%;animation-delay:0s}
.radio-eq i:nth-child(2){height:80%;animation-delay:0.2s}
.radio-eq i:nth-child(3){height:55%;animation-delay:0.4s}
.radio-eq i:nth-child(4){height:90%;animation-delay:0.1s}
@keyframes radioEq { 0%,100%{transform:scaleY(0.4)} 50%{transform:scaleY(1)} }
.radio-vol { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.7rem; }
.radio-vol input { flex: 1; accent-color: var(--primary); }
.radio-search { display: flex; gap: 6px; margin-bottom: 8px; }
.radio-search input { flex: 1; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 8px;
    color: var(--text-bright); padding: 8px 10px; font-family: var(--font-mono); font-size: 0.7rem; }
.radio-search input:focus { outline: none; border-color: var(--primary); }
.radio-search .btn { padding: 8px 12px; }
.radio-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.radio-quick button { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary);
    border-radius: 20px; padding: 5px 11px; font-size: 0.6rem; font-family: var(--font-mono); cursor: pointer; transition: all .15s; }
.radio-quick button:hover { border-color: var(--primary); color: var(--primary); }
.radio-count { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.radio-cards { display: flex; flex-direction: column; gap: 6px; }
.radio-card { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all .15s; }
.radio-card:hover { border-color: var(--border-active); background: var(--bg-tertiary); }
.radio-card.playing { border-color: var(--primary); background: var(--primary-glow); }
.radio-card-art { width: 38px; height: 38px; min-width: 38px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-primary); border-radius: 6px; font-size: 1.1rem; overflow: hidden; }
.radio-card-art img { width: 100%; height: 100%; object-fit: cover; }
.radio-card-info { flex: 1; min-width: 0; }
.radio-card-name { font-family: var(--font-ui); font-weight: 600; font-size: 0.75rem; color: var(--text-bright);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-card-meta { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-secondary); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-card-play { font-size: 0.9rem; color: var(--primary); padding: 0 4px; }

/* ============================================================
   HERRAMIENTAS — sensores
   ============================================================ */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 2px; }
.tool-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; padding: 18px 10px; background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 12px; cursor: pointer; transition: all .15s; text-align: center; }
.tool-card:hover { border-color: var(--primary); background: var(--bg-tertiary); transform: translateY(-2px); }
.tool-card-icon { font-size: 2rem; }
.tool-card-name { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--text-bright); letter-spacing: 0.5px; }
.tool-card-desc { font-family: var(--font-mono); font-size: 0.5rem; color: var(--text-secondary); }
.tool-card-on { position: absolute; top: 6px; right: 8px; font-size: 0.5rem; color: var(--primary); font-family: var(--font-mono); }
.tools-note { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-dim); line-height: 1.6; margin-top: 12px; padding: 0 4px; }
.tool-view { padding: 6px 2px; }
.tool-back { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); border-radius: 8px;
    padding: 6px 12px; font-family: var(--font-mono); font-size: 0.6rem; cursor: pointer; margin-bottom: 14px; }
.tool-back:hover { border-color: var(--primary); color: var(--primary); }
.tool-view-title { font-family: var(--font-display); font-weight: 800; letter-spacing: 1px; color: var(--text-bright);
    text-align: center; font-size: 0.9rem; margin-bottom: 18px; }
/* Compass */
.tv-compass { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.tv-compass-ring { position: relative; width: 200px; height: 200px; border-radius: 50%;
    border: 2px solid var(--border-active); background: radial-gradient(circle, var(--bg-tertiary), var(--bg-primary));
    box-shadow: 0 0 24px var(--primary-glow), inset 0 0 30px rgba(0,0,0,0.6); transition: transform .12s linear; }
.tv-compass-ring span { position: absolute; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--text-secondary); }
.tv-c-n { top: 8px; left: 50%; transform: translateX(-50%); color: var(--danger) !important; }
.tv-c-s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.tv-c-e { right: 10px; top: 50%; transform: translateY(-50%); }
.tv-c-w { left: 10px; top: 50%; transform: translateY(-50%); }
.tv-compass-needle { position: absolute; top: 18px; bottom: 18px; left: 50%; width: 4px; transform: translateX(-50%);
    background: linear-gradient(to bottom, var(--danger) 0 50%, #5a6a5a 50% 100%); border-radius: 2px; }
.tv-compass-read { text-align: center; }
.tv-compass-read span { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: var(--primary); }
.tv-compass-read small { display: block; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); letter-spacing: 2px; }
/* Level */
.tv-level { position: relative; width: 200px; height: 200px; margin: 0 auto; border-radius: 50%;
    border: 2px solid var(--border-active); background: radial-gradient(circle, var(--bg-tertiary), var(--bg-primary)); overflow: hidden; }
.tv-level-target { position: absolute; top: 50%; left: 50%; width: 60px; height: 60px; transform: translate(-50%,-50%);
    border: 1px dashed var(--border-active); border-radius: 50%; }
.tv-level-target::after { content:''; position:absolute; top:50%; left:50%; width:130px; height:1px; background:var(--border);
    transform: translate(-50%,-50%); box-shadow: 0 0 0 0 transparent; }
.tv-level-bubble { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
    border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--primary), var(--primary-dark));
    box-shadow: 0 0 16px var(--primary-glow); transition: transform .08s linear; }
.tv-level-read { text-align: center; margin-top: 16px; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--primary); }
/* Decibels */
.tv-db { text-align: center; }
.tv-db-val { font-family: var(--font-display); font-weight: 800; font-size: 4rem; color: var(--primary); line-height: 1; text-shadow: 0 0 18px var(--primary-glow); }
.tv-db-unit { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 2px; margin-bottom: 18px; }
.tv-db-bar { height: 16px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.tv-db-fill { height: 100%; width: 0%; border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--warning) 70%, var(--danger)); transition: width .08s linear; }
.tv-db-peak { margin-top: 12px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); }
.tv-db-peak span { color: var(--warning); }
/* GPS */
.tv-gps { text-align: center; }
.tv-gps-speed { font-family: var(--font-display); font-weight: 800; color: var(--primary); margin-bottom: 18px; }
.tv-gps-speed span { font-size: 4.5rem; line-height: 1; text-shadow: 0 0 18px var(--primary-glow); }
.tv-gps-speed small { display: block; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); letter-spacing: 3px; }
.tv-gps-row { display: flex; justify-content: space-between; padding: 10px 14px; margin-bottom: 6px;
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; font-family: var(--font-mono); font-size: 0.8rem; }
.tv-gps-row span { color: var(--text-secondary); }
.tv-gps-row b { color: var(--text-bright); }

/* ============================================================
   NEWS — live headlines
   ============================================================ */
.news-panel { padding: 4px 2px 16px; }
.news-hero { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(0,180,255,0.12), transparent); border: 1px solid var(--border); border-radius: 10px; }
.news-hero-icon { font-size: 2.2rem; filter: drop-shadow(0 0 6px rgba(0,180,255,0.3)); }
.news-hero-title { font-family: var(--font-display); font-weight: 800; letter-spacing: 1px; color: var(--text-bright); font-size: 0.95rem; }
.news-hero-sub { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-secondary); margin-top: 2px; }
.news-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.news-quick button { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary);
    border-radius: 20px; padding: 5px 11px; font-size: 0.6rem; font-family: var(--font-mono); cursor: pointer; transition: all .15s; }
.news-quick button:hover { border-color: var(--info); color: var(--info); }
.news-count { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.news-list { display: flex; flex-direction: column; gap: 8px; }
.news-card { display: flex; gap: 10px; background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden; cursor: pointer; transition: all .15s; }
.news-card:hover { border-color: var(--info); background: var(--bg-tertiary); }
.news-card-img { width: 84px; min-width: 84px; background-size: cover; background-position: center; background-color: var(--bg-primary); }
.news-card-noimg { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; opacity: 0.4; }
.news-card-body { padding: 8px 10px 8px 0; flex: 1; min-width: 0; }
.news-card-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.45rem; letter-spacing: 1px;
    color: var(--info); border: 1px solid var(--info); border-radius: 4px; padding: 1px 5px; margin-bottom: 4px; }
.news-card-tag.hot { color: var(--danger); border-color: var(--danger); }
.news-card-title { font-family: var(--font-ui); font-weight: 600; font-size: 0.78rem; color: var(--text-bright); line-height: 1.25; }
.news-card-sum { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }

/* Tool: Signal Light (SOS) */
.tv-signal { text-align: center; }
.tv-signal-light { width: 160px; height: 160px; margin: 0 auto; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; letter-spacing: 3px;
    background: var(--bg-tertiary); color: var(--text-dim); border: 2px solid var(--border); transition: all .04s; }
.tv-signal-light.on { background: #eaffea; color: #0a0e0a; border-color: #fff; box-shadow: 0 0 60px 12px rgba(255,255,255,0.8); }
/* Tool: Vibration waveform */
.tv-wave { width: 100%; height: 90px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 8px; margin: 10px 0; }

/* ============================================================
   PAN dropdown (Map / Radar 3D) + Radar 3D overlay
   ============================================================ */
.pan-menu { position: fixed; z-index: 1200; background: var(--bg-panel); border: 1px solid var(--border-active);
    border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 6px 28px rgba(0,0,0,0.7); }
.pan-menu.hidden { display: none; }
.pan-menu button { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-bright);
    font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 1px; padding: 10px 18px; border-radius: 6px;
    cursor: pointer; text-align: left; white-space: nowrap; transition: all .15s; }
.pan-menu button:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-secondary); }

#radar3d-overlay { position: fixed; inset: 0; z-index: 1500; background: #020202; }
#radar3d-overlay.hidden { display: none; }
#radar3d-frame { width: 100%; height: 100%; border: 0; display: block; }
#radar3d-close { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1600;
    background: rgba(10,14,10,0.92); border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-mono);
    font-size: 0.7rem; padding: 8px 16px; border-radius: 20px; cursor: pointer; letter-spacing: 2px; }
#radar3d-close:hover { background: var(--primary); color: #000; box-shadow: 0 0 16px var(--primary-glow); }

/* AI Camera overlay */
#aicam-overlay { position: fixed; inset: 0; z-index: 1500; background: #000; }
#aicam-overlay.hidden { display: none; }
#aicam-frame { width: 100%; height: 100%; border: 0; display: block; }
#aicam-close { position: fixed; top: 12px; right: 12px; z-index: 1600;
    background: rgba(10,14,10,0.92); border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-mono);
    font-size: 0.68rem; padding: 8px 13px; border-radius: 20px; cursor: pointer; letter-spacing: 1px; }
#aicam-close:hover { background: var(--primary); color: #000; box-shadow: 0 0 16px var(--primary-glow); }

/* AR HUD overlay */
#ar-overlay { position: fixed; inset: 0; z-index: 1500; background: #000; overflow: hidden; }
#ar-overlay.hidden { display: none; }
#ar-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
#ar-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#ar-close { position: fixed; top: 12px; right: 12px; z-index: 1600; background: rgba(10,14,10,0.92);
    border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-mono); font-size: 0.68rem;
    padding: 8px 13px; border-radius: 20px; cursor: pointer; letter-spacing: 1px; }
#ar-close:hover { background: var(--primary); color: #000; box-shadow: 0 0 16px var(--primary-glow); }
#ar-hud { position: fixed; top: 12px; left: 12px; z-index: 1550; background: rgba(3,7,4,0.6);
    border: 1px solid rgba(0,255,65,0.35); border-radius: 10px; padding: 7px 11px; backdrop-filter: blur(3px); }
#ar-heading { font-family: var(--font-display, 'Orbitron', sans-serif); font-size: 1.35rem; font-weight: 800; color: var(--primary); line-height: 1; }
#ar-status { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-dim); margin-top: 3px; }
#ar-status.err { color: var(--danger); }
#ar-modes { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 1600; }
.ar-mode { background: rgba(3,7,4,0.72); border: 1px solid rgba(0,255,65,0.3); color: #bfe; border-radius: 12px;
    padding: 9px 15px; font-family: var(--font-mono); font-size: 0.62rem; cursor: pointer; white-space: nowrap; }
.ar-mode.on { background: var(--primary); color: #001; border-color: var(--primary); font-weight: 700; }

/* Live shared ops map — teammate position markers */
.ops-teampos { pointer-events: none; }
.ops-pos-dot { width: 12px; height: 12px; border-radius: 50%; background: #4a90d9; border: 2px solid #fff;
    box-shadow: 0 0 8px #4a90d9; animation: opsPulse 1.6s infinite; }
@keyframes opsPulse { 0%,100% { box-shadow: 0 0 6px #4a90d9; } 50% { box-shadow: 0 0 16px #4a90d9; } }
.ops-pos-label { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); white-space: nowrap;
    font-family: var(--font-mono); font-size: 0.55rem; color: #4a90d9; text-shadow: 0 0 3px #000; font-weight: 700; }

/* PRO / freemium gating — premium GOLD-neon look so paid features stand out from the green UI */
.tool-btn.pro-locked, .mobile-tool-btn.pro-locked { position: relative; }
.tool-btn.pro-locked svg { fill: #ffc63a; filter: drop-shadow(0 0 4px rgba(255,198,58,0.6)); }
.tool-btn.pro-locked span { color: #ffc63a; text-shadow: 0 0 6px rgba(255,198,58,0.45); }
.mobile-tool-btn.pro-locked span, .mobile-tool-btn.pro-locked { color: #ffc63a !important; text-shadow: 0 0 6px rgba(255,198,58,0.45); }
.tool-btn.pro-locked { border-radius: 8px; animation: proPulse 2.6s ease-in-out infinite; }
@keyframes proPulse {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(255,198,58,0.28); }
    50% { box-shadow: inset 0 0 9px rgba(255,198,58,0.30), inset 0 0 0 1px rgba(255,198,58,0.55); }
}
.tool-btn.pro-locked::after, .mobile-tool-btn.pro-locked::after {
    content: '🔒'; position: absolute; top: 2px; right: 4px; font-size: 0.56rem; opacity: 0.95;
    filter: drop-shadow(0 0 2px rgba(255,198,58,0.85)); pointer-events: none;
}
/* PRO tabs inside the RADAR panel */
.cyber-tab.pro-tab { color: #ffc63a; }
.cyber-tab.pro-tab::after { content: ' 🔒'; font-size: 0.85em; filter: drop-shadow(0 0 2px rgba(255,198,58,0.8)); }
.layer-toggle.layer-locked { opacity: 0.72; }
.layer-toggle.layer-locked .layer-toggle-label span:last-child { color: #ffc63a; }
.layer-toggle.layer-locked .layer-toggle-label::after { content: ' 🔒'; font-size: 0.8em; filter: drop-shadow(0 0 2px rgba(255,198,58,0.8)); }
#pro-modal { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.82); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.pro-box { background: var(--bg-panel, #0a0e0a); border: 1px solid var(--primary); border-radius: 16px; padding: 22px; max-width: 340px; width: 100%; text-align: center; box-shadow: 0 0 40px rgba(0,255,65,0.25); }
.pro-badge { display: inline-block; background: var(--primary); color: #001; font-family: var(--font-display, 'Orbitron', sans-serif); font-weight: 800; letter-spacing: 1px; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; }
.pro-title { font-family: var(--font-display, 'Orbitron', sans-serif); font-size: 1rem; color: var(--text-primary); margin: 14px 0 4px; }
.pro-sub { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-dim); margin-bottom: 12px; }
.pro-list { text-align: left; margin: 0 0 12px; max-height: 40vh; overflow-y: auto; padding-right: 4px; }
.pro-list::-webkit-scrollbar { width: 4px; }
.pro-list::-webkit-scrollbar-thumb { background: rgba(255,198,58,0.4); border-radius: 4px; }
.pro-feat { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-primary); padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.06); line-height: 1.35; }
.pro-tag { font-family: var(--font-mono); font-size: 0.52rem; color: #ffc63a; margin: 0 0 12px; letter-spacing: 0.3px; }
.pro-cta { width: 100%; background: var(--primary); color: #001; border: none; border-radius: 10px; padding: 12px; font-family: var(--font-display, 'Orbitron', sans-serif); font-weight: 800; letter-spacing: 1px; cursor: pointer; font-size: 0.85rem; }
.pro-cta:hover { box-shadow: 0 0 18px var(--primary-glow, rgba(0,255,65,0.5)); }
/* PRO plan selector */
.pro-plans { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.pro-plan { position: relative; width: 100%; background: rgba(0,255,65,0.06); border: 1px solid rgba(0,255,65,0.35); border-radius: 12px; padding: 12px 14px; cursor: pointer; text-align: left; }
.pro-plan.best { border-color: var(--primary); background: rgba(0,255,65,0.12); box-shadow: 0 0 14px rgba(0,255,65,0.18); margin-top: 8px; }
.pro-plan:hover { box-shadow: 0 0 16px var(--primary-glow, rgba(0,255,65,0.4)); }
.pp-badge { position: absolute; top: -9px; left: 12px; background: var(--primary); color: #001; font-family: var(--font-mono); font-size: 0.5rem; font-weight: 700; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 10px; }
.pp-row { display: flex; align-items: baseline; justify-content: space-between; }
.pp-name { font-family: var(--font-display, 'Orbitron', sans-serif); font-weight: 800; color: #eafff0; font-size: 0.95rem; letter-spacing: 1px; }
.pp-price { font-family: var(--font-display, 'Orbitron', sans-serif); font-weight: 800; color: var(--primary); font-size: 1.15rem; }
.pp-price small { font-size: 0.62rem; color: var(--text-dim); font-weight: 600; }
.pro-restore { width: 100%; background: transparent; color: #ffc63a; border: none; margin-top: 6px; font-family: var(--font-mono); font-size: 0.62rem; cursor: pointer; padding: 4px; text-decoration: underline; }
.pro-close { width: 100%; background: transparent; color: var(--text-dim); border: none; margin-top: 4px; font-family: var(--font-mono); font-size: 0.6rem; cursor: pointer; padding: 6px; }

/* ============================================================
   COMMS extras — 4 tabs, frequency, contacts, mesh, QR modal
   ============================================================ */
.comms-tabs { display: flex; gap: 4px; }
.comms-tab { flex: 1; font-size: 0.6rem !important; padding: 8px 4px !important; letter-spacing: 0.5px; white-space: nowrap; }
.walkie-ch-sub { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-secondary); margin-top: 2px; }
.walkie-freq-jump { display: flex; gap: 6px; margin: 8px 0 4px; }
.walkie-freq-jump input { flex: 1; }
.contact-mycode { font-family: var(--font-mono); font-size: 0.62rem; color: var(--primary); word-break: break-all;
    background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 6px; padding: 8px; margin: 6px 0; }
/* Mesh */
.mesh-hero { text-align: center; padding: 18px 12px; background: linear-gradient(135deg, var(--primary-glow), transparent);
    border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.mesh-hero-icon { font-size: 2.4rem; filter: drop-shadow(0 0 8px var(--primary-glow)); }
.mesh-hero-title { font-family: var(--font-display); font-weight: 800; letter-spacing: 2px; color: var(--text-bright); margin-top: 6px; }
.mesh-hero-sub { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-secondary); line-height: 1.5; margin-top: 8px; }
.mesh-note { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-dim); line-height: 1.6; margin-top: 12px;
    border-top: 1px solid var(--border); padding-top: 10px; }
/* QR modal */
#qr-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(5,8,5,0.92); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.qr-box { background: var(--bg-secondary); border: 1px solid var(--border-active); border-radius: 12px; padding: 22px; width: 300px; max-width: 88vw;
    text-align: center; box-shadow: 0 0 40px var(--primary-glow); }
.qr-title { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--text-bright); margin-bottom: 14px; letter-spacing: 1px; }
.qr-img { width: 240px; max-width: 100%; background: #fff; border-radius: 8px; padding: 8px; }
.qr-code { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-secondary); word-break: break-all; margin-top: 12px; }

/* ============================================================
   Red-light night mode
   ============================================================ */
#night-overlay { position: fixed; inset: 0; background: rgba(210, 0, 0, 0.32); pointer-events: none; z-index: 1400; }
#night-overlay.hidden { display: none; }
#night-toggle.active svg { fill: var(--danger); filter: drop-shadow(0 0 5px var(--danger)); }
body.night-mode { filter: saturate(0.55); }

/* ============================================================
   In-app QR scanner
   ============================================================ */
#qr-scanner { position: fixed; inset: 0; z-index: 2100; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#qr-scanner.hidden { display: none; }
#qr-video { width: 100%; height: 100%; object-fit: cover; }
.qr-scan-frame { position: absolute; width: 240px; height: 240px; max-width: 70vw; max-height: 70vw; border: 3px solid var(--primary); border-radius: 16px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.55), 0 0 20px var(--primary-glow) inset; }
.qr-scan-hint { position: absolute; bottom: 112px; left: 0; right: 0; text-align: center; color: var(--text-bright); font-family: var(--font-mono); font-size: 0.8rem; padding: 0 20px; }
.qr-scan-cancel { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); background: var(--bg-panel); border: 1px solid var(--primary); color: var(--primary); padding: 12px 28px; border-radius: 24px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 1px; cursor: pointer; }
.qr-scan-cancel:hover { background: var(--primary); color: #000; }

/* 3D Buildings (Catastro) overlay */
#catastro-overlay { position: fixed; inset: 0; z-index: 1500; background: #04060a; }
#catastro-overlay.hidden { display: none; }
#catastro-frame { width: 100%; height: 100%; border: 0; display: block; }
#catastro-close { position: fixed; top: 12px; right: 12px; z-index: 1600; background: var(--bg-panel); border: 1px solid var(--primary); color: var(--primary); padding: 8px 16px; border-radius: 20px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 1px; cursor: pointer; }
#catastro-close:hover { background: var(--primary); color: #000; box-shadow: 0 0 16px var(--primary-glow); }

#orbit-overlay { position: fixed; inset: 0; z-index: 1500; background: #02040a; }
#orbit-overlay.hidden { display: none; }
#orbit-frame { width: 100%; height: 100%; border: 0; display: block; }
#orbit-close { position: fixed; bottom: 14px; left: 14px; z-index: 1600; background: rgba(10,14,10,0.92); border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-mono); font-size: 0.7rem; padding: 8px 16px; border-radius: 20px; cursor: pointer; letter-spacing: 2px; }
#orbit-close:hover { background: var(--primary); color: #000; box-shadow: 0 0 16px var(--primary-glow); }

/* Offline map download */
#offline-overlay { position: fixed; inset: 0; z-index: 1500; background: #02040a; }
#offline-overlay.hidden { display: none; }
#offline-map { position: absolute; inset: 0; background: #02040a; }
#offline-close { position: fixed; top: 12px; right: 12px; z-index: 1650; background: rgba(10,14,10,0.92); border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-mono); font-size: 0.7rem; padding: 8px 16px; border-radius: 20px; cursor: pointer; letter-spacing: 2px; }
#offline-close:hover { background: var(--primary); color: #000; box-shadow: 0 0 16px var(--primary-glow); }
#sel-box { position: absolute; z-index: 1550; border: 2px solid var(--primary); background: rgba(0,255,65,0.08); box-shadow: 0 0 0 4000px rgba(2,4,10,0.55); box-sizing: border-box; }
#sel-box .sb-body { position: absolute; inset: 0; cursor: move; }
#sel-box .sb-handle { position: absolute; width: 20px; height: 20px; background: var(--primary); border: 2px solid #02040a; border-radius: 50%; z-index: 2; }
#sel-box .sb-nw { top: -11px; left: -11px; cursor: nwse-resize; }
#sel-box .sb-ne { top: -11px; right: -11px; cursor: nesw-resize; }
#sel-box .sb-sw { bottom: -11px; left: -11px; cursor: nesw-resize; }
#sel-box .sb-se { bottom: -11px; right: -11px; cursor: nwse-resize; }
#offline-panel { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 1600; width: 360px; max-width: 94vw; background: rgba(6,10,8,0.95); border: 1px solid var(--primary); border-radius: 12px; padding: 14px 16px; backdrop-filter: blur(8px); box-shadow: 0 0 26px rgba(0,255,65,0.18); }
.off-title { font-family: var(--font-display, 'Orbitron', sans-serif); font-weight: 700; font-size: 0.82rem; letter-spacing: 1.5px; color: var(--text-bright, #e8ffe9); margin-bottom: 4px; }
.off-hint { font-family: var(--font-mono); font-size: 0.52rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.4; }
.off-types { display: flex; gap: 5px; margin-bottom: 11px; }
.off-type-btn { flex: 1; font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.2px; padding: 7px 2px; border-radius: 6px; border: 1px solid var(--border); background: rgba(0,255,65,0.04); color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.off-type-btn:hover { border-color: var(--primary); color: var(--primary); }
.off-type-btn.active { background: var(--primary); color: #000; border-color: var(--primary); font-weight: 700; }

/* NAVIGATE TO — start/stops/end, modes, escape routes, GPS follow */
.nav-field { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.nav-dot { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700; color: #000; }
.nav-dot.start { background: #00b4ff; }
.nav-dot.end { background: var(--primary); }
.nav-dot.via { background: #ffaa00; }
.nav-inp { flex: 1; min-width: 0; }
.nav-loc-btn { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border-active); background: var(--bg-tertiary); color: var(--primary); cursor: pointer; font-size: 0.78rem; }
.nav-loc-btn:hover { background: rgba(0,255,65,0.15); }
.nav-loc-btn.del { color: var(--danger); border-color: rgba(255,45,45,0.4); font-size: 0.68rem; }
.nav-addwp { width: 100%; background: transparent; border: 1px dashed var(--border-active); color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.54rem; padding: 6px; border-radius: 6px; cursor: pointer; margin-bottom: 8px; }
.nav-addwp:hover { border-color: var(--primary); color: var(--primary); }
.nav-modes { display: flex; gap: 4px; margin-bottom: 8px; }
.nav-mode-btn { flex: 1; padding: 7px 1px; border-radius: 5px; cursor: pointer; font-family: var(--font-mono); font-size: 0.49rem; border: 1px solid var(--border-active); background: var(--bg-tertiary); color: var(--primary); white-space: nowrap; }
.nav-mode-btn.active { background: var(--primary); color: #000; font-weight: 700; }
.nav-actions { display: flex; gap: 6px; margin-top: 8px; }
.nav-act { flex: 1; padding: 9px 4px; border-radius: 6px; cursor: pointer; font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.5px; border: 1px solid var(--border-active); background: var(--bg-tertiary); }
.nav-act.escape { border-color: var(--danger); color: var(--danger); }
.nav-act.escape:hover { background: rgba(255,45,45,0.15); }
.nav-act.follow { border-color: var(--primary); color: var(--primary); }
.nav-act.follow:hover { background: rgba(0,255,65,0.12); }
.nav-act.follow.active { background: var(--primary); color: #000; font-weight: 700; }
#nav-alts { margin-top: 8px; }
.nav-alts-title { font-family: var(--font-mono); font-size: 0.5rem; color: var(--danger); letter-spacing: 0.5px; margin-bottom: 5px; }
.nav-alt-item { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.56rem; color: var(--text-secondary); padding: 3px 0; }
.nav-alt-sw { width: 14px; height: 4px; border-radius: 2px; flex: 0 0 auto; }
.nav-clear-alts { width: 100%; background: transparent; border: 1px solid var(--border); color: var(--text-dim); font-family: var(--font-mono); font-size: 0.5rem; padding: 5px; border-radius: 5px; cursor: pointer; margin-top: 5px; }
@keyframes navBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.18; } }
.nav-alt-blink { animation: navBlink 0.9s ease-in-out infinite; }
.nav-mk { background: none; border: none; }
.nav-pin { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700; color: #000; border: 2px solid #02040a; box-shadow: 0 0 6px rgba(0,0,0,0.7); }
.nav-pin.start { background: #00b4ff; }
.nav-pin.end { background: var(--primary); }
.nav-pin.via { background: #ffaa00; }
.nav-arrow-wrap { background: none; border: none; }
.nav-arrow { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--primary); text-shadow: 0 0 8px var(--primary), 0 0 3px #000; transition: transform 0.2s linear; }
.off-detail { margin-bottom: 10px; }
.off-detail-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.56rem; color: var(--text-secondary); margin-bottom: 4px; }
.off-detail-row span:last-child { color: var(--primary); }
#off-detail-slider { width: 100%; accent-color: var(--primary); }
.off-stats { display: flex; gap: 8px; margin-bottom: 11px; }
.off-stats > div { flex: 1; text-align: center; background: rgba(0,255,65,0.05); border: 1px solid var(--border); border-radius: 7px; padding: 7px 3px; }
.off-stats b { display: block; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-bright, #e8ffe9); }
.off-stats small { font-family: var(--font-mono); font-size: 0.46rem; color: var(--text-dim); letter-spacing: 0.5px; }
.off-btn { width: 100%; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 1px; padding: 11px; border-radius: 8px; border: 1px solid var(--primary); background: var(--primary); color: #000; cursor: pointer; font-weight: 700; }
.off-btn:hover { box-shadow: 0 0 16px var(--primary-glow); }
.off-btn:disabled { background: transparent; color: var(--warning, #ffaa00); border-color: var(--warning, #ffaa00); cursor: not-allowed; font-size: 0.56rem; }
#off-progress { display: none; height: 8px; background: rgba(0,255,65,0.1); border-radius: 5px; margin-top: 10px; overflow: hidden; }
#off-bar { height: 100%; width: 0%; background: var(--primary); border-radius: 5px; transition: width 0.2s; }
#off-ptext { font-family: var(--font-mono); font-size: 0.54rem; color: var(--text-secondary); text-align: center; margin-top: 6px; min-height: 12px; }
#off-downloaded { margin-top: 8px; max-height: 90px; overflow-y: auto; }
.off-region { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-secondary); padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 5px; }
.off-region .odel { color: var(--danger); cursor: pointer; }
.off-clear { width: 100%; font-family: var(--font-mono); font-size: 0.54rem; padding: 7px; border-radius: 6px; border: 1px solid var(--danger); background: transparent; color: var(--danger); cursor: pointer; margin-top: 4px; }

/* ============================================================
   Pro compass + Light + Audio tools
   ============================================================ */
.tv-compass-pro { position: relative; display: flex; flex-direction: column; align-items: center; padding: 8px 0; }
#cmp-canvas { width: 280px; max-width: 78vw; height: auto; aspect-ratio: 1; }
.cmp-lubber { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 0; height: 0;
    border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 14px solid var(--primary);
    filter: drop-shadow(0 0 5px var(--primary-glow)); z-index: 2; }
.cmp-readout { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: var(--text-bright);
    letter-spacing: 2px; margin-top: 12px; text-shadow: 0 0 14px var(--primary-glow); }
.cmp-card { font-family: var(--font-mono); font-size: 0.72rem; color: var(--primary); letter-spacing: 2px; margin-top: 2px; }
.cmp-hint { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-dim); margin-top: 10px; text-align: center; }
/* Light */
.tv-light { display: flex; flex-direction: column; align-items: stretch; padding: 6px 2px; }
.light-orb { font-size: 3.2rem; text-align: center; margin: 6px 0 14px; filter: grayscale(0.4); transition: 0.15s; }
.light-orb.on { filter: none; text-shadow: 0 0 30px var(--warning); transform: scale(1.08); }
.light-modes { display: flex; gap: 6px; }
.light-modes button { flex: 1; background: var(--bg-tertiary); border: 1px solid var(--border-active); color: var(--primary);
    padding: 10px 4px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.62rem; cursor: pointer; font-weight: bold; }
.light-modes button:hover { background: var(--primary); color: #000; }
.light-swatches { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.light-sw { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--border-active); cursor: pointer; box-shadow: 0 0 8px rgba(0,0,0,0.4); }
.light-sw:hover { transform: scale(1.12); }
#screen-lamp { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 40px; }
.lamp-hint { font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.7; }
/* Audio (mosquito / tone) */
.tv-audio { display: flex; flex-direction: column; padding: 6px 2px; }
.audio-freq { text-align: center; font-family: var(--font-display); font-weight: 800; color: var(--text-bright); margin: 10px 0 14px; }
.audio-freq span { font-size: 2.6rem; text-shadow: 0 0 14px var(--primary-glow); }
.audio-freq small { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-secondary); margin-left: 6px; }
.audio-presets { display: flex; gap: 6px; margin-top: 12px; }
.audio-presets button { flex: 1; background: var(--bg-tertiary); border: 1px solid var(--border-active); color: var(--primary);
    padding: 9px 4px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.62rem; cursor: pointer; font-weight: bold; }
.audio-presets button:hover { background: var(--primary); color: #000; }
