:root {
    /* Movetain Alpine Tactical Brand Palette */
    --bg-obsidian: #0B1326;
    --bg-surface: #10192D;
    --bg-card: #171F33;
    --glass-bg: rgba(11, 19, 38, 0.75);
    
    --primary-lavender: #C9D1FF;
    --primary-container: #354484;
    --button-bg: rgba(201, 209, 255, 0.15);
    --button-border: rgba(201, 209, 255, 0.35);
    
    --text-primary: #DAE2FD;
    --text-secondary: #C6C5D2;
    --text-muted: #626D82;
    
    --signal-green: #4AE176;
    --action-orange: #FF5F00;
    --accent-blue: #4488FF;
    --accent-yellow: #FFD600;
    --alert-red: #FF4444;

    --glass-border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(201, 209, 255, 0.25);

    --font-ui: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-obsidian);
    color: var(--text-primary);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

#app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
}

/* ─────────────────────────────────────────────────────────────
   TOP HEADER (Tactical Command Bar)
   ───────────────────────────────────────────────────────────── */
#top-bar {
    height: 56px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 1000;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.brand-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(201, 209, 255, 0.35));
}

.brand-text-logo {
    height: 18px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(201, 209, 255, 0.2));
}

.room-status-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    background-color: rgba(255, 255, 255, 0.03);
}

.room-badge .label {
    color: var(--text-muted);
}
.room-badge .val {
    color: var(--primary-lavender);
    font-weight: 700;
}

.role-badge.coordinator {
    border-color: rgba(74, 225, 118, 0.35);
    background-color: rgba(74, 225, 118, 0.1);
    color: var(--signal-green);
}

.role-badge.spectator {
    border-color: rgba(201, 209, 255, 0.35);
    background-color: rgba(201, 209, 255, 0.1);
    color: var(--primary-lavender);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.status-dot.online {
    background-color: var(--signal-green);
    box-shadow: 0 0 8px var(--signal-green);
    animation: pulse 1.5s infinite;
}

.status-dot.offline {
    background-color: var(--action-orange);
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* ─── Gateway Telemetry Bento ─── */
.gateway-telemetry-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.gw-unified-bento {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 7px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(201, 209, 255, 0.22);
    background: rgba(201, 209, 255, 0.05);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.gw-unified-bento:hover {
    border-color: rgba(201, 209, 255, 0.35);
    background: rgba(201, 209, 255, 0.08);
}

.gw-bento-name {
    color: var(--primary-lavender);
    font-weight: 700;
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.gw-bento-metric {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gw-bento-metric svg {
    opacity: 0.9;
    flex-shrink: 0;
}

.gw-phone-icon {
    opacity: 0.75;
    margin-right: -1px;
}

.gw-bento-divider {
    color: rgba(201, 209, 255, 0.3);
    font-size: 10px;
    margin: 0 1px;
    user-select: none;
}

.gw-bolt {
    color: #ffd600;
    font-size: 10px;
    margin-left: -1px;
    animation: pulse-bolt 1.5s infinite;
}

@keyframes pulse-bolt {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.gw-node-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--signal-green);
    box-shadow: 0 0 6px var(--signal-green);
    flex-shrink: 0;
}
.gw-node-indicator.no-link {
    background-color: #ff4444;
    box-shadow: 0 0 6px #ff4444;
}

/* ─────────────────────────────────────────────────────────────
   MAIN WORKSPACE
   ───────────────────────────────────────────────────────────── */
#main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ─────────────────────────────────────────────────────────────
   SIDEBAR
   ───────────────────────────────────────────────────────────── */
#sidebar {
    width: 390px;
    min-width: 350px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 500;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    background-color: rgba(0, 0, 0, 0.25);
}

.tab-btn {
    flex: 1;
    height: 44px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--primary-lavender);
    border-bottom-color: var(--primary-lavender);
    background-color: rgba(201, 209, 255, 0.06);
}

.tab-counter {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.tab-btn.active .tab-counter {
    background-color: rgba(201, 209, 255, 0.25);
    color: var(--text-primary);
}

.tab-pane {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
}

.tab-pane.active {
    display: flex;
}

.nodes-subnav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    gap: 8px;
    flex-shrink: 0;
}

.subnav-segmented {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.subnav-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 5px 11px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    letter-spacing: 0.6px;
}

.subnav-btn:hover {
    color: var(--text-primary);
}

.subnav-btn.active {
    background: rgba(201, 209, 255, 0.2);
    color: var(--primary-lavender);
    box-shadow: 0 0 8px rgba(201, 209, 255, 0.15);
}

.sub-counter {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
}

.subnav-btn.active .sub-counter {
    background: rgba(201, 209, 255, 0.3);
}

/* ─────────────────────────────────────────────────────────────
   BENTO PARTICIPANT CARDS
   ───────────────────────────────────────────────────────────── */
.participant-list {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─────────────────────────────────────────────────────────────
   STRICT ALPINE NODE CARD (Matching LoRa Mesh Beacon in TrackMooov)
   ───────────────────────────────────────────────────────────── */
.bento-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 11px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    position: relative;
    user-select: none;
}

.bento-card:hover {
    border-color: rgba(186, 155, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

/* Row 1: Header */
.bento-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.bento-left-identity {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.bento-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bento-callsign {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    font-family: var(--font-ui);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-callsign.stale {
    color: rgba(255, 255, 255, 0.6);
}

.bento-right-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.bento-meta-bat,
.bento-meta-sig {
    display: flex;
    align-items: center;
    gap: 2.5px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-ui);
    letter-spacing: 0.2px;
}

.bento-dist-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(186, 155, 255, 0.12);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-lavender);
    font-family: var(--font-ui);
}

.bento-action-trigger-wrap {
    position: relative;
}

.bento-action-trigger {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--primary-lavender);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    padding: 0;
}

.bento-action-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bento-action-trigger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Detail Rows (Rows 2, 3, 4) */
.bento-row-detail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 17px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-ui);
    line-height: 1.3;
}

.bento-detail-item {
    display: flex;
    align-items: center;
    gap: 3.5px;
    color: var(--text-primary);
}

.bento-detail-item.muted {
    color: var(--text-secondary);
}

.bento-detail-item svg {
    color: var(--primary-lavender);
    flex-shrink: 0;
}

.bento-detail-item .tag-label {
    font-size: 9px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-right: 1px;
}

.bento-detail-item .tag-val-lavender {
    color: var(--primary-lavender);
}

/* Popup Dropdown Menu for Card Actions */
.bento-dropdown-menu {
    position: absolute;
    top: 30px;
    right: 0;
    background: #171F33;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 5px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 200;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
    min-width: 195px;
}

.bento-dropdown-menu.open {
    display: flex;
}

.bento-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    font-family: var(--font-ui);
    width: 100%;
}

.bento-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bento-menu-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(186, 155, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-lavender);
    flex-shrink: 0;
}

.bento-menu-col {
    display: flex;
    flex-direction: column;
}

.bento-menu-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #FFFFFF;
}

.bento-menu-sub {
    font-size: 8.5px;
    color: var(--text-secondary);
}

.bento-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 2px 4px;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #000;
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-callsign {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-primary);
}

.user-subinfo {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-muted);
}

.chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.chip.bpm {
    background-color: rgba(255, 68, 68, 0.12);
    color: #FF8585;
    border: 1px solid rgba(255, 68, 68, 0.25);
}

.chip.bpm svg {
    animation: heartBeat 1.2s infinite ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
}

.chip.bat {
    background-color: rgba(74, 225, 118, 0.1);
    color: var(--signal-green);
}

.chip.bat.low {
    background-color: rgba(255, 95, 0, 0.15);
    color: var(--action-orange);
}

.chip.signal {
    background-color: rgba(68, 136, 255, 0.1);
    color: #9EC0FF;
}

/* ─────────────────────────────────────────────────────────────
   CHAT PANEL & RECIPIENT SELECTOR (Broadcast / Unicast)
   ───────────────────────────────────────────────────────────── */
.chat-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(18, 26, 43, 0.95);
    border-bottom: 1px solid var(--glass-border);
}

.chat-recipient-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.chat-to-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.chat-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.chat-select-icon {
    position: absolute;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: var(--primary-lavender);
    z-index: 2;
    transition: color 0.2s ease;
}

.chat-select-icon.broadcast {
    color: var(--primary-lavender);
}

.chat-select-icon.unicast {
    color: var(--signal-green);
}

.chat-recipient-select {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 5px 8px 5px 28px;
    font-size: 12px;
    font-family: var(--font-ui);
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.chat-recipient-select:focus {
    border-color: var(--primary-lavender);
    box-shadow: 0 0 8px rgba(201, 209, 255, 0.2);
}

.chat-recipient-select option, .chat-recipient-select optgroup {
    background-color: #121A2B;
    color: #FFFFFF;
}

.chat-target-badge {
    font-size: 9px;
    font-weight: 900;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.chat-target-badge.broadcast {
    background: rgba(201, 209, 255, 0.15);
    color: var(--primary-lavender);
    border: 1px solid rgba(201, 209, 255, 0.3);
}

.chat-target-badge.unicast {
    background: rgba(74, 225, 118, 0.2);
    color: var(--signal-green);
    border: 1px solid rgba(74, 225, 118, 0.5);
    box-shadow: 0 0 6px rgba(74, 225, 118, 0.2);
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.chat-retention-badge {
    background: rgba(162, 155, 254, 0.12);
    color: var(--primary-lavender);
    font-size: 9.5px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(162, 155, 254, 0.25);
    letter-spacing: 0.3px;
    cursor: help;
}

.btn-reset-broadcast {
    background-color: rgba(255, 255, 255, 0.08);
    font-size: 10px;
    padding: 3px 8px;
}

.bubble-channel {
    font-size: 9px;
    font-weight: 800;
    font-family: var(--font-mono);
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.bubble-channel.broadcast {
    background: rgba(201, 209, 255, 0.12);
    color: #C9D1FF;
}

.bubble-channel.dm {
    background: rgba(74, 225, 118, 0.15);
    color: #4AE176;
    border: 1px solid rgba(74, 225, 118, 0.3);
}

.bubble-web-tag {
    background: rgba(255, 153, 0, 0.15);
    color: #FFB347;
    font-size: 9px;
    font-weight: 800;
    font-family: var(--font-mono);
    padding: 1px 4px;
    border-radius: 3px;
}

.bubble-hops {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Chat bubble styling: WhatsApp-like two-sided alignment */
.chat-bubble {
    max-width: 82%;
    padding: 9px 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    word-break: break-word;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* Incoming from field node: Align LEFT */
.chat-bubble.incoming {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px 12px 12px 2px;
}

/* Outgoing from coordinator / Web HQ: Align RIGHT */
.chat-bubble.outgoing,
.chat-bubble.from-web {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.18), rgba(108, 92, 231, 0.26));
    border: 1px solid rgba(162, 155, 254, 0.35);
    border-radius: 12px 12px 2px 12px;
}

.chat-bubble.sos {
    border: 1px solid var(--alert-red) !important;
    background-color: rgba(255, 68, 68, 0.16) !important;
}

.bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-family: var(--font-mono);
    gap: 8px;
}

.bubble-sender {
    font-weight: 700;
    color: var(--primary-lavender);
}

.bubble-dest {
    font-size: 10px;
    font-weight: 700;
    color: rgba(201, 209, 255, 0.7);
    font-family: var(--font-mono);
}

.bubble-dest.dm {
    color: #4AE176;
}

.bubble-text {
    font-size: 13.5px;
    line-height: 1.45;
    word-break: break-word;
    color: var(--text-primary);
}

.bubble-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: 2px;
}

.bubble-ack {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    user-select: none;
}

.bubble-ack.sending {
    color: var(--text-muted);
    opacity: 0.6;
}

.bubble-ack.sent {
    color: var(--text-muted);
}

.bubble-ack.delivered {
    color: #4AE176;
    font-weight: 900;
    letter-spacing: -2px;
}

.bubble-ack.failed {
    color: var(--alert-red);
    font-weight: 900;
}

.chat-input-box {
    border-top: 1px solid var(--glass-border);
    padding: 10px 14px;
    background-color: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-char-counter {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 0 4px;
    user-select: none;
    transition: color 0.15s ease;
}

.chat-char-counter.near-limit {
    color: #ffb347;
    font-weight: 700;
}

.chat-char-counter.at-limit {
    color: var(--alert-red);
    font-weight: 700;
}

.quick-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-chip {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: 5px;
    padding: 4px 9px;
    font-size: 11px;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-chip:hover {
    background-color: var(--button-bg);
    border-color: var(--button-border);
    color: var(--text-primary);
}

.input-row {
    display: flex;
    gap: 8px;
}

.input-row input {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 9px 14px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    font-family: var(--font-ui);
}

.input-row input:focus {
    border-color: var(--primary-lavender);
}

.spectator-warning-hint {
    font-size: 11px;
    color: var(--action-orange);
    text-align: center;
    font-family: var(--font-mono);
}

/* ─────────────────────────────────────────────────────────────
   MAP CONTAINER
   ───────────────────────────────────────────────────────────── */
#map-container {
    flex: 1;
    position: relative;
    background-color: #0c101c;
}

#map {
    width: 100%;
    height: 100%;
}

/* ─────────────────────────────────────────────────────────────
   BUTTONS & MODALS
   ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 7px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--signal-green);
    color: #000;
}
.btn-primary:hover {
    background-color: #3fce6a;
}

.btn-secondary {
    background-color: var(--button-bg);
    border-color: var(--button-border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: rgba(201, 209, 255, 0.25);
    border-color: var(--primary-lavender);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}
.btn-icon:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.06);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 4000; /* Higher than landing-overlay (3000) */
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    width: 90%;
    max-width: 540px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
}

.share-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.share-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.copy-input-group {
    display: flex;
    gap: 8px;
}

.copy-input-group input {
    flex: 1;
    background-color: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 7px;
    padding: 9px 12px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--primary-lavender);
}

/* Pulsing radar empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    gap: 14px;
    font-family: var(--font-mono);
}

.pulsing-radar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--signal-green);
    position: relative;
    animation: radarPulse 2s infinite ease-out;
}

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

/* Custom Leaflet Popups */
.leaflet-popup-content-wrapper {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-highlight) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}
.leaflet-popup-tip {
    background-color: var(--bg-card) !important;
}

/* Responsive for Mobile */
@media (max-width: 768px) {
    #main-content {
        flex-direction: column-reverse;
    }
    #sidebar {
        width: 100%;
        min-width: 100%;
        height: 46vh;
    }
    #map-container {
        height: 54vh;
    }
}

/* ─────────────────────────────────────────────────────────────
   LANDING & AUTHENTICATION OVERLAY
   ───────────────────────────────────────────────────────────── */
.landing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-obsidian); /* #0B1326 completely solid brand background */
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.landing-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.landing-card {
    width: 100%;
    max-width: 580px;
    margin: auto 0;
    background: linear-gradient(180deg, #131C32 0%, #0D1527 100%);
    border: 1px solid rgba(201, 209, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(201, 209, 255, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.landing-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 22px 24px 18px;
    background: rgba(16, 25, 45, 0.95);
    user-select: none;
}

.landing-brand-mark {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(201, 209, 255, 0.45));
}

.landing-brand-text {
    height: 24px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(201, 209, 255, 0.35));
}

/* Hero Banner */
.landing-banner-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    line-height: 0;
    aspect-ratio: 1024 / 500;
    background: #0B1326;
}

.landing-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    margin: 0;
    padding: 0;
}

/* Auth Body */
.landing-auth-body {
    padding: 22px 26px 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.landing-description-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.landing-description {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

.landing-subdescription {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.88;
}

/* User Profile Widget */
.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(74, 225, 118, 0.08);
    border: 1px solid rgba(74, 225, 118, 0.3);
    border-radius: 10px;
}

.user-avatar-round {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--signal-green);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-email-text {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

/* Google Sign-in Button */
.btn-google-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 18px;
    background-color: #FFFFFF;
    color: #1F1F1F;
    border: none;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
}

.btn-google-action:hover {
    background-color: #F2F2F2;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.btn-google-action:active {
    transform: translateY(0);
}

.google-icon {
    flex-shrink: 0;
}

/* Guest Spectator Action Button */
.btn-guest-spectator-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    background: rgba(74, 225, 118, 0.1);
    border: 1px solid rgba(74, 225, 118, 0.4);
    color: var(--signal-green);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-guest-spectator-action:hover {
    background: rgba(74, 225, 118, 0.22);
    border-color: var(--signal-green);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(74, 225, 118, 0.3);
}

.btn-guest-spectator-action:active {
    transform: translateY(0);
}

/* Quick Room Enter */
.landing-room-box {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.room-input-row {
    display: flex;
    gap: 8px;
}

#landing-room-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-highlight);
    border-radius: 8px;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 14px;
    text-transform: uppercase;
}

#landing-room-input:focus {
    outline: none;
    border-color: var(--primary-lavender);
    box-shadow: 0 0 10px rgba(201, 209, 255, 0.25);
}

#btn-enter-workspace {
    flex-shrink: 0;
    padding: 0 18px;
    border-radius: 8px;
}

/* Google Play Store Badge Section on Landing */
.landing-playstore-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin: 4px 0 2px 0;
}

.landing-playstore-lead {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.78;
    font-family: var(--font-mono);
}

.landing-playstore-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 7px 18px 7px 14px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    user-select: none;
}

.landing-playstore-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(201, 209, 255, 0.45);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(66, 133, 244, 0.25);
    transform: translateY(-1px);
}

.landing-playstore-badge:active {
    transform: translateY(0);
}

.landing-playstore-badge .playstore-icon {
    flex-shrink: 0;
}

.landing-playstore-badge .playstore-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.landing-playstore-badge .playstore-tag {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 8.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.8px;
}

.landing-playstore-badge .playstore-name {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.3px;
}

.landing-subtext {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.landing-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
}

.landing-legal-links a {
    color: var(--primary-lavender);
    text-decoration: none;
    transition: opacity 0.2s;
}

.landing-legal-links a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.copyright-sub {
    font-size: 9.5px;
    color: var(--text-muted);
}

/* Header Top User Pill */
.top-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    background: rgba(201, 209, 255, 0.1);
    border: 1px solid rgba(201, 209, 255, 0.25);
    border-radius: 20px;
}

.top-user-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.top-user-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primary-lavender);
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout-mini {
    background: none;
    border: none;
    color: var(--alert-red);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.btn-logout-mini:hover {
    background: rgba(255, 68, 68, 0.15);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 10.5px;
}

/* ─────────────────────────────────────────────────────────────
   LOBBY VIEW STYLING
   ───────────────────────────────────────────────────────────── */
.lobby-card {
    max-width: 640px;
    width: 100%;
    height: calc(100vh - 32px);
    max-height: 840px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 960px) {
    .lobby-card {
        max-width: 1220px !important;
        width: 95vw;
        height: calc(100vh - 32px);
        max-height: 840px;
    }
}

.lobby-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

@media (min-width: 960px) {
    .lobby-grid-layout {
        grid-template-columns: 1.05fr 1fr;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
}

.lobby-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.lobby-column-left {
    border-bottom: 1px solid var(--glass-border);
}

@media (min-width: 960px) {
    .lobby-column-left {
        border-right: 1px solid var(--glass-border);
        border-bottom: none;
    }
}

/* Scrollable Column Body inside Lobby */
.lobby-column-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(186, 155, 255, 0.25) transparent;
}

.lobby-column-body::-webkit-scrollbar {
    width: 5px;
}
.lobby-column-body::-webkit-scrollbar-thumb {
    background: rgba(186, 155, 255, 0.25);
    border-radius: 3px;
}

.lobby-card .landing-subtext {
    flex-shrink: 0;
    margin-top: auto;
    padding: 8px 20px 10px !important;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
}

/* Phone sync radar indicator in Lobby */
.btn-refresh-history {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}
.btn-refresh-history:hover {
    background: rgba(186, 155, 255, 0.15);
    border-color: var(--primary-lavender);
    color: var(--primary-lavender);
}
.btn-refresh-history:active {
    transform: scale(0.92);
}
.btn-refresh-history.spinning svg {
    animation: spin-refresh 0.8s linear infinite;
}
@keyframes spin-refresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.phone-sync-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 9px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.phone-sync-indicator:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.phone-sync-indicator:active {
    transform: scale(0.97);
}

.phone-sync-indicator.online {
    background: rgba(74, 225, 118, 0.1);
    border-color: rgba(74, 225, 118, 0.3);
    color: var(--signal-green);
}

.sync-radar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    display: inline-block;
    transition: all 0.3s ease;
}

.phone-sync-indicator.online .sync-radar-dot {
    background-color: var(--signal-green);
    box-shadow: 0 0 8px var(--signal-green);
    animation: pulse 1.6s infinite;
}

/* History Bento Cards Container */
.lobby-history-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

/* Bento History Card matching TrackMooov HistoryTrackCard */
.bento-history-card {
    background: rgba(16, 25, 45, 0.7);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-height: fit-content;
}

.bento-history-card:hover {
    border-color: var(--primary-lavender);
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(186, 155, 255, 0.15);
    background: rgba(22, 33, 58, 0.85);
}

.bento-history-card.loading {
    pointer-events: none;
    opacity: 0.85;
    border-color: rgba(74, 222, 118, 0.6);
    box-shadow: 0 0 14px rgba(74, 222, 118, 0.25);
}

.cloud-synced-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(74, 222, 118, 0.12);
    border: 1px solid rgba(74, 222, 118, 0.35);
    color: #4ade80;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    user-select: none;
    transition: all 0.2s ease;
}
.cloud-synced-badge svg {
    width: 12px;
    height: 12px;
}

.btn-delete-cloud-track {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 5px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    cursor: pointer;
    transition: all 0.18s ease;
}
.btn-delete-cloud-track:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: #ef4444;
    color: #ff6b6b;
    transform: scale(1.1);
}
.btn-delete-cloud-track:active {
    transform: scale(0.92);
}

.cloud-phone-only-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    user-select: none;
    transition: all 0.2s ease;
}
.cloud-upload-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}
.cloud-upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #4ade80);
    transition: width 0.3s ease;
}
.cloud-upload-stage-text {
    font-size: 10px;
    color: #4ade80;
    margin-top: 4px;
    font-weight: 500;
}
.cloud-slot-replace-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}
.cloud-slot-replace-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-replace-slot {
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-replace-slot:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
}

.bento-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.bento-history-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.bento-history-title {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.bento-history-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.bento-history-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.bento-history-photo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-lavender);
    background: rgba(186, 155, 255, 0.15);
    border: 1px solid rgba(186, 155, 255, 0.35);
    padding: 2px 7px;
    border-radius: 6px;
}

.bento-history-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* 4-cell Bento Metrics matching TrackMooov */
.bento-history-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.bento-history-metric-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(11, 19, 38, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 5px 8px;
    min-width: 0;
}

.bento-history-metric-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-history-metric-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

/* Vector Sparkline Mini-Route matching mobile canvas */
.bento-history-sparkline-wrap {
    width: 64px;
    height: 44px;
    flex-shrink: 0;
    background: rgba(11, 19, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.bento-history-sparkline-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.bento-history-sparkline-svg polyline {
    fill: none;
    stroke: #1A6FFF;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 3px rgba(26, 111, 255, 0.4));
}


/* High-Res Photo Viewer Modal */
.photo-modal-card {
    max-width: 800px;
    width: 92vw;
}

.photo-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    max-height: 80vh;
    padding: 16px;
    overflow: hidden;
}

.photo-modal-img {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-highlight);
}

.photo-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
}

.photo-modal-meta {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 22px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.lobby-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.lobby-user-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.lobby-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.lobby-user-pill:hover {
    background: rgba(255, 255, 255, 0.06);
}

.lobby-user-wrapper.open .user-pill-arrow {
    transform: rotate(180deg);
}

.lobby-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lobby-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-lavender);
    object-fit: cover;
}

.lobby-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lobby-user-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.lobby-user-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.lobby-rooms-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.lobby-rooms-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lobby-rooms-heading h3 {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.lobby-limit-tag {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    color: var(--action-orange);
    background: rgba(255, 95, 0, 0.12);
    border: 1px solid rgba(255, 95, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.lobby-empty-rooms {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    gap: 10px;
}

.lobby-empty-rooms h4 {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.lobby-empty-rooms p {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 380px;
    line-height: 1.5;
}

.lobby-rooms-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

/* ─────────────────────────────────────────────────────────────
   BENTO ROOM CARD
   ───────────────────────────────────────────────────────────── */
.bento-room-card {
    background: rgba(16, 25, 45, 0.7);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.bento-room-card:hover {
    border-color: var(--primary-lavender);
    box-shadow: 0 8px 30px rgba(201, 209, 255, 0.1);
}

.bento-room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bento-room-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bento-room-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #64748b;
    box-shadow: none;
    transition: all 0.3s ease;
}

.bento-room-status-dot.waiting {
    background-color: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.bento-room-status-dot.online {
    background-color: var(--signal-green);
    box-shadow: 0 0 10px var(--signal-green);
    animation: pulse 1.8s infinite;
}

.bento-room-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #FFFFFF;
}

.bento-room-loc {
    font-size: 11px;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
}

.bento-room-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────
   BENTO GRID & TILES (Room Card & Dialogs)
   ───────────────────────────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.bento-tile {
    background: rgba(11, 19, 38, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s;
}

.bento-tile:hover {
    border-color: rgba(186, 155, 255, 0.25);
}

.bento-tile.full-width {
    grid-column: span 2;
}

.bento-tile-label {
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.bento-tile-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-badge-tag {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
}

.bento-badge-tag.movetain {
    color: var(--primary-lavender);
    background: rgba(186, 155, 255, 0.12);
    border: 1px solid rgba(186, 155, 255, 0.3);
}

.bento-badge-tag.hardware {
    color: var(--signal-green);
    background: rgba(74, 225, 118, 0.12);
    border: 1px solid rgba(74, 225, 118, 0.3);
}

/* Secret Key with Eye Toggle */
.secret-key-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.btn-text-copy {
    background: none;
    border: none;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn-text-copy:hover {
    text-decoration: underline;
}

.secret-key-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-highlight);
    border-radius: 6px;
    padding: 0 8px;
    gap: 6px;
}

.secret-key-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--signal-green);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 0;
    outline: none;
}

.btn-eye-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s;
}

.btn-eye-toggle:hover {
    color: var(--primary-lavender);
}

.bento-room-footer {
    margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────────
   CREATE ROOM MODAL STYLING
   ───────────────────────────────────────────────────────────── */
.modal-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-highlight);
    border-radius: 7px;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 12px;
    width: 100%;
    outline: none;
    text-transform: uppercase;
}

.modal-input:focus, .modal-textarea:focus {
    border-color: var(--primary-lavender);
    box-shadow: 0 0 10px rgba(201, 209, 255, 0.2);
}

.modal-textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-highlight);
    border-radius: 7px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 12px;
    padding: 8px 12px;
    width: 100%;
    outline: none;
    resize: none;
}

.picker-map-box {
    width: 100%;
    height: 210px;
    border-radius: 8px;
    border: 1px solid var(--border-highlight);
    overflow: hidden;
    position: relative;
    background: #0B1326;
}

.picker-map-box .maplibregl-canvas-container,
.picker-map-box .maplibregl-canvas {
    background-color: #0B1326 !important;
}

.picker-coords-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--primary-lavender);
    margin-top: 4px;
}



/* ─────────────────────────────────────────────────────────────
   DM BANNER IN CHAT
   ───────────────────────────────────────────────────────────── */
.dm-active-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(74, 225, 118, 0.1);
    border-bottom: 1px solid rgba(74, 225, 118, 0.25);
}

.dm-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-primary);
}

.dm-badge {
    background: var(--signal-green);
    color: #000;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

/* ─────────────────────────────────────────────────────────────
   TRACEROUTE MODAL (Strictly Matching TrackMooov TracerouteModal.kt)
   ───────────────────────────────────────────────────────────── */
.traceroute-modal-card {
    width: 92%;
    max-width: 480px;
    background-color: #171F33 !important; /* Match Compose Color(0xFF171F33) */
    border: 1px solid var(--border-highlight) !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(201, 209, 255, 0.06);
}

.traceroute-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.traceroute-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.traceroute-btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.traceroute-btn-close:hover {
    color: var(--text-primary);
}

.traceroute-modal-body {
    padding: 16px;
}

.trace-view-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Spinner & Waiting view */
.trace-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(201, 209, 255, 0.15);
    border-top-color: var(--primary-lavender);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
    margin-top: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.trace-waiting-text {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 12px;
}

.trace-elapsed-text {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

.btn-trace-cancel {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.15s ease;
}

.btn-trace-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Route Cards */
.trace-scroll-area {
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 2px;
    margin-bottom: 14px;
}

.trace-asymmetric-card {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 95, 0, 0.08);
    border: 1px solid rgba(255, 95, 0, 0.35);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    color: var(--action-orange);
    font-family: var(--font-mono);
    font-size: 11px;
}

.trace-route-card {
    background-color: #1E2742; /* Match Compose Color(0xFF1E2742) */
    border: 1px solid var(--border-highlight);
    border-radius: 10px;
    padding: 12px;
    width: 100%;
}

.trace-route-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.trace-route-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--primary-lavender);
    text-transform: uppercase;
}

.trace-route-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
}

.trace-hops-tree {
    display: flex;
    flex-direction: column;
}

.trace-node-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.trace-node-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #888888;
}

.trace-node-dot.endpoint {
    background-color: var(--primary-lavender);
    box-shadow: 0 0 8px rgba(201, 209, 255, 0.4);
}

.trace-node-label {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trace-node-label.endpoint {
    font-weight: 700;
    color: var(--text-primary);
}

.trace-snr-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0 2px 3px;
}

.trace-arrow-down {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1;
}

.trace-direct-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--signal-green);
    letter-spacing: 0.5px;
}

.trace-snr-text {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
}

.trace-snr-empty {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Summary Bar */
.trace-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 16px;
    margin-top: 12px;
}

.trace-info-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trace-info-chip .chip-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.trace-info-chip .chip-val {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

/* Primary Close Button */
.btn-trace-primary {
    width: 100%;
    background: rgba(201, 209, 255, 0.18);
    border: 1px solid rgba(201, 209, 255, 0.5);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-trace-primary:hover {
    background: rgba(201, 209, 255, 0.28);
    box-shadow: 0 0 15px rgba(201, 209, 255, 0.2);
}

/* Timeout View */
.trace-timeout-title {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--action-orange);
    margin-top: 10px;
}

.trace-timeout-desc {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
    text-align: center;
}

/* ─────────────────────────────────────────────────────────────
   TOAST NOTIFICATION
   ───────────────────────────────────────────────────────────── */
.mvt-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: rgba(16, 25, 45, 0.95);
    border: 1px solid var(--primary-lavender);
    color: #FFF;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}

.mvt-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────────────────────
   MAPTILER 3D TACTICAL CONTROLS (Alpine Dark Glass Theme)
   ───────────────────────────────────────────────────────────── */
#map-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

.maptiler-tactical-ctrl {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    background: rgba(16, 25, 45, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-highlight);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    gap: 4px;
}

.maptiler-ctrl-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.maptiler-ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.maptiler-ctrl-btn .maptiler-btn-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke: currentColor;
    transition: transform 0.15s ease;
}

.maptiler-ctrl-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

.maptiler-ctrl-btn:hover .maptiler-btn-icon {
    transform: scale(1.08);
}

.maptiler-ctrl-btn.active {
    color: #FFFFFF;
    background: rgba(186, 155, 255, 0.18);
    border-color: rgba(186, 155, 255, 0.35);
    box-shadow: 0 0 12px rgba(186, 155, 255, 0.25);
}

.maptiler-ctrl-btn.active .maptiler-btn-icon {
    color: var(--primary-lavender);
}

/* MapLibre / MapTiler SDK Navigation & Compass Controls */
.maplibregl-ctrl-group {
    background: rgba(16, 25, 45, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid var(--border-highlight) !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45) !important;
}

.maplibregl-ctrl-group button {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background-color: transparent !important;
}

.maplibregl-ctrl-group button:last-child {
    border-bottom: none !important;
}

.maplibregl-ctrl-group button:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.maplibregl-ctrl-icon {
    filter: invert(1) brightness(1.2);
}

/* MapLibre / MapTiler Attribution */
.maplibregl-ctrl-attrib {
    background: rgba(11, 19, 38, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px 0 0 0 !important;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 9.5px !important;
    font-family: var(--font-mono) !important;
    padding: 3px 8px !important;
}

.maplibregl-ctrl-attrib a {
    color: var(--primary-lavender) !important;
    text-decoration: none !important;
}

.maplibregl-ctrl-attrib a:hover {
    text-decoration: underline !important;
}

/* Alpine Dark Glass Popups */
.maplibregl-popup-content {
    background: rgba(17, 26, 47, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-highlight) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    color: var(--text-primary) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(186, 155, 255, 0.1) !important;
    font-family: var(--font-ui) !important;
}

.maplibregl-popup-tip {
    border-top-color: rgba(17, 26, 47, 0.95) !important;
}

.maplibregl-popup-close-button {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 16px !important;
    padding: 4px 8px !important;
    top: 4px !important;
    right: 4px !important;
}

.maplibregl-popup-close-button:hover {
    color: #FFFFFF !important;
    background: transparent !important;
}

/* Custom Marker Styling (TrackMooov APRS Teardrop Pin) */
.custom-mvt-marker {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    pointer-events: auto;
    will-change: transform; /* GPU layer — marker repositioning stays off main thread */
}

.custom-mvt-marker:hover {
    transform: scale(1.12);
    z-index: 999 !important;
}

.mvt-aprs-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 50px;
}

.mvt-pin-svg {
    width: 38px;
    height: 50px;
    overflow: visible;
}

.mvt-pin-pill {
    background: rgba(11, 19, 38, 0.96);
    border: 1px solid rgba(201, 209, 255, 0.55);
    color: #FFFFFF;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    padding: 2px 7px;
    border-radius: 6px;
    margin-top: 3px;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-time-text.stale {
    opacity: 0.55;
    font-style: italic;
}

/* ─────────────────────────────────────────────────────────────
   PINNED GATEWAY LOCAL NODE CARD (Header of Participant List)
   ───────────────────────────────────────────────────────────── */
.bento-card.gateway-pinned {
    background: linear-gradient(135deg, rgba(74, 225, 118, 0.15) 0%, rgba(16, 25, 45, 0.95) 100%) !important;
    border: 1px solid rgba(74, 225, 118, 0.45) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(74, 225, 118, 0.15) !important;
    position: relative;
    margin-bottom: 12px;
}

.bento-card.gateway-pinned:hover {
    border-color: rgba(74, 225, 118, 0.75) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 22px rgba(74, 225, 118, 0.25) !important;
}

.bento-gw-badge {
    background: rgba(74, 225, 118, 0.22);
    border: 1px solid rgba(74, 225, 118, 0.5);
    color: #4AE176;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.bento-gw-refresh-btn {
    background: rgba(74, 225, 118, 0.18);
    border: 1px solid rgba(74, 225, 118, 0.5);
    color: #4AE176;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.bento-gw-refresh-btn:hover {
    background: rgba(74, 225, 118, 0.35);
    border-color: #4AE176;
    box-shadow: 0 0 12px rgba(74, 225, 118, 0.4);
    color: #FFFFFF;
}

.mvt-gateway-pin-pill {
    border-color: #4AE176 !important;
    color: #4AE176 !important;
    box-shadow: 0 0 8px rgba(74, 225, 118, 0.3) !important;
}

/* ==========================================================================
   USER PROFILE DROPDOWN & CLOUD STORAGE MODAL
   ========================================================================== */

/* Top Action Group Enhancements */
#btn-storage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 11px;
    padding: 6px 12px;
}

#btn-storage:hover {
    box-shadow: 0 0 10px rgba(201, 209, 255, 0.25);
}

.user-profile-wrapper {
    position: relative;
    display: inline-block;
}

.top-user-pill {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.top-user-pill:hover {
    background: rgba(201, 209, 255, 0.18);
    border-color: rgba(201, 209, 255, 0.45);
    box-shadow: 0 0 12px rgba(201, 209, 255, 0.15);
}

.user-pill-arrow {
    opacity: 0.7;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.user-profile-wrapper.open .user-pill-arrow {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #171F33;
    border: 1px solid rgba(201, 209, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(201, 209, 255, 0.08);
    z-index: 1200;
    animation: fadeInDropdown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-info {
    padding: 8px 10px;
}

.menu-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-user-email {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.menu-user-role-badge {
    display: inline-block;
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(201, 209, 255, 0.15);
    color: var(--primary-lavender);
    border: 1px solid rgba(201, 209, 255, 0.3);
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #FFFFFF;
}

.user-dropdown-item.item-danger {
    color: var(--alert-red);
}

.user-dropdown-item.item-danger:hover {
    background: rgba(255, 68, 68, 0.15);
    color: #FF6666;
}

.user-dropdown-item.admin-menu-link {
    color: var(--primary-lavender);
    text-decoration: none;
    border: 1px solid rgba(201, 209, 255, 0.10);
    background: linear-gradient(90deg, rgba(53, 68, 132, 0.15), rgba(53, 68, 132, 0.04));
}

.user-dropdown-item.admin-menu-link:hover {
    background: linear-gradient(90deg, rgba(53, 68, 132, 0.28), rgba(53, 68, 132, 0.10));
    border-color: rgba(201, 209, 255, 0.24);
}

.admin-menu-icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 6px;
    color: #10192D;
    background: var(--primary-lavender);
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(153, 168, 255, 0.22);
}

/* Retention Badge Clickable */
.chat-retention-badge.clickable {
    cursor: pointer;
    transition: all 0.18s ease;
}

.chat-retention-badge.clickable:hover {
    background: rgba(201, 209, 255, 0.35);
    border-color: var(--primary-lavender);
    box-shadow: 0 0 10px rgba(201, 209, 255, 0.4);
    transform: translateY(-1px);
}

/* Storage Modal Card (Pixel-matched with Traceroute Modal) */
.storage-modal-card {
    width: 92%;
    max-width: 500px;
    background-color: #171F33 !important;
    border: 1px solid var(--border-highlight) !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(201, 209, 255, 0.08);
}

.storage-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.storage-header-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.storage-modal-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Retention Notice Banner */
.storage-retention-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(201, 209, 255, 0.06);
    border: 1px solid rgba(201, 209, 255, 0.18);
    border-radius: 10px;
}

.storage-notice-icon {
    font-size: 16px;
    line-height: 1;
    margin-top: 1px;
}

.storage-notice-text strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-lavender);
    display: block;
    margin-bottom: 3px;
}

.storage-notice-text p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Quota Box */
.storage-quota-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 14px;
}

.storage-quota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.storage-quota-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.storage-quota-values {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.85);
}

.storage-quota-values b {
    color: #4AE176;
}

.storage-progress-track {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.storage-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4AE176 0%, #4488FF 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.storage-quota-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--text-muted);
}

.storage-quota-tag {
    color: #4AE176;
    letter-spacing: 0.8px;
}

.storage-quota-retention {
    letter-spacing: 0.8px;
}

/* Categories List */
.storage-categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.storage-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: all 0.15s ease;
}

.storage-item-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(201, 209, 255, 0.15);
}

.storage-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.storage-item-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    flex-shrink: 0;
}

.storage-item-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.storage-item-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #FFFFFF;
}

.storage-item-stats {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--primary-lavender);
}

.storage-item-subdetail {
    font-size: 10.5px;
    color: var(--text-secondary);
}

.btn-storage-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 68, 68, 0.12);
    border: 1px solid rgba(255, 68, 68, 0.35);
    color: #FF6666;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-storage-action:hover {
    background: rgba(255, 68, 68, 0.28);
    border-color: #FF4444;
    color: #FFFFFF;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
}

/* Danger Zone */
.storage-danger-zone {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-storage-wipe-all {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px;
    background: rgba(255, 68, 68, 0.08);
    border: 1px dashed rgba(255, 68, 68, 0.4);
    color: #FF7777;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-storage-wipe-all:hover {
    background: rgba(255, 68, 68, 0.22);
    border-color: #FF4444;
    color: #FFFFFF;
    box-shadow: 0 0 14px rgba(255, 68, 68, 0.35);
}

/* ─────────────────────────────────────────────────────────────
   TRACK HISTORY, RECORDING & ELEVATION PROFILE DRAWER
   ───────────────────────────────────────────────────────────── */

/* Active Recording Banner */
.active-rec-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    margin: 8px 10px 10px;
    background: rgba(255, 68, 68, 0.12);
    border: 1px solid rgba(255, 68, 68, 0.45);
    border-radius: 10px;
    box-shadow: 0 0 16px rgba(255, 68, 68, 0.2);
    animation: recBorderPulse 2s infinite ease-in-out;
}

@keyframes recBorderPulse {
    0%, 100% { border-color: rgba(255, 68, 68, 0.4); box-shadow: 0 0 12px rgba(255, 68, 68, 0.15); }
    50% { border-color: rgba(255, 68, 68, 0.85); box-shadow: 0 0 20px rgba(255, 68, 68, 0.35); }
}

.rec-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rec-dot-pulse {
    width: 9px;
    height: 9px;
    background: #FF3333;
    border-radius: 50%;
    box-shadow: 0 0 8px #FF3333;
    animation: recDotFade 1.2s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes recDotFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.rec-banner-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rec-banner-title {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    color: #FFAAAA;
    letter-spacing: 0.8px;
}

.rec-banner-stats {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-secondary);
}

.btn-rec-stop {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 68, 68, 0.25);
    border: 1px solid #FF4444;
    color: #FFFFFF;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-rec-stop:hover {
    background: #FF4444;
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.6);
}

/* Card REC Badge: clean text without bento box, zero jitter */
.card-rec-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 0;
    margin-left: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #FF4444;
    vertical-align: middle;
}

.card-rec-badge .rec-tiny-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FF3333;
    box-shadow: 0 0 6px rgba(255, 51, 51, 0.8);
    animation: recDotFade 1.2s infinite ease-in-out;
    flex-shrink: 0;
}

/* Bento Track Cards */
.saved-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 10px 14px;
    overflow-y: auto;
}

.bento-track-card {
    background: var(--surface-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    transition: all 0.18s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.bento-track-card:hover {
    border-color: rgba(201, 209, 255, 0.35);
    background: rgba(30, 41, 69, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.bento-track-card.active-selected {
    border-color: var(--primary-lavender);
    box-shadow: 0 0 16px rgba(201, 209, 255, 0.25);
    background: rgba(30, 41, 69, 0.85);
}

.bento-track-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.bento-track-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bento-track-title {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.bento-track-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
}

.bento-track-badges {
    display: flex;
    align-items: center;
    gap: 5px;
}

.track-badge-type {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 4px;
}

.track-badge-type.movetain {
    background: rgba(74, 225, 118, 0.15);
    color: #4AE176;
    border: 1px solid rgba(74, 225, 118, 0.4);
}

.track-badge-type.node {
    background: rgba(142, 197, 255, 0.15);
    color: #8EC5FF;
    border: 1px solid rgba(142, 197, 255, 0.4);
}

.bento-track-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
}

.bento-metric-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.bento-metric-label {
    font-family: var(--font-mono);
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
}

.bento-metric-value {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-lavender);
}

.bento-track-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bento-track-rf-meta {
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
}

.bento-track-actions {
    display: flex;
    gap: 6px;
}

.btn-track-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 4px 8px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-track-action:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.btn-track-action.btn-track-danger:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: #FF4444;
    color: #FFAAAA;
}

/* ─────────────────────────────────────────────────────────────
   ELEVATION PROFILE BOTTOM DRAWER
   ───────────────────────────────────────────────────────────── */
.elevation-profile-drawer {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    overflow: hidden;
    max-height: 280px;
}

.elevation-profile-drawer.hidden {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

.elev-drawer-handle {
    display: flex;
    justify-content: center;
    padding: 5px 0 3px;
    cursor: pointer;
}

.elev-handle-bar {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.elev-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.elev-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.elev-type-badge {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(74, 225, 118, 0.15);
    color: #4AE176;
    border: 1px solid rgba(74, 225, 118, 0.4);
}

.elev-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.elev-track-title {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.elev-track-meta {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-secondary);
}

.elev-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Metric Overlays Toolbar in Elevation Drawer */
.elev-overlays-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 12px;
}

.elev-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.elev-pill-btn:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.25);
}

.elev-pill-btn .pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.45;
    transition: all 0.18s ease;
}

.elev-pill-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.elev-pill-btn.active .pill-dot {
    opacity: 1;
}

.elev-pill-btn[data-metric="speed"].active {
    border-color: rgba(0, 229, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}
.elev-pill-btn[data-metric="pulse"].active {
    border-color: rgba(255, 42, 109, 0.6);
    box-shadow: 0 0 10px rgba(255, 42, 109, 0.2);
}
.elev-pill-btn[data-metric="temp"].active {
    border-color: rgba(255, 145, 0, 0.6);
    box-shadow: 0 0 10px rgba(255, 145, 0, 0.2);
}
.elev-pill-btn[data-metric="hum"].active {
    border-color: rgba(41, 121, 255, 0.6);
    box-shadow: 0 0 10px rgba(41, 121, 255, 0.2);
}

.elev-pill-btn.disabled {
    opacity: 0.28;
    cursor: not-allowed;
    pointer-events: none;
    border-style: dashed;
}

.scrub-cell.clickable {
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 6px;
    margin: -2px -6px;
    transition: all 0.15s ease;
}
.scrub-cell.clickable:hover {
    background: rgba(255, 255, 255, 0.08);
}
.scrub-cell.active-metric-speed {
    background: rgba(0, 229, 255, 0.08);
    border-left: 2px solid #00E5FF;
}
.scrub-cell.active-metric-pulse {
    background: rgba(255, 42, 109, 0.08);
    border-left: 2px solid #FF2A6D;
}
.scrub-cell.active-metric-temp {
    background: rgba(255, 145, 0, 0.08);
    border-left: 2px solid #FF9100;
}
.scrub-cell.active-metric-hum {
    background: rgba(41, 121, 255, 0.08);
    border-left: 2px solid #2979FF;
}

/* ─────────────────────────────────────────────────────────────
   CLOUD CONFIRMATION MODAL BUTTONS
   ───────────────────────────────────────────────────────────── */
.modal-cloud-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
}

.btn-cloud-cancel {
    height: 38px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: inherit;
}

.btn-cloud-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-cloud-stream {
    height: 38px;
    padding: 0 16px;
    background: rgba(186, 155, 255, 0.08);
    border: 1px solid rgba(186, 155, 255, 0.35);
    border-radius: 8px;
    color: #C9D1FF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    font-family: inherit;
}

.btn-cloud-stream:hover {
    background: rgba(186, 155, 255, 0.18);
    border-color: rgba(186, 155, 255, 0.6);
    color: #FFFFFF;
    box-shadow: 0 0 12px rgba(186, 155, 255, 0.25);
    transform: translateY(-1px);
}

.btn-cloud-upload {
    height: 38px;
    padding: 0 18px;
    background: linear-gradient(135deg, #10B981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
    box-sizing: border-box;
    font-family: inherit;
}

.btn-cloud-upload:hover {
    background: linear-gradient(135deg, #34D399, #10B981);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-cloud-upload:active,
.btn-cloud-stream:active,
.btn-cloud-cancel:active {
    transform: translateY(0);
}

.elev-drawer-body {
    padding: 8px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elev-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    cursor: crosshair;
}

#elevation-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.elev-scrub-cursor {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: #FFFFFF;
    box-shadow: 0 0 8px #FFFFFF, 0 0 16px var(--primary-lavender);
    pointer-events: none;
    z-index: 5;
}

.elev-scrubber-hud {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 6px 10px;
}

.scrub-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scrub-label {
    font-family: var(--font-mono);
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
}

.scrub-val {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #FFFFFF;
}

.scrub-val.highlight {
    color: var(--primary-lavender);
}

@media (max-width: 900px) {
    .elev-scrubber-hud {
        grid-template-columns: repeat(3, 1fr);
    }
    #scrub-sensors-cell {
        grid-column: span 2;
    }
}

/* ─────────────────────────────────────────────────────────────
   WAYPOINTS & GEOLOCATION CHAT CARDS SYSTEM
   ───────────────────────────────────────────────────────────── */

/* Interactive Geolocation Card in Chat Bubble */
.chat-waypoint-card {
    margin-top: 8px;
    background: rgba(10, 14, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.chat-waypoint-card:hover {
    border-color: rgba(201, 209, 255, 0.35);
    background: rgba(15, 21, 38, 0.8);
}

.chat-waypoint-card.sos {
    border-color: rgba(255, 51, 51, 0.6);
    background: rgba(45, 10, 10, 0.7);
    box-shadow: 0 0 14px rgba(255, 51, 51, 0.25);
    animation: sosBorderBlink 1.8s infinite ease-in-out;
}

@keyframes sosBorderBlink {
    0%, 100% { border-color: rgba(255, 51, 51, 0.4); }
    50% { border-color: rgba(255, 51, 51, 0.9); box-shadow: 0 0 18px rgba(255, 51, 51, 0.4); }
}

.chat-wp-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.chat-wp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-wp-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.chat-wp-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.chat-wp-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-wp-comment {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.chat-wp-coords {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(201, 209, 255, 0.85);
    margin-top: 2px;
}

/* Button to show on map */
.btn-chat-show-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(201, 209, 255, 0.12);
    border: 1px solid rgba(201, 209, 255, 0.28);
    border-radius: 6px;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.16s ease;
    width: 100%;
}

.btn-chat-show-map:hover {
    background: rgba(201, 209, 255, 0.25);
    border-color: var(--primary-lavender);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-chat-show-map:active {
    transform: translateY(0);
}

/* Waypoint Type Badges */
.wp-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.wp-badge-sos {
    color: #FF4444;
    background: rgba(255, 68, 68, 0.16);
    border: 1px solid rgba(255, 68, 68, 0.5);
}

.wp-badge-target {
    color: #EF5350;
    background: rgba(239, 83, 80, 0.16);
    border: 1px solid rgba(239, 83, 80, 0.5);
}

.wp-badge-location {
    color: #00E5FF;
    background: rgba(0, 229, 255, 0.16);
    border: 1px solid rgba(0, 229, 255, 0.5);
}

.wp-badge-waypoint {
    color: #FFA000;
    background: rgba(255, 160, 0, 0.16);
    border: 1px solid rgba(255, 160, 0, 0.5);
}

/* Bento Waypoint Cards (Tab Points) */
.points-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 10px 14px;
    overflow-y: auto;
}

.bento-wp-card {
    background: var(--surface-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.bento-wp-card:hover {
    background: rgba(30, 41, 69, 0.6);
    border-color: rgba(201, 209, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bento-wp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bento-wp-title-group {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.bento-wp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bento-wp-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-wp-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
}

.bento-wp-comment {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.35;
}

.bento-wp-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bento-wp-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.bento-wp-btn:hover {
    transform: translateY(-1px);
}

.bento-wp-btn-tx:hover {
    background: rgba(0, 216, 255, 0.15);
    border-color: rgba(0, 216, 255, 0.4);
    color: #00D8FF;
    box-shadow: 0 0 8px rgba(0, 216, 255, 0.2);
}

.bento-wp-btn-del:hover {
    background: rgba(255, 59, 48, 0.18);
    border-color: rgba(255, 59, 48, 0.45);
    color: #FF3B30;
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.25);
}

/* Map Marker Highlighting and SOS Pulses */
.sos-pulse-marker svg {
    animation: sosMarkerPulse 1.5s infinite ease-in-out;
}

@keyframes sosMarkerPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(255, 34, 34, 0.8)); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 16px rgba(255, 34, 34, 1)); }
}

.sos-pill {
    background: #FF2222 !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
    box-shadow: 0 0 8px rgba(255, 34, 34, 0.9) !important;
}

.marker-highlight-pulse {
    animation: markerPulseHighlight 1s ease-in-out 3;
}

@keyframes markerPulseHighlight {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); filter: drop-shadow(0 0 18px #00E5FF); }
}

/* ─────────────────────────────────────────────────────────────
   MAPLIBRE / MAPTILER NAVIGATION CONTROLS POSITIONING
   Lifts ONLY +, -, and Compass controls to ~42% from top (above middle),
   while keeping attribution at bottom-right corner.
   ───────────────────────────────────────────────────────────── */
.maplibregl-ctrl-bottom-right,
.maptiler-ctrl-bottom-right {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    pointer-events: none !important;
    z-index: 15 !important;
}

.maplibregl-ctrl-bottom-right > *,
.maptiler-ctrl-bottom-right > * {
    pointer-events: auto !important;
}

.maplibregl-ctrl-bottom-right .maplibregl-ctrl-group,
.maptiler-ctrl-bottom-right .maptiler-ctrl-group {
    position: absolute !important;
    top: 42% !important;
    transform: translateY(-50%) !important;
    right: 14px !important;
    margin: 0 !important;
}

.maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib,
.maptiler-ctrl-bottom-right .maptiler-ctrl-attrib {
    position: absolute !important;
    bottom: 4px !important;
    right: 4px !important;
    margin: 0 !important;
}

/* Tactical Controls Divider & Active Tool Styling */
.maptiler-ctrl-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.18);
    margin: 0 4px;
}

.maptiler-ctrl-btn.active-tool {
    background: rgba(0, 216, 255, 0.22) !important;
    border-color: rgba(0, 216, 255, 0.55) !important;
    color: #00D8FF !important;
    box-shadow: 0 0 12px rgba(0, 216, 255, 0.3) !important;
}

.maptiler-ctrl-btn#btn-tool-target.active-tool {
    background: rgba(255, 59, 48, 0.25) !important;
    border-color: rgba(255, 59, 48, 0.6) !important;
    color: #FF3B30 !important;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.35) !important;
}

/* Floating Ruler / Measurement HUD Overlay */
.ruler-hud-overlay {
    position: absolute;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    pointer-events: auto;
}

.ruler-hud-card {
    background: rgba(14, 18, 26, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 216, 255, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 14px rgba(0, 216, 255, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 320px;
    max-width: 480px;
    color: #fff;
    animation: rulerHudIn 0.2s ease-out;
}

@keyframes rulerHudIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ruler-hud-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ruler-hud-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ruler-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00D8FF;
    box-shadow: 0 0 8px #00D8FF;
    animation: pulseDot 1.4s infinite;
}

.ruler-hud-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #00D8FF;
}

.ruler-live-dist {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 216, 255, 0.4);
}

.ruler-hud-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 10.5px;
    color: var(--text-secondary);
}

.ruler-pts-count {
    font-family: var(--font-mono);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.ruler-hud-hints {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ruler-key-chip {
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.ruler-key-chip kbd {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 1px 4px;
    font-family: var(--font-mono);
    font-size: 8.5px;
    font-weight: 700;
    color: #00D8FF;
}

.ruler-hud-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.btn-ruler-action {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    padding: 5px 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ruler-action:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-ruler-primary {
    flex: 1;
    background: rgba(0, 216, 255, 0.25);
    border-color: rgba(0, 216, 255, 0.5);
    color: #00D8FF;
}

.btn-ruler-primary:hover {
    background: rgba(0, 216, 255, 0.35);
    box-shadow: 0 0 10px rgba(0, 216, 255, 0.3);
}

/* Measurement Track Badges */
.track-badge-type.measure,
.elev-type-badge.measure {
    background: rgba(0, 216, 255, 0.18) !important;
    border-color: rgba(0, 216, 255, 0.4) !important;
    color: #00D8FF !important;
}

/* Single-line Horizontal Map Attribution */
.maplibregl-ctrl-bottom-right,
.maptiler-ctrl-bottom-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    max-width: none !important;
    z-index: 10 !important;
}

.maplibregl-ctrl-attrib,
.maptiler-ctrl-attrib {
    white-space: nowrap !important;
    width: auto !important;
    max-width: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background-color: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    border-top-left-radius: 6px !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
}

.maplibregl-ctrl-attrib a,
.maptiler-ctrl-attrib a {
    color: rgba(201, 209, 255, 0.8) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.maplibregl-ctrl-attrib a:hover,
.maptiler-ctrl-attrib a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* Tactical Floating Segment Badges for Ruler */
.ruler-seg-badge {
    background: rgba(15, 23, 42, 0.92);
    border: 1.5px solid #FF5500;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 6px rgba(255, 85, 0, 0.4);
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.3px;
    transform: translate(-50%, -50%);
}

/* Claimed Coordinator & Lobby Members in Share Modal */
.coord-claimed-container {
    background: rgba(255, 95, 0, 0.08);
    border: 1px solid rgba(255, 95, 0, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
}

.coord-claimed-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coord-claimed-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--action-orange);
    flex-shrink: 0;
}

.coord-claimed-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.coord-claimed-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coord-claimed-sub {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-top: 1px;
}

.coord-unclaimed-text {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 6px;
}

.share-lobby-members-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
}

.share-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-highlight);
    border-radius: 6px;
    padding: 6px 10px;
}

.share-member-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.share-member-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.share-member-name {
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.share-member-role-badge {
    font-size: 9px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.share-member-role-badge.coordinator {
    background: rgba(255, 95, 0, 0.15);
    color: var(--action-orange);
    border: 1px solid rgba(255, 95, 0, 0.4);
}

.share-member-role-badge.spectator {
    background: rgba(74, 225, 118, 0.15);
    color: var(--signal-green);
    border: 1px solid rgba(74, 225, 118, 0.4);
}

/* Room Creator GPS Geolocation Button */
.btn-picker-gps {
    background: rgba(74, 225, 118, 0.12);
    border: 1px solid rgba(74, 225, 118, 0.4);
    color: var(--signal-green, #4AE176);
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-picker-gps:hover {
    background: rgba(74, 225, 118, 0.25);
    border-color: var(--signal-green, #4AE176);
    box-shadow: 0 0 8px rgba(74, 225, 118, 0.3);
}

/* ─────────────────────────────────────────────────────────────
   RECORDED ROUTE INSPECTION PANEL (SIDEBAR)
   ───────────────────────────────────────────────────────────── */
.sidebar-live-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.sidebar-route-inspection {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-surface);
}

.route-inspect-header {
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.28);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.route-inspect-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-back-to-lobby-sub {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-back-to-lobby-sub:hover {
    color: var(--primary-lavender);
    background: rgba(186, 155, 255, 0.12);
    border-color: rgba(186, 155, 255, 0.4);
}

.route-inspect-title-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.route-inspect-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-inspect-date {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Inspection Tabs */
.route-inspect-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.22);
    border-bottom: 1px solid var(--glass-border);
}

.route-inspect-tab-btn {
    flex: 1;
    height: 42px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.route-inspect-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.route-inspect-tab-btn.active {
    color: var(--primary-lavender);
    border-bottom-color: var(--primary-lavender);
    background: rgba(186, 155, 255, 0.08);
}

/* Panes */
.route-inspect-pane {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    padding: 12px;
}

.route-inspect-pane.active {
    display: flex;
}

/* Analytics Tab Bento Grid */
.analytics-scroll-body {
    overflow-y: auto;
    height: 100%;
    padding-right: 2px;
}

.analytics-bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bento-analytics-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s;
}

.bento-analytics-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.bento-analytics-card.full-width {
    grid-column: span 2;
}

.bento-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.bento-card-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.bento-card-value {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
    line-height: 1.2;
    white-space: nowrap;
}

#val-inspect-moving-rest {
    font-size: clamp(10px, 0.78rem, 12px);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.bento-icon-lavender { color: var(--primary-lavender); }
.bento-icon-cyan { color: #38bdf8; }
.bento-icon-green { color: #4ade80; }
.bento-icon-purple { color: #c084fc; }

/* Slope Analytics */
.slope-card {
    background: linear-gradient(180deg, rgba(186, 155, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(186, 155, 255, 0.2);
}

.slope-highlight-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 6px 0 10px 0;
}

.slope-box-side {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.slope-box-side.descent {
    align-items: flex-end;
}

.slope-box-title {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.slope-box-val {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.slope-box-side.ascent .slope-box-val { color: #4ade80; }
.slope-box-side.descent .slope-box-val { color: #ff7a00; }

.slope-box-center-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(186, 155, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slope-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.slope-subitem {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slope-sublabel {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.slope-subval {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #fff;
}
.slope-subval.ascent { color: #fff; }
.slope-subval.descent { color: #fff; }

.rest-val-green {
    color: var(--signal-green, #4AE176);
    font-weight: 700;
}

.route-summary-footer-meta {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-align: center;
}

/* Waypoints Tab */
.waypoints-subnav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.btn-toggle-idles-map {
    background: rgba(74, 222, 118, 0.12);
    border: 1px solid rgba(74, 222, 118, 0.35);
    color: #4ade80;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-idles-map.active {
    background: #4ade80;
    color: #0B1326;
    border-color: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 118, 0.4);
}

.waypoints-bento-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    height: 100%;
    padding-right: 2px;
}

.waypoint-bento-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
    box-sizing: border-box;
}

.waypoint-card-body {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.waypoint-bento-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(186, 155, 255, 0.4);
}

.waypoint-bento-card.active-selected {
    border-color: #BA9BFF;
    background: rgba(186, 155, 255, 0.1);
    box-shadow: 0 0 14px rgba(186, 155, 255, 0.25);
}

.waypoint-card-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.waypoint-card-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(186, 155, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-lavender);
    flex-shrink: 0;
}

.waypoint-card-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    flex: 1;
}

.waypoint-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.waypoint-card-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.waypoint-card-dist-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-lavender);
    background: rgba(186, 155, 255, 0.12);
    border: 1px solid rgba(186, 155, 255, 0.25);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.waypoint-card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.waypoint-card-notes {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Idle Period Bento Card */
.idle-bento-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(74, 222, 118, 0.04);
    border: 1px solid rgba(74, 222, 118, 0.25);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
}

.idle-bento-card:hover {
    background: rgba(74, 222, 118, 0.09);
    border-color: #4ade80;
}

.idle-card-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(74, 222, 118, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ade80;
    flex-shrink: 0;
}

.idle-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.idle-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.idle-card-dur {
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
    font-family: var(--font-mono);
}

.idle-card-dist {
    font-size: 11px;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    font-weight: 600;
}

.idle-card-time {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Charts Tab */
.charts-inspect-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 6px;
}

.charts-subnav-segmented {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.chart-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-tab-btn.active {
    background: var(--primary-lavender);
    color: #0B1326;
}

.chart-axis-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.btn-axis-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-axis-toggle.active {
    background: rgba(186, 155, 255, 0.2);
    color: var(--primary-lavender);
}

.chart-viewport-card {
    position: relative;
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chart-scrub-hud {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 10px;
    background: rgba(11, 19, 38, 0.95);
    border-bottom: 1px solid var(--glass-border);
    font-family: var(--font-mono);
}

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

.hud-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.hud-val {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

#route-telemetry-canvas {
    width: 100%;
    height: 205px;
    cursor: crosshair;
}

.chart-scrubber-line {
    position: absolute;
    top: 38px;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.chart-legend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ─────────────────────────────────────────────────────────────
   3D MAP IDLE MARKERS & TELEMETRY SCRUBBER BEACON
   ───────────────────────────────────────────────────────────── */
.streamed-waypoint-marker {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    pointer-events: auto;
    will-change: transform;
}

.streamed-waypoint-marker .marker-core {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.streamed-waypoint-marker:hover .marker-core {
    transform: scale(1.22);
}

.route-idle-map-marker {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    pointer-events: auto;
    will-change: transform;
    z-index: 10;
}

.route-idle-map-marker .route-idle-inner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(11, 19, 38, 0.92);
    border: 2px solid #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.5), inset 0 0 6px rgba(74, 222, 128, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ade80;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s;
}

.route-idle-map-marker:hover .route-idle-inner {
    transform: scale(1.25);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.9), inset 0 0 8px rgba(74, 222, 128, 0.6);
}

.route-idle-map-marker.active-pulse .route-idle-inner {
    animation: idle-marker-pulse 1.5s infinite;
}

@keyframes idle-marker-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

.route-scrubber-beacon {
    pointer-events: none;
    will-change: transform;
    z-index: 99;
}

.route-scrubber-beacon .beacon-core {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00f0ff;
    border: 3px solid #ffffff;
    box-shadow: 0 0 14px #00f0ff, 0 0 24px #1A6FFF;
    animation: pulse-beacon-core 1.2s infinite alternate ease-in-out;
}

@keyframes pulse-beacon-core {
    from {
        transform: scale(0.85);
        box-shadow: 0 0 8px #00f0ff;
    }
    to {
        transform: scale(1.25);
        box-shadow: 0 0 22px #00f0ff, 0 0 32px #1A6FFF;
    }
}

/* ─────────────────────────────────────────────────────────────
   HISTORY MODE FLOATING MAP CONTROLS & HUD POLISH
   ───────────────────────────────────────────────────────────── */
#top-bar-cloud-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: #00f0ff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.history-map-floating-controls {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
    pointer-events: auto;
}

.btn-history-map-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    background: #0B1326; /* Solid Obsidian Brand Base */
    border: 1.5px solid rgba(201, 209, 255, 0.35);
    border-radius: 17px;
    color: #DAE2FD;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.75), 0 0 1px rgba(0, 0, 0, 0.9);
    user-select: none;
}

.btn-history-map-pill:hover {
    background: #171F33;
    border-color: var(--primary-lavender);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.85);
}

.btn-history-map-pill.active {
    background: #0B1326;
    border-color: var(--signal-green);
    color: var(--signal-green);
    box-shadow: 0 0 16px rgba(74, 225, 118, 0.5), 0 4px 18px rgba(0, 0, 0, 0.8);
}

#btn-floating-profile-toggle.active,
#btn-floating-map-photos.active {
    background: #0B1326;
    border-color: var(--primary-lavender);
    color: var(--primary-lavender);
    box-shadow: 0 0 16px rgba(201, 209, 255, 0.5), 0 4px 18px rgba(0, 0, 0, 0.8);
}

/* Compact Waypoint Photo Thumbnail & Leg styling */
.wp-photo-thumbnail {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: 0;
    border: 1.5px solid rgba(186, 155, 255, 0.4);
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.wp-photo-thumbnail.local-capture {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(186, 155, 255, 0.08);
}

.wp-thumb-badge {
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    color: var(--primary-lavender);
    letter-spacing: 0.5px;
}

.wp-photo-thumbnail:hover {
    transform: scale(1.06);
    border-color: var(--primary-lavender);
    box-shadow: 0 0 14px rgba(186, 155, 255, 0.5);
}

.wp-photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wp-photo-zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
    color: #fff;
}

.wp-photo-thumbnail:hover .wp-photo-zoom-overlay {
    opacity: 1;
}

/* Waypoint Connector line between bento cards (matching TrackMooov) */
.waypoint-list-connector {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 2px 8px;
    gap: 8px;
    user-select: none;
    box-sizing: border-box;
}

.connector-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.connector-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.connector-dist {
    color: var(--primary-lavender);
}

.connector-dot {
    opacity: 0.5;
}

.connector-time {
    color: var(--text-muted);
}

/* 3D Map Photo Pin / Circular Marker */
.marker-core.photo-core {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2.5px solid var(--primary-lavender);
    box-shadow: 0 0 16px rgba(201, 209, 255, 0.75), 0 4px 12px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    background: #0B1326;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}

.marker-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.streamed-waypoint-marker:hover .marker-core.photo-core {
    transform: scale(1.3);
    box-shadow: 0 0 24px rgba(201, 209, 255, 0.95), 0 6px 16px rgba(0, 0, 0, 0.95);
    border-color: #ffffff;
    z-index: 50;
}

/* Scrubber HUD inactive metric state */
.scrub-cell.inactive {
    opacity: 0.32;
}

.scrub-cell.inactive .scrub-val {
    color: var(--text-muted);
}

/* Elevation Drawer Tabs (TELEMETRY vs MEASURE) */
.elev-drawer-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}

.elev-drawer-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.elev-drawer-tab-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.elev-drawer-tab-btn.active {
    background: rgba(201, 209, 255, 0.18);
    border-color: var(--primary-lavender);
    color: var(--primary-lavender);
}

#elev-tab-measure.active {
    background: rgba(255, 85, 0, 0.18);
    border-color: var(--action-orange);
    color: var(--action-orange);
}

.elev-tab-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-left: 4px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 9px;
    line-height: 1;
    transition: background 0.2s, transform 0.2s;
}

.elev-tab-close-btn:hover {
    background: var(--alert-red);
    transform: scale(1.15);
}

/* ─── RADIO DATA RECEIVE & LOS CONTROLS ─── */
.radio-receive-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px 6px 4px;
    width: 100%;
    box-sizing: border-box;
}

.radio-receive-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 95, 0, 0.35);
}

.radio-receive-title {
    font-size: 9.5px;
    font-weight: 800;
    color: #FF6D00;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.los-pill-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
    padding: 2px 4px;
    border-radius: 12px;
    transition: background 0.2s;
}

.los-pill-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.los-pill-label {
    font-size: 8.5px;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.los-pill-toggle.active .los-pill-label {
    color: #FF6D00;
}

.los-pill-track {
    width: 28px;
    height: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    position: relative;
    transition: all 0.25s ease;
}

.los-pill-toggle.active .los-pill-track {
    background: rgba(255, 95, 0, 0.25);
    border-color: #FF6D00;
}

.los-pill-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.los-pill-toggle.active .los-pill-thumb {
    left: 14px;
    background: #FF6D00;
    box-shadow: 0 0 6px rgba(255, 109, 0, 0.6);
}

/* ─── WAYPOINT HISTORY BENTO CARDS ─── */
.waypoint-history-card {
    background: var(--surface-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.waypoint-history-card:hover {
    background: rgba(30, 41, 69, 0.6);
    border-color: rgba(201, 209, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.waypoint-history-card.active-selected {
    border-color: #BA9BFF;
    background: rgba(186, 155, 255, 0.12);
    box-shadow: 0 0 14px rgba(186, 155, 255, 0.25);
}

.waypoint-history-card.sos-card {
    border-color: rgba(255, 42, 109, 0.4);
    box-shadow: 0 0 12px rgba(255, 42, 109, 0.15);
}

.waypoint-history-card.sos-card:hover {
    border-color: #FF2A6D;
    box-shadow: 0 0 16px rgba(255, 42, 109, 0.3);
}

.wp-offset-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
}

.wp-offset-dot {
    font-size: 10px;
}

.btn-wp-elev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9.5px;
    font-weight: 800;
    color: #64B5F6;
    letter-spacing: 0.8px;
    background: rgba(100, 181, 246, 0.12);
    border: 1px solid rgba(100, 181, 246, 0.35);
    border-radius: 3px;
    padding: 1px 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    animation: elevGlow 2.2s infinite alternate ease-in-out;
}

.btn-wp-elev:hover {
    background: rgba(100, 181, 246, 0.28);
    border-color: #64B5F6;
    box-shadow: 0 0 10px rgba(100, 181, 246, 0.5);
    transform: translateY(-1px);
}

@keyframes elevGlow {
    0% { opacity: 0.75; }
    100% { opacity: 1; filter: drop-shadow(0 0 4px rgba(100, 181, 246, 0.4)); }
}

/* ─── WAYPOINT BADGES & COORDS IN HISTORY ─── */
.wp-badge-radio {
    color: #FF6D00;
    background: rgba(255, 109, 0, 0.16);
    border: 1px solid rgba(255, 109, 0, 0.5);
}

.wp-badge-photo {
    color: #BA9BFF;
    background: rgba(186, 155, 255, 0.16);
    border: 1px solid rgba(186, 155, 255, 0.5);
}

.waypoint-card-coords {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(201, 209, 255, 0.85);
    margin-top: 2px;
}

.photo-pill {
    border-color: rgba(186, 155, 255, 0.55) !important;
    color: #BA9BFF !important;
}

/* ─────────────────────────────────────────────────────────────
   NODE WEATHER & BATTERY TELEMETRY BOTTOM DRAWER
   ───────────────────────────────────────────────────────────── */
.node-telemetry-drawer {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    z-index: 1205;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    overflow: hidden;
    max-height: 340px;
}

.node-telemetry-drawer.hidden {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

.telemetry-drawer-handle {
    display: flex;
    justify-content: center;
    padding: 5px 0 3px;
    cursor: pointer;
}

.telemetry-handle-bar {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.telemetry-drawer-header {
    display: flex;
    align-items: center;
    padding: 5px 14px 6px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.telemetry-drawer-header::-webkit-scrollbar {
    display: none;
}

.telemetry-title-group {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.telemetry-node-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: #00E5FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.telemetry-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.telemetry-node-title {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.telemetry-node-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Period selector toolbar */
.telemetry-period-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.telemetry-period-btn {
    padding: 2px 7px;
    height: 23px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.65);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.telemetry-period-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

.telemetry-period-btn.active {
    color: #FFFFFF;
    background: rgba(186, 155, 255, 0.22);
    border-color: rgba(186, 155, 255, 0.6);
    box-shadow: 0 0 10px rgba(186, 155, 255, 0.25);
}

.telemetry-date-wrap {
    margin-left: 2px;
}

.telemetry-date-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 2px 5px;
    height: 23px;
    max-width: 108px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.telemetry-date-input:focus,
.telemetry-date-input.active {
    border-color: var(--primary-lavender);
    box-shadow: 0 0 8px rgba(186, 155, 255, 0.3);
}

/* Metric toggle toolbar */
.telemetry-metrics-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.telemetry-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    height: 23px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    white-space: nowrap;
}

.telemetry-pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.25);
}

.telemetry-pill-btn .pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.45;
    transition: all 0.18s ease;
}

.telemetry-pill-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.telemetry-pill-btn.active .pill-dot {
    opacity: 1;
}

.telemetry-pill-btn[data-metric="temp"].active {
    border-color: rgba(255, 145, 0, 0.6);
    box-shadow: 0 0 10px rgba(255, 145, 0, 0.2);
}
.telemetry-pill-btn[data-metric="hum"].active {
    border-color: rgba(0, 229, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}
.telemetry-pill-btn[data-metric="aqi"].active {
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.2);
}
.telemetry-pill-btn[data-metric="bat"].active {
    border-color: rgba(0, 255, 136, 0.6);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}
.telemetry-pill-btn[data-metric="volt"].active {
    border-color: rgba(255, 214, 0, 0.6);
    box-shadow: 0 0 10px rgba(255, 214, 0, 0.2);
}
.telemetry-pill-btn[data-metric="press"].active {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.2);
}

.telemetry-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Body & Canvas */
.telemetry-drawer-body {
    padding: 8px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.telemetry-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    cursor: crosshair;
}

#node-telemetry-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.telemetry-scrub-cursor {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: #FFFFFF;
    box-shadow: 0 0 8px #FFFFFF, 0 0 16px var(--primary-lavender);
    pointer-events: none;
    z-index: 5;
}

.telemetry-empty-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--font-mono);
    font-size: 11.5px;
    text-align: center;
    padding: 16px;
    pointer-events: none;
}

/* Scrubber HUD */
.telemetry-scrubber-hud {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 5px 8px;
}

@media (max-width: 900px) {
    .telemetry-scrubber-hud {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 550px) {
    .telemetry-scrubber-hud {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Sidebar Quick Chart Action (Clean icon button, no bento box) */
.bento-quick-chart-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--primary-lavender, #BA9BFF);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    padding: 0;
}

.bento-quick-chart-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.bento-quick-chart-btn:active {
    transform: scale(0.92);
}

/* Map Balloon Popup Telemetry Button (MVT Brand Style) */
.btn-popup-telemetry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    background: rgba(186, 155, 255, 0.12);
    border: 1px solid rgba(186, 155, 255, 0.35);
    border-radius: 8px;
    color: var(--primary-lavender, #BA9BFF);
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-top: 4px;
}

.btn-popup-telemetry svg {
    color: var(--primary-lavender, #BA9BFF);
    transition: transform 0.2s ease;
}

.btn-popup-telemetry:hover {
    background: rgba(186, 155, 255, 0.22) !important;
    border-color: var(--primary-lavender, #BA9BFF) !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 12px rgba(186, 155, 255, 0.35);
    transform: translateY(-1px);
}

.btn-popup-telemetry:hover svg {
    color: #FFFFFF;
    transform: scale(1.1);
}

.btn-popup-telemetry:active {
    transform: translateY(0);
}






