/* ==========================================================================
   TERRALYNK SYSTEM: FUTURISTIC STYLING SYSTEM
   Luxury Cinematic Dark-Mode UI with Glassmorphism, Neon Accents, and Glows
   ========================================================================== */

/* Variables and Theme Settings */
:root {
    --bg-void: #030308;
    --bg-panel: rgba(10, 10, 22, 0.7);
    --bg-panel-solid: #0b0b16;
    --border-color: rgba(0, 243, 255, 0.15);
    --border-color-glow: rgba(189, 0, 255, 0.3);
    
    /* Neon Accents */
    --neon-blue: #00f3ff;
    --neon-blue-dim: rgba(0, 243, 255, 0.3);
    --neon-purple: #bd00ff;
    --neon-purple-dim: rgba(189, 0, 255, 0.3);
    --neon-green: #39ff14;
    --neon-green-dim: rgba(57, 255, 20, 0.3);
    --neon-gold: #ffdf00;
    --neon-gold-dim: rgba(255, 223, 0, 0.3);
    --neon-orange: #ff5e00;
    
    /* Typography */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
}

/* Base Body Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-blue-dim) var(--bg-void);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-void);
    color: #e2e8f0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
    background: var(--neon-blue-dim);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Background Space Dust Dynamic Grid */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #08081a, #030308 80%);
}

.stars {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.25;
    animation: starMovement 120s linear infinite;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
}

.nebula-purple {
    top: -10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--neon-purple), transparent 70%);
}

.nebula-blue {
    bottom: -10%;
    right: 15%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--neon-blue), transparent 70%);
}

/* Main Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
}

/* Main Header */
.main-header {
    height: 80px;
    background: rgba(4, 4, 12, 0.88);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(25px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-logo {
    height: 54px;
    width: auto;
    filter: drop-shadow(0 0 10px var(--neon-blue-dim));
    animation: brandLogoGlow 4s ease-in-out infinite alternate;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand-logo:hover {
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 0 16px var(--neon-blue));
}

@keyframes brandLogoGlow {
    0% {
        filter: drop-shadow(0 0 8px var(--neon-blue-dim));
    }
    100% {
        filter: drop-shadow(0 0 16px rgba(0, 243, 255, 0.6)) drop-shadow(0 0 25px rgba(189, 0, 255, 0.3));
    }
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.55rem;
    letter-spacing: 2.5px;
    background: linear-gradient(135deg, #ffffff 0%, var(--neon-blue) 50%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.brand-tagline {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 4px;
    color: var(--neon-purple);
    font-weight: 800;
    text-shadow: 0 0 8px var(--neon-purple-dim);
}

/* System Status Info */
.system-status {
    display: flex;
    align-items: center;
    gap: 32px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulseGlow 1.8s ease-in-out infinite;
}

.status-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #a0aec0;
}

.telemetry-counter {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.telemetry-label {
    color: rgba(255, 255, 255, 0.4);
}

.telemetry-value {
    color: var(--neon-blue);
    font-weight: bold;
    text-shadow: 0 0 6px var(--neon-blue-dim);
}

.active-onboarding {
    background: linear-gradient(135deg, var(--neon-purple-dim) 0%, rgba(0, 0, 0, 0.5) 100%);
    border: 1px solid var(--neon-purple);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-onboarding:hover {
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.4);
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-blue-dim) 100%);
    border-color: #ffffff;
}

/* Layout Viewport */
.viewport-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 360px 1fr 360px;
    overflow: hidden;
    height: calc(100vh - 80px);
}

/* Side Panels */
.panel {
    background: var(--bg-panel);
    backdrop-filter: blur(15px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

.right-panel {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h2 i {
    color: var(--neon-blue);
}

.badge {
    background-color: var(--neon-blue-dim);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Recommendation Sidebar Items */
.intent-summary-card {
    margin: 16px;
    background: rgba(0, 243, 255, 0.03);
    border: 1px dashed var(--neon-blue-dim);
    border-radius: 6px;
    padding: 12px;
}

.intent-vector-visualization {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.intent-vector-visualization .bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
}

.intent-text {
    font-size: 0.75rem;
    color: #a0aec0;
}

.intent-text i {
    color: var(--neon-purple);
    margin-right: 4px;
}

.recommendation-list {
    flex: 1;
    padding: 0 16px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Futuristic Recommendation Card */
.recommend-card {
    background: rgba(20, 20, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.recommend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--neon-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recommend-card:hover {
    background: rgba(20, 20, 45, 0.75);
    border-color: var(--neon-blue-dim);
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.08);
    transform: translateY(-2px);
}

.recommend-card:hover::before {
    opacity: 1;
}

.recommend-card.active {
    background: rgba(30, 20, 60, 0.5);
    border-color: var(--neon-purple-dim);
    box-shadow: 0 4px 25px rgba(189, 0, 255, 0.1);
}

.recommend-card.active::before {
    background: var(--neon-purple);
    opacity: 1;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.3;
}

.match-score-radial {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid var(--neon-blue-dim);
    padding: 3px 6px;
    border-radius: 4px;
    text-shadow: 0 0 4px var(--neon-blue-dim);
}

.recommend-card.active .match-score-radial {
    color: var(--neon-purple);
    background: rgba(189, 0, 255, 0.08);
    border-color: var(--neon-purple-dim);
    text-shadow: 0 0 4px var(--neon-purple-dim);
}

.card-desc {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-vertical-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    margin-bottom: 10px;
}

/* Colors based on spatial vertical */
.card-vertical-pill.rental {
    background: rgba(0, 243, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.2);
    color: var(--neon-blue);
}

.card-vertical-pill.workspace {
    background: rgba(189, 0, 255, 0.05);
    border-color: rgba(189, 0, 255, 0.2);
    color: var(--neon-purple);
}

.card-vertical-pill.ev {
    background: rgba(57, 255, 20, 0.05);
    border-color: rgba(57, 255, 20, 0.2);
    color: var(--neon-green);
}

.card-vertical-pill.parking {
    background: rgba(255, 94, 0, 0.05);
    border-color: rgba(255, 94, 0, 0.2);
    color: var(--neon-orange);
}

.card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 10px;
}

.metric-cell {
    display: flex;
    flex-direction: column;
}

.metric-lbl {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.metric-val {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
}

.metric-val i {
    margin-right: 3px;
}

.metric-val.good {
    color: var(--neon-green);
}

.metric-val.warn {
    color: var(--neon-gold);
}

/* CENTRAL MAP WORKSPACE CONTAINER */
.central-map-container {
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #04040a;
}

.map-viewport-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#spatialMapCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#spatialMapCanvas:active {
    cursor: grabbing;
}

/* Tech Overlay Grid & Reticle styles */
.map-overlay-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(rgba(0, 243, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(0, 243, 255, 0.01) 1px, transparent 1px);
    background-size: 40px 40px, 120px 120px;
    z-index: 2;
}

.map-compass {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 80px;
    height: 80px;
    pointer-events: none;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.compass-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px dashed var(--neon-blue-dim);
    border-radius: 50%;
    animation: rotateCompass 25s linear infinite;
}

.compass-ring::before {
    content: '';
    position: absolute;
    top: -5px;
    left: calc(50% - 5px);
    width: 10px;
    height: 10px;
    background-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    border-radius: 50%;
}

.compass-heading {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue-dim);
    font-weight: bold;
}

.active-layer-indicator {
    position: absolute;
    top: 24px;
    left: 24px;
    background: rgba(10, 10, 20, 0.85);
    border: 1px solid var(--neon-blue);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.15);
}

.indicator-glow {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
    animation: pulseGlow 1.2s ease-in-out infinite;
}

.indicator-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Map Tooltip */
.map-tooltip {
    position: absolute;
    background: rgba(10, 10, 20, 0.9);
    border: 1px solid var(--neon-blue);
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.15);
    backdrop-filter: blur(10px);
    z-index: 100;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -15px;
    min-width: 180px;
}

.tooltip-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.tooltip-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tooltip-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 2px;
}

.tooltip-match {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--neon-blue);
}

.tooltip-specs {
    display: flex;
    gap: 12px;
    font-size: 0.65rem;
    color: #a0aec0;
}

/* Quick Category Deck Controls */
.quick-category-deck {
    height: 60px;
    background-color: rgba(4, 4, 12, 0.9);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    z-index: 5;
}

.cat-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 20px;
    color: #cbd5e1;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-btn:hover {
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--neon-blue-dim);
    color: #ffffff;
}

.cat-btn.active {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--neon-blue);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
}

/* Layer Deck Toggles */
.control-group {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.group-title {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    color: var(--neon-purple);
    margin-bottom: 16px;
}

.layer-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.layer-selector:hover {
    background-color: rgba(0, 243, 255, 0.03);
    border-color: var(--neon-blue-dim);
}

.layer-selector.active {
    background-color: rgba(0, 243, 255, 0.05);
    border-color: var(--neon-blue-dim);
}

.layer-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.layer-icon {
    font-size: 1.1rem;
    color: #cbd5e1;
    width: 20px;
    text-align: center;
    transition: color 0.3s ease;
}

.layer-selector.active .layer-icon {
    color: var(--neon-blue);
    text-shadow: 0 0 8px var(--neon-blue-dim);
}

.layer-selector.active#layerSunlight .layer-icon { color: var(--neon-gold); text-shadow: 0 0 8px var(--neon-gold-dim); }
.layer-selector.active#layerSocial .layer-icon { color: var(--neon-purple); text-shadow: 0 0 8px var(--neon-purple-dim); }
.layer-selector.active#layerSafety .layer-icon { color: var(--neon-green); text-shadow: 0 0 8px var(--neon-green-dim); }
.layer-selector.active#layerFlood .layer-icon { color: var(--neon-orange); }

.layer-info {
    display: flex;
    flex-direction: column;
}

.layer-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
}

.layer-desc {
    font-size: 0.65rem;
    color: #a0aec0;
}

.toggle-switch {
    width: 32px;
    height: 16px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 8px;
    position: relative;
    transition: background-color 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cbd5e1;
    top: 2px;
    left: 2px;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
}

.layer-selector.active .toggle-switch {
    background-color: var(--neon-blue);
}

.layer-selector.active .toggle-switch::after {
    left: 18px;
    background-color: #ffffff;
}

.layer-selector.active#layerSunlight .toggle-switch { background-color: var(--neon-gold); }
.layer-selector.active#layerSocial .toggle-switch { background-color: var(--neon-purple); }
.layer-selector.active#layerSafety .toggle-switch { background-color: var(--neon-green); }
.layer-selector.active#layerFlood .toggle-switch { background-color: var(--neon-orange); }

/* Map Grid Base Theme Selector Chips */
.map-theme-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.theme-chip {
    background: rgba(0, 243, 255, 0.02);
    border: 1px solid rgba(0, 243, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-chip:hover {
    background: rgba(0, 243, 255, 0.06);
    border-color: var(--neon-blue);
    color: #ffffff;
    box-shadow: 0 0 10px var(--neon-blue-dim);
    transform: translateY(-2px);
}

.theme-chip.active {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.15) 0%, rgba(189, 0, 255, 0.15) 100%);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    text-shadow: 0 0 8px var(--neon-blue-dim);
}

/* Premium Sliders Setup */
.slider-wrapper {
    margin-bottom: 16px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.slider-value {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--neon-blue);
}

.premium-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
    cursor: pointer;
    transition: transform 0.2s;
}

.premium-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* System Analytics Stats Card */
.system-stats-card {
    padding: 16px;
    margin: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: #a0aec0;
}

.neon-purple-text { color: var(--neon-purple); font-weight: bold; text-shadow: 0 0 4px var(--neon-purple-dim); }
.neon-blue-text { color: var(--neon-blue); font-weight: bold; text-shadow: 0 0 4px var(--neon-blue-dim); }
.neon-green-text { color: var(--neon-green); font-weight: bold; text-shadow: 0 0 4px var(--neon-green-dim); }

/* FLOATING CHAT OVERLAY SYSTEM */
.chat-assistant-overlay {
    position: fixed;
    bottom: 24px;
    right: 120px; /* Aligned nicely offset from the compass */
    width: 380px;
    background: var(--bg-panel-solid);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 243, 255, 0.1);
    z-index: 500;
    display: flex;
    flex-direction: column;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s;
    overflow: hidden;
}

.chat-assistant-overlay.collapsed {
    height: 60px;
}

.chat-assistant-overlay:not(.collapsed) {
    height: 480px;
}

.chat-header {
    height: 60px;
    background: rgba(10, 10, 25, 0.95);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    cursor: pointer;
}

.assistant-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    box-shadow: 0 0 10px var(--neon-blue-dim);
}

.assistant-title-group h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #ffffff;
}

.assistant-title-group span {
    font-size: 0.65rem;
    color: var(--neon-blue);
    font-family: var(--font-mono);
}

.toggle-chat-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.4s;
}

.chat-assistant-overlay:not(.collapsed) .toggle-chat-btn {
    transform: rotate(180deg);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: rgba(5, 5, 12, 0.9);
}

.message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
    max-width: 85%;
}

.message.system {
    background-color: rgba(0, 243, 255, 0.05);
    border: 1px solid var(--neon-blue-dim);
    color: #e2e8f0;
    align-self: flex-start;
}

.message.user {
    background-color: rgba(189, 0, 255, 0.15);
    border: 1px solid var(--neon-purple-dim);
    color: #ffffff;
    align-self: flex-end;
}

.message.assistant {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    align-self: flex-start;
}

/* Suggestion Chips */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
}

.chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.65rem;
    color: #a0aec0;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chip:hover {
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--neon-blue);
    color: #ffffff;
}

.chat-footer {
    height: 50px;
    background-color: rgba(10, 10, 25, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
}

.chat-footer input {
    flex: 1;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 6px 12px;
    color: #ffffff;
    font-size: 0.75rem;
    outline: none;
    transition: border-color 0.3s;
}

.chat-footer input:focus {
    border-color: var(--neon-blue);
}

.send-message-btn {
    background-color: var(--neon-blue);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    color: #000000;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.send-message-btn:hover {
    box-shadow: 0 0 10px var(--neon-blue);
    transform: scale(1.05);
}

/* INTERACTIVE MODAL BACKDROPS & BOXES */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(3, 3, 8, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    background-color: var(--bg-panel-solid);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 600px;
    max-width: 90vw;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 243, 255, 0.15);
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    height: 60px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--neon-blue);
}

.close-modal-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #ffffff;
}

.modal-body {
    padding: 24px;
}

.modal-lead {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Grid Lifestyle Choice cards */
.lifestyle-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.lifestyle-choice-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.lifestyle-choice-card:hover {
    background: rgba(0, 243, 255, 0.03);
    border-color: var(--neon-blue-dim);
}

.lifestyle-choice-card.selected {
    background: rgba(189, 0, 255, 0.06);
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.15);
}

.card-icon {
    font-size: 1.5rem;
    color: #cbd5e1;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.lifestyle-choice-card.selected .card-icon {
    color: var(--neon-purple);
}

.lifestyle-choice-card h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.lifestyle-choice-card p {
    font-size: 0.7rem;
    color: #a0aec0;
    line-height: 1.4;
}

.onboarding-footer {
    display: flex;
    justify-content: flex-end;
}

/* LiDAR Premium Modal specific styles */
.lidar-card {
    width: 800px;
    max-width: 95vw;
}

.lidar-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lidar-canvas-container {
    height: 350px;
    background-color: #020205;
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

#lidarCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lidar-hud-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    z-index: 5;
}

.hud-item {
    display: flex;
    flex-direction: column;
}

.hud-lbl {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.hud-val {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
}

.text-glow {
    text-shadow: 0 0 6px var(--neon-blue-dim);
}

.green-glow {
    color: var(--neon-green);
    text-shadow: 0 0 6px var(--neon-green-dim);
}

.lidar-grid-lines {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    pointer-events: none;
    background-image: linear-gradient(to top, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 100% 5px;
    animation: gridScanLine 4s linear infinite;
    z-index: 4;
}

.lidar-details-footer {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: center;
}

.lidar-desc-text h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 4px;
}

.lidar-desc-text p {
    font-size: 0.7rem;
    color: #a0aec0;
    line-height: 1.4;
}

.lidar-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Button UI system */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    outline: none;
}

.btn-premium {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-blue) 100%);
    color: #ffffff;
    font-weight: 700;
}

.btn-premium:hover {
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4), 0 0 5px rgba(189, 0, 255, 0.4);
    transform: translateY(-1px);
}

.btn-outlined {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

.btn-outlined:hover {
    border-color: var(--neon-blue);
    color: #ffffff;
    background-color: rgba(0, 243, 255, 0.05);
}

/* KEYFRAMES FOR PREMIUM DYNAMIC ANIMATIONS */
@keyframes starMovement {
    0% { transform: translateY(0); }
    100% { transform: translateY(-500px); }
}

@keyframes pulseGlow {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

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

@keyframes gridScanLine {
    0% { transform: translateY(0); opacity: 0.2; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-310px); opacity: 0.1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   ROLE-BASED ACCESS CONTROL (RBAC) & USER MANAGEMENT STYLING
   ========================================================================== */

/* Header Controls */
.auth-btn, .profile-panel, .admin-tools-btn {
    border: 1px dashed var(--neon-blue-dim) !important;
    background: rgba(0, 243, 255, 0.02) !important;
    cursor: pointer;
    font-weight: 600;
}

.auth-btn:hover {
    background: rgba(0, 243, 255, 0.1) !important;
    border-color: var(--neon-blue) !important;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.profile-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--neon-purple-dim) !important;
    background: rgba(189, 0, 255, 0.05) !important;
}

.logout-btn-header {
    background: none;
    border: none;
    color: #ff5e00;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    margin-left: 6px;
    transition: transform 0.2s, color 0.2s;
}

.logout-btn-header:hover {
    color: #ff2a00;
    transform: scale(1.1);
}

.role-badge {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    background: var(--neon-blue-dim);
    color: #ffffff;
    border: 1px solid var(--neon-blue);
}

#currentUserRole.ADMIN, .badge.admin-role {
    background: rgba(255, 94, 0, 0.2);
    color: #ff5e00;
    border: 1px solid #ff5e00;
    text-shadow: 0 0 5px rgba(255, 94, 0, 0.3);
}

#currentUserRole.HOST, .badge.host-role {
    background: rgba(189, 0, 255, 0.2);
    color: #e0a3ff;
    border: 1px solid var(--neon-purple);
    text-shadow: 0 0 5px rgba(189, 0, 255, 0.3);
}

#currentUserRole.EXPLORER, .badge.explorer-role {
    background: rgba(0, 243, 255, 0.15);
    color: #ffffff;
    border: 1px solid var(--neon-blue);
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
}

.admin-tools-btn {
    border: 1px solid var(--neon-gold-dim) !important;
    background: rgba(255, 223, 0, 0.04) !important;
}

.admin-tools-btn:hover {
    background: rgba(255, 223, 0, 0.1) !important;
    border-color: var(--neon-gold) !important;
    box-shadow: 0 0 10px rgba(255, 223, 0, 0.2);
}

/* Authentication Modal Elements */
.auth-card {
    width: 420px;
}

.auth-tabs {
    display: flex;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 3px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.auth-tab.active {
    background-color: rgba(0, 243, 255, 0.15);
    color: #ffffff;
    border: 1px solid var(--neon-blue-dim);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.col-6 { flex: 1; }
.col-4 { flex: 1; }

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: bold;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1px;
}

.form-group input, .form-group select, .form-group textarea {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--neon-blue);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.auth-error {
    background: rgba(255, 94, 0, 0.12);
    border: 1px solid #ff5e00;
    color: #ff9e7d;
    padding: 8px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Demo account hints */
.demo-accounts-helper {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.helper-title {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: bold;
    color: var(--neon-gold);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.helper-account {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.7rem;
    margin-bottom: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.helper-account:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.helper-account strong {
    color: #ffffff;
}

.helper-account span.badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 2px;
}

/* Admin Card Elements */
.admin-card {
    width: 760px;
    max-width: 95vw;
}

.admin-table-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 20px;
}

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

.admin-table th, .admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.admin-table th {
    background-color: rgba(0, 0, 0, 0.5);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.admin-table tbody tr {
    transition: background-color 0.2s;
}

.admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.admin-table select {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 3px 8px;
    outline: none;
    cursor: pointer;
}

.admin-table select:focus {
    border-color: var(--neon-blue);
}

/* Admin Debug Logger Terminal */
.admin-telemetry-console {
    background-color: #020205;
    border: 1px solid rgba(255, 223, 0, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.console-header {
    background-color: rgba(255, 223, 0, 0.05);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: bold;
    color: var(--neon-gold);
    border-bottom: 1px solid rgba(255, 223, 0, 0.1);
}

.console-body {
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #cbd5e1;
    min-height: 60px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Asset Registration Card */
.asset-reg-card {
    width: 580px;
}

