/* W5 Network Explorer — Dark Glassmorphism Theme */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    overflow: hidden;
}

/* Nav bar */
#nav-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 44px;
    z-index: 2000;
    background: rgba(10, 10, 18, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 24px;
}
.nav-brand {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.3px;
}
.nav-brand span { color: #64b5f6; font-weight: 400; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
    color: #888;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.15s;
}
.nav-links a:hover { color: #ccc; background: rgba(255,255,255,0.05); }
.nav-links a.active { color: #64b5f6; background: rgba(100,181,246,0.1); }

/* App container */
#app-container {
    position: absolute;
    top: 44px; left: 0; right: 0; bottom: 0;
    display: flex;
}

/* Left Panel */
#panel {
    width: 320px;
    min-width: 320px;
    background: rgba(15, 15, 25, 0.92);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1000;
}
#panel::-webkit-scrollbar { width: 4px; }
#panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.panel-section {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Summary chips */
.summary-row { display: flex; gap: 6px; }
.summary-chip {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
}
.chip-val {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #e0e0e0;
    line-height: 1.2;
}
.chip-label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-top: 2px;
}

/* Field label */
.field-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 8px;
}

/* Mode buttons */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.mode-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #888;
    font-size: 11px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.mode-btn:hover { color: #ccc; background: rgba(255,255,255,0.07); }
.mode-btn.active {
    background: rgba(100,181,246,0.12);
    border-color: rgba(100,181,246,0.35);
    color: #64b5f6;
}

/* Highway filter checkboxes */
#hw-filter-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
#hw-filter-row label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #aaa;
    cursor: pointer;
}
#hw-filter-row input[type=checkbox] {
    accent-color: #64b5f6;
    width: 13px;
    height: 13px;
}

/* Search input */
#filter-search {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 12px;
    padding: 6px 10px;
    outline: none;
    transition: border-color 0.15s;
}
#filter-search:focus { border-color: rgba(100,181,246,0.4); }
#filter-search::placeholder { color: #555; }

/* Legend */
.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 4px;
}
.legend-swatch {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Edge detail */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.detail-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
}
.close-btn:hover { color: #ccc; }

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.meta-row:last-child { border-bottom: none; }
.meta-row span:first-child { color: #777; }
.meta-row span:last-child { color: #ccc; font-weight: 500; max-width: 55%; text-align: right; word-break: break-all; }

/* Map */
#map {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Leaflet tooltip */
.edge-tooltip {
    background: rgba(10, 10, 18, 0.9) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 6px !important;
    color: #e0e0e0 !important;
    font-size: 12px !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
    padding: 6px 10px !important;
}
.edge-tooltip::before { display: none !important; }

/* Layer toggles */
.layer-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #aaa;
    cursor: pointer;
    padding: 3px 0;
}
.layer-toggle input[type=checkbox] {
    accent-color: #64b5f6;
    width: 13px;
    height: 13px;
}
.layer-toggle .layer-count {
    color: #555;
    font-size: 10px;
    margin-left: auto;
}

/* Signal marker */
.signal-marker {
    border-radius: 50%;
    box-shadow: 0 0 6px #e040fb;
}

/* Classification panel */
.classify-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.classify-section .field-label {
    margin-bottom: 6px;
}
.classify-select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 12px;
    padding: 6px 8px;
    outline: none;
    margin-bottom: 6px;
}
.classify-select option {
    background: #1a1a2e;
    color: #e0e0e0;
}
.classify-notes {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 12px;
    padding: 6px 8px;
    outline: none;
    margin-bottom: 8px;
    resize: vertical;
    min-height: 32px;
}
.classify-notes:focus,
.classify-select:focus {
    border-color: rgba(100,181,246,0.4);
}
.classify-notes::placeholder { color: #555; }
.classify-actions {
    display: flex;
    gap: 6px;
}
.classify-actions .mode-btn {
    flex: 1;
    text-align: center;
    font-size: 11px;
    padding: 6px 8px;
}
.classify-actions .mode-btn.save-btn {
    background: rgba(67,160,71,0.15);
    border-color: rgba(67,160,71,0.4);
    color: #66bb6a;
}
.classify-actions .mode-btn.save-btn:hover {
    background: rgba(67,160,71,0.25);
}
.classify-actions .mode-btn.remove-btn {
    background: rgba(229,57,53,0.1);
    border-color: rgba(229,57,53,0.3);
    color: #ef5350;
}
.classify-actions .mode-btn.remove-btn:hover {
    background: rgba(229,57,53,0.2);
}
.classify-current {
    font-size: 11px;
    color: #81c784;
    margin-bottom: 6px;
    padding: 4px 8px;
    background: rgba(67,160,71,0.1);
    border-radius: 4px;
}
