/* EchoHawk EHAS-3D - Tactical Radar Web Dashboard CSS */

:root {
    --bg-dark: #080b14;
    --panel-bg: rgba(14, 20, 36, 0.85);
    --panel-border: rgba(0, 240, 255, 0.18);
    --primary-cyan: #00f0ff;
    --primary-green: #00ff88;
    --warning-amber: #ffaa00;
    --alert-red: #ff3366;
    --text-main: #e2e8f0;
    --text-muted: #8492a6;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(0, 240, 255, 0.04) 0%, transparent 60%),
        linear-gradient(to bottom, #060810, #090e1a);
    color: var(--text-main);
    font-family: var(--font-heading);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 16px;
}

/* Dashboard Container Layout */
.dashboard-container {
    max-width: 1720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Top Navigation Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 14px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Nav Switcher Tabs */
.nav-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    gap: 6px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    color: #000;
    background: var(--primary-cyan);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}

.user-session-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 14px;
    border-left: 1px solid rgba(0, 240, 255, 0.2);
    padding-left: 14px;
}
.user-session-bar button:hover {
    background: rgba(255, 51, 102, 0.3) !important;
    border-color: #ff3366 !important;
}


.radar-pulse-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-cyan);
    box-shadow: 0 0 15px var(--primary-cyan);
    position: relative;
}

.radar-pulse-icon::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 2px solid var(--primary-cyan);
    border-radius: 50%;
    animation: radarPulse 2s infinite ease-out;
}

@keyframes radarPulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

.title-text h1 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.title-text h1 .highlight {
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.sub-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Status Bar Pill */
.system-status-bar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-pill.live {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--primary-green);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
}

.dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-green);
    box-shadow: 0 0 8px var(--primary-green);
    animation: blink 1.2s infinite alternate;
}

@keyframes blink {
    from { opacity: 0.3; }
    to { opacity: 1.0; }
}

.status-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.status-metric .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.status-metric .val {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

/* Main Workspace Grid */
.workspace-grid {
    display: grid;
    grid-template-columns: 740px 1fr;
    gap: 16px;
}

/* Panels Common */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.panel-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
    color: #f1f5f9;
}

/* Radar Display Panel */
.radar-panel {
    align-items: center;
}

.radar-controls {
    display: flex;
    gap: 16px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
}

.radar-canvas-container {
    position: relative;
    width: 680px;
    height: 680px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #091322 0%, #050811 100%);
    border-radius: 50%;
    border: 2px solid var(--panel-border);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.15), inset 0 0 30px rgba(0, 0, 0, 0.8);
}

#radarCanvas {
    border-radius: 50%;
    cursor: crosshair;
}

.radar-overlay-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--primary-cyan);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
}

.radar-legend {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 16px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.color-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.color-box.mic { background: var(--primary-cyan); }
.color-box.target { background: var(--alert-red); }
.color-box.cone { background: rgba(0, 255, 136, 0.4); }

/* Panel Column Right */
.panel-column-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Telemetry Card */
.target-badge.confirmed {
    background: rgba(255, 51, 102, 0.2);
    border: 1px solid var(--alert-red);
    color: var(--alert-red);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    animation: blink 1s infinite alternate;
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.metric-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.metric-value.id-text { color: var(--primary-cyan); }
.metric-value.model-text { color: var(--warning-amber); }
.metric-value.alt-text { color: var(--primary-green); }

.confidence-text {
    font-size: 0.7rem;
    color: var(--primary-green);
    font-weight: 600;
}

/* ML Panel */
.spectrogram-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--primary-cyan);
    background: rgba(0, 240, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.ml-body {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 16px;
    align-items: center;
}

.spectrogram-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#spectrogramCanvas {
    background: #000;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 6px;
}

.spec-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
}

.class-confidence-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.class-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.class-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.class-score {
    font-family: var(--font-mono);
    font-weight: 700;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar-fill.dji-mini { background: linear-gradient(90deg, #00f0ff, #00ff88); }
.progress-bar-fill.dji-phantom { background: linear-gradient(90deg, #ffaa00, #ffee00); }
.progress-bar-fill.fixed-wing { background: linear-gradient(90deg, #a855f7, #ec4899); }
.progress-bar-fill.unknown { background: rgba(255, 255, 255, 0.3); }

/* Simulator Panel */
.sim-actions {
    display: flex;
    gap: 10px;
}

.btn {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-cyan);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 0 12px var(--primary-cyan);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.simulator-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.custom-select {
    background: #0d1527;
    border: 1px solid var(--panel-border);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    outline: none;
}

.slider-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

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

.control-row label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.control-row label span {
    color: var(--primary-cyan);
    font-family: var(--font-mono);
    font-weight: 700;
}

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

/* History Table Panel */
.history-panel {
    max-height: 220px;
}

.log-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.table-scroll-container {
    overflow-y: auto;
    max-height: 140px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.history-table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
}

.history-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
}

.history-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.05);
}

.tag-status {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.tag-status.active {
    background: rgba(0, 255, 136, 0.2);
    color: var(--primary-green);
}

.telemetry-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.btn-intercept-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.25), rgba(157, 78, 221, 0.25));
    border: 1px solid rgba(247, 37, 133, 0.5);
    color: #ffbe0b;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-intercept-link:hover {
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.5), rgba(157, 78, 221, 0.5));
    border-color: #ffbe0b;
    box-shadow: 0 0 16px rgba(255, 190, 11, 0.4);
    transform: translateY(-1px);
}

