﻿/* ── WpsTracer – Forensic Dark Theme ──────────────────────────────────────── */

:root {
    --bg-base: #0a0c0f;
    --bg-panel: #0f1318;
    --bg-sidebar: #0d1117;
    --bg-card: #141920;
    --bg-input: #0a0d12;
    --border: #1e2832;
    --border-bright: #2a3844;
    --accent: #00e87a;
    --accent-dim: #00994d;
    --accent-glow: rgba(0, 232, 122, 0.15);
    --warn: #ff8c00;
    --danger: #ff4455;
    --text-pri: #c9d6e3;
    --text-sec: #6b7f92;
    --text-dim: #3d5060;
    --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    --font-ui: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --radius: 4px;
    --radius-lg: 8px;
}

/* Import */
@@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background: var(--bg-base);
    color: var(--text-pri);
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 20px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 100;
}

    .navbar::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
        opacity: 0.4;
    }

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
}

.brand-name {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-pri);
    letter-spacing: 0.5px;
}

.brand-sub {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.nav-warning {
    font-size: 11px;
    color: var(--warn);
    opacity: 0.7;
}

/* ── App layout ──────────────────────────────────────────────────────────── */
.app-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 48px);
    overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

    .sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: var(--border-bright);
        border-radius: 2px;
    }

.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.title-icon {
    color: var(--accent);
    font-size: 14px;
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.input-group, .option-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-sec);
}

.bssid-input, input[type="number"], input[type="text"] {
    background: var(--bg-input);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    color: var(--text-pri);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.bssid-input {
    letter-spacing: 1px;
}

input:focus {
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.input-hint {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    width: 100%;
    margin-bottom: 6px;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

    .btn-primary:hover:not(:disabled) {
        background: #00ff8c;
        box-shadow: 0 0 16px var(--accent-glow);
    }

    .btn-primary:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

    .btn-secondary:hover {
        background: rgba(255, 68, 85, 0.1);
    }

.btn-icon {
    font-size: 10px;
}

/* ── Stats ───────────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    text-align: center;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.stat-label {
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress-bar-wrap {
    margin-bottom: 12px;
}

.progress-bar-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-sec);
    margin-bottom: 6px;
}

.progress-bar-track {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}

.status-msg {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.status-running {
    color: var(--warn);
    border-color: rgba(255,140,0,0.3);
}

.status-done {
    color: var(--accent);
    border-color: var(--accent-glow);
}

/* ── Export ──────────────────────────────────────────────────────────────── */
.export-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-export {
    display: block;
    padding: 8px;
    text-align: center;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    color: var(--text-sec);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.15s;
}

    .btn-export:hover {
        border-color: var(--accent-dim);
        color: var(--accent);
        background: var(--accent-glow);
    }

/* ── Log ─────────────────────────────────────────────────────────────────── */
.log-container {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .log-container::-webkit-scrollbar {
        width: 3px;
    }

    .log-container::-webkit-scrollbar-thumb {
        background: var(--border-bright);
    }

.log-entry {
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1.4;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.log-info {
    color: var(--text-sec);
}

.log-success {
    color: var(--accent);
}

.log-warn {
    color: var(--warn);
}

.log-error {
    color: var(--danger);
}

/* ── Main panel ──────────────────────────────────────────────────────────── */
.main-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-base);
}

/* ── Kaart ───────────────────────────────────────────────────────────────── */
.map-container {
    flex: 0 0 55%;
    position: relative;
    border-bottom: 1px solid var(--border);
}

#map {
    width: 100%;
    height: 100%;
    background: #0a0d10;
}

.map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 15, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    pointer-events: none;
    z-index: 1000;
}

/* Leaflet dark aanpassingen */
.leaflet-container {
    font-family: var(--font-mono);
}

.leaflet-popup-content-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    color: var(--text-pri);
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.leaflet-popup-tip {
    background: var(--bg-card);
}

.popup-content {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
}

.popup-bssid {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 4px;
}

.leaflet-control-zoom a {
    background: var(--bg-card) !important;
    border-color: var(--border-bright) !important;
    color: var(--text-sec) !important;
}

    .leaflet-control-zoom a:hover {
        background: var(--border) !important;
        color: var(--text-pri) !important;
    }

.leaflet-control-attribution {
    background: rgba(10,12,15,0.7) !important;
    color: var(--text-dim) !important;
    font-size: 9px !important;
}

/* ── Tabel ───────────────────────────────────────────────────────────────── */
.results-table-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-sec);
}

.table-count {
    color: var(--accent);
    font-weight: 600;
}

.table-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

    .table-scroll::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }

    .table-scroll::-webkit-scrollbar-thumb {
        background: var(--border-bright);
    }

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 12px;
}

    .results-table thead th {
        position: sticky;
        top: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-bright);
        padding: 8px 14px;
        text-align: left;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        color: var(--text-dim);
        white-space: nowrap;
        z-index: 10;
    }

    .results-table tbody tr {
        border-bottom: 1px solid var(--border);
        transition: background 0.1s;
    }

        .results-table tbody tr:hover {
            background: var(--bg-card);
        }

    .results-table td {
        padding: 7px 14px;
        color: var(--text-sec);
        white-space: nowrap;
    }

.bssid-cell {
    color: var(--accent) !important;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.empty-row td {
    text-align: center;
    color: var(--text-dim);
    padding: 24px;
    font-style: italic;
}

@@keyframes rowFlash {
    0% {
        background: rgba(0, 232, 122, 0.15);
    }

    100% {
        background: transparent;
    }
}

.new-row {
    animation: rowFlash 2s ease-out forwards;
}
