:root {
    --bg-deep: #0f1014;
    --bg-surface: #1a1c22;
    --bg-elevated: #262933;
    --purple-main: #8b5cf6;
    --orange-detail: #f97316;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-ui: #3f444e;
}

body { margin: 0; background: var(--bg-deep); font-family: 'Inter', sans-serif; color: var(--text-primary); overflow: hidden; }

.app-container { display: flex; height: 100vh; width: 100vw; position: relative; }
#map { flex: 1; z-index: 1; background: var(--bg-deep); cursor: crosshair; }

/* --- RIGHT SIDEBAR (The List) --- */
.sidebar-right {
    width: 350px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-ui);
    display: flex; flex-direction: column;
    z-index: 50;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.sidebar-right h2 { 
    padding: 15px 15px 5px 15px; margin: 0; 
    color: var(--orange-detail); 
    font-family: 'JetBrains Mono', monospace; 
    letter-spacing: 2px;
}

.status-bar {
    padding: 0 15px 15px 15px;
    font-size: 0.7rem; color: var(--text-secondary);
    border-bottom: 1px solid var(--border-ui);
    font-family: 'JetBrains Mono';
}

.search-bar {
    background: var(--bg-deep); border: none;
    border-bottom: 1px solid var(--border-ui);
    color: white; padding: 10px 15px;
    font-family: 'JetBrains Mono'; font-size: 0.8rem;
    outline: none;
}

.table-header {
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    padding: 8px 15px; background: var(--bg-elevated);
    font-size: 0.7rem; font-weight: bold; color: var(--text-secondary);
}

.scroller { overflow-y: auto; flex-grow: 1; }

.buoy-row {
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    padding: 10px 15px; border-bottom: 1px solid var(--bg-deep);
    cursor: pointer; transition: background 0.1s; font-size: 0.85rem;
}
.buoy-row:hover { background: var(--bg-elevated); color: var(--orange-detail); }
.buoy-row.selected { background: var(--purple-main); color: white; }

/* --- FLOATING DATA TAG (Hover Card) --- */
.data-tag {
    position: absolute;
    background: rgba(26, 28, 34, 0.95);
    border: 1px solid var(--orange-detail);
    border-radius: 4px;
    padding: 0;
    pointer-events: none; /* Allows clicking through it */
    z-index: 9999;
    display: none; /* Hidden by default */
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    min-width: 150px;
    backdrop-filter: blur(4px);
}

.tag-header {
    background: var(--orange-detail);
    color: black;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 4px 8px;
    display: flex; justify-content: space-between;
}

.tag-body { padding: 8px; font-size: 0.75rem; font-family: 'JetBrains Mono'; }
.val { color: var(--purple-main); font-weight: bold; }

/* --- LEFT PANEL --- */
.panel-left {
    position: absolute; top: 0; left: -400px;
    width: 300px; height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--purple-main);
    z-index: 100; padding: 20px; transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 5px 0 20px rgba(0,0,0,0.5);
}
.panel-left.active { left: 0; }

/* --- UTILS --- */
.telemetry-box { background: var(--bg-deep); padding: 15px; border-radius: 4px; position: relative; margin-top: 20px; }
.data-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.8rem; border-bottom: 1px solid var(--bg-elevated); padding-bottom: 4px; }
.blur-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,16,20,0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.3s; }
.blur-overlay.hidden { opacity: 0; pointer-events: none; }

/* LOGIN MODAL */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 10000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-overlay.active { display: flex; }
.login-card { background: var(--bg-surface); padding: 30px; border: 1px solid var(--purple-main); width: 300px; text-align: center; position: relative; }
.login-card input { width: 90%; padding: 10px; margin: 5px 0; background: var(--bg-deep); border: 1px solid var(--border-ui); color: white; }
.btn-primary { background: var(--purple-main); color: white; border: none; padding: 10px; width: 100%; font-weight: bold; cursor: pointer; margin-top: 10px; }
.close-btn { position: absolute; top: 10px; right: 10px; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }