: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);
    cursor: pointer;
    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;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.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;
    min-height: 0;
}

.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);
}

.bento-card.node-selected {
    border-color: var(--primary-lavender, #c4c9ff);
    background: rgba(196, 201, 255, 0.12);
    outline: 2px solid rgba(196, 201, 255, 0.65);
    outline-offset: -2px;
    box-shadow: 0 0 16px rgba(196, 201, 255, 0.2);
}

/* 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;
    min-width: 0;
    flex: 0 1 auto;
}

.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;
}

.bento-action-trigger.loading svg {
    animation: bentoSpin 1s linear infinite;
    color: #4AE176;
}

@keyframes bentoSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 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-location-row { flex-wrap:nowrap; gap:6px; }
.bento-location-row > .bento-detail-item { flex-shrink:0; white-space:nowrap; }
.bento-location-row > .bento-last-seen { flex:1 1 auto; min-width:7ch; }
.bento-last-seen .bento-time-text { display:block; flex:1 1 auto; min-width:0; box-sizing:border-box; padding-right:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.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-date-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    width: 100%;
    flex-shrink: 0;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 500;
}

.chat-date-separator::before,
.chat-date-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-highlight);
    opacity: 0.5;
}

.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: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    line-height: 1;
    user-select: none;
}

.bubble-hops.direct {
    color: var(--signal-green);
}

.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;
    box-shadow: 0 0 18px rgba(255, 51, 68, 0.28),
        0 0 32px rgba(255, 51, 68, 0.12),
        inset 0 0 16px rgba(255, 51, 68, 0.08);
}

.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: 8px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1;
}

.bubble-time {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    line-height: 1;
    white-space: nowrap;
}

.bubble-encryption { display:inline-flex; align-items:center; }
.bubble-encryption:empty { display:none; }
.bubble-encryption svg, .bubble-ack svg { display:block; height:12px; flex:none; }
.bubble-encryption svg { width:12px; }
.bubble-ack svg { width:auto; }

.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%;
    z-index: 1;
}

/* ─────────────────────────────────────────────────────────────
   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 */
    background-image: var(--topographic-background, none);
    background-size: cover;
    background-position: center;
    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, rgba(19, 28, 50, .78) 0%, rgba(13, 21, 39, .68) 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: 1420px !important;
        width: 96vw;
        height: calc(100vh - 32px);
        max-height: 880px;
    }
}

.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-limit-tag,
#lobby-history-count-badge,
#lobby-cloud-slots-badge,
#lobby-planned-routes-badge {
    color: var(--text-secondary, #b8c0de);
    background: rgba(170, 180, 220, 0.08);
    border-color: rgba(170, 180, 220, 0.22);
    column-gap: 4px;
}
.lobby-limit-tag .room-limit-count.is-full { color: #ff5555; }

.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;
}

.shared-room-card {
    position: relative;
    overflow: hidden;
}

.shared-room-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.shared-room-card.is-unavailable .shared-room-content {
    filter: blur(3px);
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
}

.shared-room-card.is-unavailable {
    border-color: rgba(255, 59, 48, 0.45);
}

.shared-room-unavailable-bar {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 32px;
    background: #FF3B30;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 44px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 1;
}

.shared-room-trash {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-left: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.shared-room-trash:hover { background: rgba(0,0,0,0.15); }
.shared-room-trash:focus-visible { outline: 2px solid white; outline-offset: -4px; }

.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);
}

/* ─────────────────────────────────────────────────────────────
   LORA RADIO STATUS MODAL (Strictly Matching TrackMooov MeshRadioInfoModal.kt)
   ───────────────────────────────────────────────────────────── */
.radio-info-modal-card {
    width: 92%;
    max-width: 440px;
    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.6), 0 0 30px rgba(201, 209, 255, 0.06);
}

.radio-info-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);
}

.radio-info-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.radio-info-btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.radio-info-btn-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.radio-info-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-info-status-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}

.radio-info-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--signal-green);
    box-shadow: 0 0 8px rgba(74, 225, 118, 0.5);
    flex-shrink: 0;
}

.radio-info-dot.offline {
    background: #FF4444;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.radio-info-conn-text {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--signal-green);
    font-family: var(--font-ui);
}

.radio-info-conn-text.offline {
    color: var(--text-secondary);
}

.radio-info-hop-card {
    padding: 12px 14px;
    background: rgba(30, 39, 66, 0.65);
    border: 1px solid var(--border-highlight);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.radio-info-hop-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-lavender);
    letter-spacing: 0.5px;
}

.radio-info-hop-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 6px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.hop-btn {
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
}

.hop-btn:hover:not(:disabled) {
    background: rgba(201, 209, 255, 0.3);
    border-color: var(--primary-lavender);
}

.hop-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.hop-value {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    min-width: 60px;
    text-align: center;
}

.radio-info-hop-desc {
    font-size: 10.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

.radio-info-details-card {
    padding: 12px 14px;
    background: #1E2742;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.radio-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    padding: 5px 0;
}

.radio-info-lbl {
    color: var(--text-secondary);
    font-size: 11.5px;
}

.radio-info-val {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 11.5px;
}

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

.radio-info-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 3px 0;
}

.radio-info-btn-done {
    width: 100%;
    height: 40px;
    background: #283252;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.15s ease;
    margin-top: 4px;
}

.radio-info-btn-done:hover {
    background: #354484;
    color: #fff;
}

.bento-gw-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(201, 209, 255, 0.1);
    border: 1px solid rgba(201, 209, 255, 0.25);
    color: var(--primary-lavender);
    border-radius: 5px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.15s ease;
}

.bento-gw-info-btn:hover {
    background: rgba(201, 209, 255, 0.22);
    border-color: var(--primary-lavender);
    color: #fff;
}

/* ─────────────────────────────────────────────────────────────
   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;
}

/* Actions Row & Secondary Map Button */
.trace-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.btn-trace-secondary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 95, 0, 0.15);
    border: 1px solid rgba(255, 95, 0, 0.6);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--action-orange, #FF5F00);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-trace-secondary:hover {
    background: rgba(255, 95, 0, 0.28);
    box-shadow: 0 0 15px rgba(255, 95, 0, 0.3);
}

.traceroute-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.traceroute-btn-dock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 3px 8px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.traceroute-btn-dock:hover {
    background: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}

/* ─────────────────────────────────────────────────────────────
   TRACEROUTE DOCKED HUD MODE (Non-blocking 3D Map View)
   ───────────────────────────────────────────────────────────── */
.modal-overlay#modal-traceroute.traceroute-docked {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 72px 0 0 16px !important;
    z-index: 1050 !important;
}

.modal-overlay#modal-traceroute.traceroute-docked .traceroute-modal-card {
    pointer-events: auto !important;
    width: 320px !important;
    max-width: 320px !important;
    max-height: calc(100vh - 90px) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(201, 209, 255, 0.1) !important;
    animation: traceDockSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay#modal-traceroute.traceroute-docked .trace-scroll-area {
    max-height: calc(100vh - 240px);
}

@keyframes traceDockSlideIn {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 600px) {
    .modal-overlay#modal-traceroute.traceroute-docked {
        padding: 55px 8px 0 8px !important;
    }
    .modal-overlay#modal-traceroute.traceroute-docked .traceroute-modal-card {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   FLOATING MAP TRACEROUTE HUD (Top Center of 3D Map)
   ───────────────────────────────────────────────────────────── */
.map-traceroute-hud {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1010;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 25, 45, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(201, 209, 255, 0.25);
    border-radius: 20px;
    padding: 5px 12px 5px 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(201, 209, 255, 0.12);
    animation: hudFadeIn 0.25s ease;
}

@keyframes hudFadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.traceroute-hud-pulse {
    display: none;
}

.traceroute-hud-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #FFFFFF;
    white-space: nowrap;
}

.btn-traceroute-hud-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    border-radius: 12px;
    padding: 2px 9px;
    color: var(--primary-lavender);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-traceroute-hud-action:hover {
    background: rgba(201, 209, 255, 0.25);
    border-color: var(--primary-lavender);
    color: #FFFFFF;
}

.btn-traceroute-hud-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s ease;
}

.btn-traceroute-hud-close:hover {
    color: #FFFFFF;
}

/* ─────────────────────────────────────────────────────────────
   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,
.maptiler-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,
.maptiler-popup-tip {
    border-top-color: rgba(17, 26, 47, 0.95) !important;
}

.maplibregl-popup-close-button,
.maptiler-popup-close-button {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 15px !important;
    line-height: 1 !important;
    padding: 0 !important;
    top: 8px !important;
    right: 8px !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
}

.maplibregl-popup-close-button:hover,
.maptiler-popup-close-button:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.25) !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;
}

.custom-mvt-marker.node-reception-front {
    z-index: 1000 !important;
}

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

.popup-node-actions {
    display: flex;
    gap: 6px;
    margin: 6px 0 8px;
}
.popup-node-actions button { flex: 1; width: auto; white-space: nowrap; }
.mvt-aprs-pin.node-reception-pulse::before,
.mvt-aprs-pin.node-reception-pulse::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 32px;
    top: 3px;
    left: 3px;
    border: 2px solid #5CE6FF;
    box-shadow: 0 0 8px rgba(92, 230, 255, .65);
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    animation: nodeReceptionRing 1.2s ease-out both;
}
.mvt-aprs-pin.node-reception-pulse::after { animation-delay: .25s; }
@keyframes nodeReceptionRing {
    from { opacity: .85; transform: scale(.8); }
    to { opacity: 0; transform: scale(2.5); }
}
@media (prefers-reduced-motion: reduce) {
    .mvt-aprs-pin.node-reception-pulse::before,
    .mvt-aprs-pin.node-reception-pulse::after { animation: none; opacity: 0; }
}

.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;
    max-width: 180px !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);
}

/* ─────────────────────────────────────────────────────────────
   TACTICAL WEATHER BROADCASTER MODAL
   ───────────────────────────────────────────────────────────── */
.weather-modal-card {
    width: 92%;
    max-width: 530px;
    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);
}

.weather-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);
}

.weather-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;
}

.weather-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.weather-header-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease, background 0.15s ease;
}

.weather-header-btn svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: stroke 0.15s ease;
}

.weather-header-btn:hover,
.weather-header-btn.active {
    color: var(--text-primary);
}

.weather-help-card {
    background: rgba(20, 28, 48, 0.95);
    border: 1px solid rgba(201, 209, 255, 0.25);
    border-radius: 12px;
    padding: 13px 15px;
    animation: fadeIn 0.2s ease-out;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(201, 209, 255, 0.04);
}

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

.weather-help-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-lavender);
    text-transform: uppercase;
}

.weather-help-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.weather-help-close svg {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.weather-help-close:hover {
    color: #fff;
}

.weather-help-content {
    font-size: 11.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.weather-help-sec-title {
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.weather-help-list {
    margin: 0;
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.weather-help-list li strong {
    color: #4AE176;
}

.weather-help-list li em {
    color: #00D8FF;
    font-style: normal;
}

.weather-help-notice {
    display: flex;
    gap: 9px;
    background: rgba(255, 184, 0, 0.08);
    border: 1px solid rgba(255, 184, 0, 0.3);
    border-radius: 8px;
    padding: 9px 11px;
    margin-top: 2px;
}

.weather-notice-icon {
    font-size: 15px;
    line-height: 1.2;
    flex-shrink: 0;
}

.weather-notice-text {
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255, 235, 180, 0.95);
}

.weather-notice-text strong {
    color: #FFB800;
    letter-spacing: 0.5px;
}

.weather-modal-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 80vh;
    overflow-y: auto;
}

.weather-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-highlight);
    border-radius: 10px;
}

.weather-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weather-status-title {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.8px;
}

.weather-status-sub {
    font-size: 10px;
    color: var(--text-secondary);
}

.weather-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.weather-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.weather-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    transition: 0.2s;
}

.weather-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: 0.2s;
}

.weather-toggle-switch input:checked + .weather-toggle-slider {
    background-color: rgba(74, 225, 118, 0.25);
    border-color: var(--signal-green);
}

.weather-toggle-switch input:checked + .weather-toggle-slider:before {
    transform: translateX(20px);
    background-color: var(--signal-green);
    box-shadow: 0 0 8px rgba(74, 225, 118, 0.7);
}

.weather-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.weather-setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weather-setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weather-field-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.weather-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.weather-segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.weather-seg-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-align: center;
}

.weather-seg-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}

.weather-seg-btn.active {
    background: rgba(201, 209, 255, 0.18);
    color: var(--primary-lavender);
    border-color: rgba(201, 209, 255, 0.35);
}

.weather-segmented-control.small .weather-seg-btn {
    font-size: 9.5px;
    padding: 3px 8px;
}

.weather-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.weather-input-wrap input,
.weather-coord-input-wrap input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 7px 10px;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 11px;
    outline: none;
    transition: border-color 0.15s;
}

.weather-input-wrap input:focus,
.weather-coord-input-wrap input:focus {
    border-color: var(--primary-lavender);
}

.weather-input-hint,
.weather-select-hint {
    font-size: 9px;
    color: var(--text-muted);
}

.weather-coords-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.weather-coord-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2px 8px;
}

.weather-coord-input-wrap input {
    border: none;
    background: transparent;
    padding: 5px 0;
    width: 100%;
}

.coord-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
}

.weather-coord-auto-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--signal-green);
    font-family: var(--font-mono);
    background: rgba(74, 225, 118, 0.08);
    border: 1px solid rgba(74, 225, 118, 0.2);
    border-radius: 6px;
    padding: 5px 8px;
    margin-top: 2px;
}

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

.weather-chip-checkbox {
    cursor: pointer;
}

.weather-chip-checkbox input {
    display: none;
}

.weather-chip-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--text-secondary);
    font-size: 10px;
    font-family: var(--font-mono);
    transition: all 0.15s ease;
    user-select: none;
}

.weather-chip-checkbox input:checked + .weather-chip-pill {
    background: rgba(201, 209, 255, 0.16);
    border-color: var(--primary-lavender);
    color: #FFFFFF;
    font-weight: 600;
}

.weather-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 10px;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 11px;
    outline: none;
    cursor: pointer;
}

.weather-select option {
    background: #171F33;
    color: #FFFFFF;
}

.weather-preview-box {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.weather-preview-label {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.weather-preview-chars {
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--signal-green);
    font-weight: 600;
}

.weather-preview-text {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.4;
    color: var(--primary-lavender);
    word-break: break-word;
}

.weather-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* 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); }
}

@keyframes recSlideOutUp {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-12px); }
}
@keyframes recSlideInDown {
    0%   { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}
.rec-banner-info.slide-out {
    animation: recSlideOutUp 0.3s ease forwards;
    pointer-events: none;
}
.rec-banner-info.slide-in {
    animation: recSlideInDown 0.32s ease forwards;
}

.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: 0;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #FF4444;
    vertical-align: middle;
    flex-shrink: 0;
}

.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: 8px 10px 24px;
    flex: 1;
}

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

.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;
    min-width: 0;
}

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

.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;
    flex-shrink: 0;
}

.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: 7px 6px;
}

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

.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);
    white-space: nowrap;
}

.bento-track-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    min-height: 28px;
}

.bento-track-rf-meta {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.track-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 3.5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 9px;
    white-space: nowrap;
}

.track-meta-pill .meta-label {
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.track-meta-pill strong {
    color: var(--primary-lavender);
    font-weight: 600;
}

.bento-track-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.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: 3px 8px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    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: 4px;
    background: transparent;
    border: 0;
    padding: 4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-waypoint-card:hover {
    background: transparent;
}

.chat-waypoint-card.sos {
    margin-top: 4px;
    padding: 4px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.chat-waypoint-card.sos .chat-wp-title {
    color: #ff7184;
    white-space: normal;
}

.chat-waypoint-card.sos .chat-wp-comment {
    overflow-wrap: anywhere;
}

@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;
    flex-direction: column;
    align-items: flex-start;
}

.chat-wp-kind {
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .5px;
}

.chat-wp-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: normal;
    overflow-wrap: anywhere;
}

.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 > .mvt-aprs-pin {
    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); }
}

@media (prefers-reduced-motion: reduce) {
    .marker-highlight-pulse > .mvt-aprs-pin {
        animation: none;
        filter: drop-shadow(0 0 12px #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%);
}

/* Tactical Floating Midpoint SNR Badges for Traceroute */
.trace-snr-badge {
    background: rgba(13, 20, 32, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 6px;
    padding: 3px 7px;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 229, 255, 0.25);
    pointer-events: none;
    user-select: none;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    z-index: 10;
}

.trace-snr-badge-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.trace-snr-badge-row.outbound {
    color: #4AE176;
}

.trace-snr-badge-row.return {
    color: #00E5FF;
}

.trace-snr-badge-arrow {
    font-size: 9px;
    opacity: 0.85;
}

.trace-snr-badge-dir {
    font-size: 9px;
    font-weight: 700;
    opacity: 0.75;
    letter-spacing: 0.5px;
}

.trace-snr-badge-val {
    letter-spacing: 0.2px;
    font-weight: 900;
}

.coord-claimed-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-highlight);
    font-family: var(--font-mono);
    font-size: 11px;
}

.coord-status-label {
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    font-size: 11px;
}

.coord-status-value {
    color: var(--action-orange, #FF5F00);
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.coord-status-free {
    color: var(--signal-green, #4AE176);
    font-size: 10px;
    font-weight: 500;
}

.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: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 2px;
}

.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%;
    min-height: 0;
    overflow: hidden;
}

.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);
}







/* Accordion Card for Guests in Share Modal */
.share-member-role-badge.blocked {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.4);
}
.share-member-card {
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.share-member-card:hover {
    border-color: rgba(255, 255, 255, 0.22);
}
.share-member-card.open {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.42);
}
.share-member-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.share-member-header:hover {
    background: rgba(255, 255, 255, 0.03);
}
.share-member-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}
.share-member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.share-member-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.share-member-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.share-member-meta {
    font-size: 9.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.share-member-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.share-member-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--text-muted);
    opacity: 0.7;
}
.share-member-card.open .share-member-chevron {
    transform: rotate(180deg);
    color: var(--signal-green, #4AE176);
    opacity: 1;
}
.share-member-perms-drawer {
    padding: 8px 10px 10px 10px;
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    flex-direction: column;
    gap: 7px;
}
.share-member-card.open .share-member-perms-drawer {
    display: flex;
}
.share-perms-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2px;
}
.share-perms-title {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}
.btn-perm-block {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.35);
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.16s ease;
    letter-spacing: 0.4px;
    line-height: 1.4;
}
.btn-perm-block:hover {
    background: rgba(255, 107, 107, 0.22);
    border-color: #ff6b6b;
    color: #fff;
}
.btn-perm-block.is-blocked {
    background: rgba(74, 225, 118, 0.12);
    border-color: rgba(74, 225, 118, 0.4);
    color: var(--signal-green, #4AE176);
}
.btn-perm-block.is-blocked:hover {
    background: rgba(74, 225, 118, 0.22);
    color: #fff;
}
.share-perms-chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}
@media (max-width: 480px) {
    .share-perms-chips {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.perm-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 4px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    font-family: var(--font-mono, monospace);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    user-select: none;
    transition: all 0.16s ease;
    line-height: 1.1;
    min-width: 0;
}
.perm-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}
.perm-chip.active {
    background: rgba(74, 225, 118, 0.14);
    border-color: var(--signal-green, #4AE176);
    color: var(--signal-green, #4AE176);
    font-weight: 600;
}
.perm-chip-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    flex-shrink: 0;
}
.perm-chip.active .perm-chip-status {
    background: rgba(74, 225, 118, 0.25);
    color: var(--signal-green, #4AE176);
}
.perm-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.8;
}
.perm-chip.active .perm-chip-icon {
    opacity: 1;
}
.perm-chip-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Spectator Mode: Target tool strictly hidden */
body.role-spectator #btn-tool-target,
#btn-tool-target.hidden-spectator {
    display: none !important;
}
.chat-select-wrapper { position: relative; }
.chat-recipient-picker-button {
    border: 0; background: transparent; color: var(--text-primary);
    font: 700 10.5px var(--font-mono); padding: 8px 24px 8px 30px;
    cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-recipient-picker-panel {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 100;
    width: min(280px, calc(100vw - 48px)); padding: 8px; box-sizing: border-box;
    background: #111b2e; border: 1px solid var(--border-highlight); border-radius: 10px;
    box-shadow: 0 8px 24px #0007;
}
.chat-recipient-picker-panel[hidden] { display: none; }
.chat-recipient-picker-panel input {
    width: 100%; box-sizing: border-box; padding: 9px; font: 11px var(--font-mono);
    border: 1px solid #ffffff25; border-radius: 7px; background: #0c1424; color: #dde3f5;
}
.chat-recipient-picker-list { max-height: 260px; overflow-y: auto; margin-top: 6px; }
.chat-recipient-picker-item {
    display: block; width: 100%; border: 0; border-radius: 6px; background: transparent;
    color: #dde3f5; font: 11px var(--font-mono); text-align: left; padding: 10px; cursor: pointer;
    overflow-wrap: anywhere;
}
.chat-recipient-picker-item:hover, .chat-recipient-picker-item:focus-visible,
.chat-recipient-picker-item.selected { background: #c9d1ff20; color: #c9d1ff; }
.chat-recipient-picker-list p { font: 11px var(--font-mono); color: var(--text-secondary); padding: 8px; }

/* Keep telemetry stable: long names yield space instead of wrapping the header. */
.bento-callsign { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bento-security-battery { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.node-pki-badge { display: inline-flex; align-items: center; flex: 0 0 14px; }
.node-pki-badge svg { display: block; }
.bento-left-identity .card-rec-badge { flex-shrink: 0; }
.node-short-name { white-space: nowrap; }

.telemetry-pill-btn:disabled{opacity:.4;cursor:default;box-shadow:none}

/* MQTT settings reuse the radio status card, with bounded mobile inputs. */
details.radio-info-hop-card { display:block; }
#mqtt-crypto-settings[hidden], #mqtt-pki-settings[hidden], #mqtt-crypto-psk[hidden] { display:none; }
#radio-key-settings[hidden], #radio-key-copy[hidden], #chat-key-recovery[hidden] { display:none; }
#radio-key-settings .hop-btn, .mqtt-peer-verification .hop-btn, #chat-key-recovery {
    width:auto; height:auto; min-height:30px; padding:6px 10px; font-size:10px;
}
#radio-key-result { overflow-wrap:anywhere; }
#chat-key-recovery { margin:0; flex-shrink:0; }
#chat-key-warning { display:flex; align-items:center; gap:8px; margin:6px 12px; font-size:11px; color:#ff7777; }
#chat-key-warning[hidden], #chat-recipient-security[hidden], .bubble-header[hidden] { display:none; }
.chat-recipient-security { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:28px; height:28px; padding:4px; background:transparent; border:0; color:var(--text-secondary); cursor:pointer; }
.chat-recipient-security[data-state="KNOWN"] { color:var(--signal-green); }
.chat-recipient-security[data-state="CHANGED"] { color:#ff5555; }
.chat-recipient-security:focus-visible { outline:1px solid currentColor; border-radius:4px; }
.bubble-footer { flex-wrap:wrap; }
.bubble-message-details > summary { display:flex; align-items:center; cursor:pointer; list-style:none; }
.bubble-message-details > summary::-webkit-details-marker { display:none; }
.bubble-message-details[open] { flex-basis:100%; }
.bubble-message-details > div { display:flex; flex-direction:column; gap:4px; padding-top:6px; text-align:left; overflow-wrap:anywhere; font-size:10px; }
.mqtt-crypto-input { width:100%; min-width:0; box-sizing:border-box; margin:6px 0; padding:8px; border:1px solid var(--glass-border); border-radius:6px; background:var(--bg-card); color:var(--text-primary); font:11px var(--font-ui); }
.mqtt-crypto-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.mqtt-crypto-actions .hop-btn { width:auto; height:auto; padding:8px; font-size:10px; }
.mqtt-crypto-summary { display:flex; align-items:center; gap:8px; cursor:pointer; list-style:none; }
.mqtt-crypto-summary::-webkit-details-marker { display:none; }
.mqtt-crypto-summary .radio-info-hop-label { flex:1; min-width:0; margin:0; line-height:16px; }
.mqtt-crypto-summary:focus-visible { outline:2px solid var(--text-primary); outline-offset:5px; border-radius:3px; }
.mqtt-crypto-status { font:700 10px/16px var(--font-ui); color:var(--text-secondary); text-align:right; }
.mqtt-crypto-status.is-verified { color:#4ade80; }
.mqtt-crypto-chevron { display:block; flex:0 0 16px; align-self:center; color:var(--text-secondary); transition:transform .15s; }
details.radio-info-hop-card > summary .mqtt-crypto-chevron { transform:rotate(0deg); }
details.radio-info-hop-card[open] > summary .mqtt-crypto-chevron { transform:rotate(180deg); }
.mqtt-crypto-body { margin-top:12px; }
.mqtt-crypto-body > .radio-info-hop-desc { margin-bottom:8px; }
#firmware-update-settings[hidden],#firmware-update-progress[hidden] { display:none; }
#firmware-update-settings { display:block; }
.firmware-device-info { margin-bottom:14px; padding:12px; border:1px solid var(--border-highlight); border-radius:8px; background:rgba(0,0,0,.12); }
.firmware-device-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:12px; }
.firmware-device-row > span,.firmware-version-grid span { color:var(--text-secondary); font:500 11px/1.5 var(--font-ui); }
.firmware-device-row > div { min-width:0; text-align:right; }
.firmware-device-row strong { display:block; color:var(--text-primary); font:700 13px/1.5 var(--font-ui); overflow-wrap:anywhere; }
.firmware-device-row code { display:block; color:var(--primary-lavender); font:500 11px/1.5 var(--font-mono); }
.firmware-version-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding-top:12px; border-top:1px solid var(--border-highlight); }
.firmware-version-grid span { display:block; margin-bottom:4px; }
.firmware-version-grid > :last-child { text-align:right; }
.firmware-version-grid strong { display:block; color:var(--text-primary); font:700 12px/1.5 var(--font-mono); overflow-wrap:anywhere; }
#firmware-update-settings[data-up-to-date="true"] .firmware-version-grid strong { color:#4ade80; }
#firmware-update-settings[data-update-available="true"] #firmware-update-latest { color:#fde68a; }
#firmware-update-cancel[hidden] { display:none; }
#firmware-update-settings[data-up-to-date="true"] .firmware-update-confirm,
#firmware-update-settings[data-up-to-date="true"] #firmware-update-start { display:none; }
#firmware-update-settings[data-up-to-date="true"] #firmware-update-badge,
#firmware-update-settings[data-up-to-date="true"] #firmware-update-message { color:#4ade80; }
#firmware-update-check[hidden],#firmware-update-start[hidden],
#firmware-update-settings[data-updating="true"] .firmware-update-confirm { display:none; }
#firmware-update-settings[data-updating="true"] #firmware-update-message {
    text-align:center; color:#4ade80; font:700 16px/1.5 var(--font-ui);
    margin:16px 0 12px; overflow-wrap:anywhere;
}
#firmware-update-settings[data-updating="true"] .mqtt-crypto-actions { justify-content:center; }
#firmware-update-settings[open] .mqtt-crypto-chevron { transform:rotate(180deg); }
#firmware-update-settings[data-update-available="true"] { border-color:#eab308; }
#firmware-update-settings[data-update-available="true"] #firmware-update-badge {
    color:#fde68a; background:rgba(234,179,8,.14); border:1px solid rgba(234,179,8,.45);
    border-radius:5px; padding:2px 7px; flex-shrink:0; white-space:nowrap;
}
.firmware-update-available { display:flex; align-items:center; gap:12px; padding:14px; margin-bottom:14px; border:1px solid rgba(234,179,8,.4); border-radius:8px; background:rgba(234,179,8,.1); color:#fde68a; }
.firmware-update-available[hidden] { display:none; }
.firmware-update-available > svg { flex:0 0 24px; }
.firmware-update-available > div { min-width:0; }
.firmware-update-available span { display:block; font:700 11px/1.5 var(--font-ui); }
.firmware-update-available strong { display:block; font:700 19px/1.6 var(--font-ui); overflow-wrap:anywhere; }
.firmware-update-available small { display:block; font:400 11px/1.5 var(--font-ui); color:var(--text-secondary); }
#firmware-update-progress { width:100%;height:10px;accent-color:#4ade80;margin:4px 0 10px; }
.firmware-update-confirm { display:flex;align-items:flex-start;gap:8px; }

.share-access-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 12px 12px}.share-access-actions .btn-perm-block{white-space:normal;text-align:center}

.shared-room-unavailable-bar{height:auto;min-height:32px;padding-top:7px;padding-bottom:7px;text-align:center;line-height:1.35}

.share-access-actions .approve-member{color:var(--signal-green);border-color:var(--signal-green)}

.shared-room-card.is-pending .shared-room-unavailable-bar{background:#f3bb4e;color:#172033}.shared-room-card.is-pending{border-color:rgba(243,187,78,.45)}

/* Coordinator applications: persistent until the owner decides. */
#btn-share.has-pending-requests,#menu-item-share.has-pending-requests{color:#ffd078;border-color:#e6ae46;background:rgba(230,174,70,.14);box-shadow:0 0 12px rgba(230,174,70,.16)}
#btn-share.has-pending-requests::after,#menu-item-share.has-pending-requests::after{content:attr(data-pending-count);display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#f3bb4e;color:#172033;font:700 10px var(--font-mono);flex-shrink:0}
.share-member-card.share-member-pending{border-color:#e6ae46;background:linear-gradient(110deg,rgba(243,187,78,.13),rgba(243,187,78,.035));box-shadow:inset 3px 0 #f3bb4e}
.share-member-pending .share-member-role-badge{color:#ffd078;border-color:rgba(243,187,78,.55);background:rgba(243,187,78,.12)}
.share-member-pending .share-member-info{min-width:0;max-width:none}

/* Scrubbing owns touch gestures only inside the route chart. */
#elev-canvas-wrapper{touch-action:none;user-select:none;-webkit-user-select:none}
/* Keep live-room controls closed until the server has confirmed this connection.
   CSS applies before app.js/Firebase restore, including cached room roles. */
body[data-room-access="pending"] #sidebar-live-wrapper {
    visibility: hidden;
    pointer-events: none;
}
#sidebar { position: relative; }
#room-loading-status { display: none; position: absolute; inset: 0; z-index: 1; padding: 24px; align-items: center; justify-content: center; pointer-events: none; }
.room-loading-indicator { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 240px; visibility: hidden; animation: room-loading-reveal 0s .5s forwards; }
.room-loading-node { width: 112px; height: 119px; margin-bottom: 18px; color: #b5adf6; }
.node-radio-wave { stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: 0; animation: node-radio-pulse 1.8s ease-out infinite; }
.node-radio-wave-2 { animation-delay: .25s; }
.node-radio-wave-3 { animation-delay: .5s; }
.room-loading-detail { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.room-loading-track { width: 96px; height: 2px; margin-top: 16px; overflow: hidden; border-radius: 2px; background: rgba(181, 173, 246, .12); }
.room-loading-track span { display: block; height: 100%; width: 36%; border-radius: inherit; background: #aaa3e9; animation: room-loading-sweep 1.8s ease-in-out infinite alternate; }
@keyframes room-loading-reveal { to { visibility: visible; } }
@keyframes node-radio-pulse { 0%, 100% { opacity: 0; } 25% { opacity: .9; } 65% { opacity: .25; } }
@keyframes room-loading-sweep { from { transform: translateX(-100%); } to { transform: translateX(280%); } }
@media (prefers-reduced-motion: reduce) {
    .node-radio-wave { animation: none; opacity: .45; }
    .room-loading-track span { animation: none; width: 100%; opacity: .5; }
}
body[data-room-access="pending"] #room-loading-status { display: flex; }
/* Lobby planner/history do not open a room connection. */
html[data-page="lobby"] body #room-loading-status { display: none; }
body[data-room-access="pending"] #badge-gateway { visibility: hidden; }
body[data-room-access="pending"] #btn-weather,
body[data-room-access="pending"] #btn-tool-ruler,
body[data-room-access="pending"] #btn-tool-target,
body[data-room-access="pending"] #modal-weather,
body[data-room-access="pending"] #modal-storage,
html:not([data-page="lobby"]) body[data-room-access="pending"] #modal-share,
body:not([data-room-access="owner"]) #btn-storage,
body:not([data-room-access="owner"]) #btn-share,
body:not([data-room-access="owner"]) #menu-item-storage,
body:not([data-room-access="owner"]) #menu-item-share,
body:not([data-room-access="owner"]) #menu-divider-top,
body:not([data-room-access="owner"]) #chat-retention-btn {
    display: none !important;
}
.storage-accounting-note {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.6;
}
.storage-accounting-title { color: var(--primary-lavender); font: 700 10px var(--font-mono); letter-spacing: 1.5px; margin-bottom: 9px; }
.storage-accounting-row { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.storage-accounting-row strong { color: var(--text-primary); font: 500 11px var(--font-mono); white-space: nowrap; }
.storage-accounting-total { border-top: 1px solid var(--glass-border); margin-top: 7px; padding-top: 9px; color: var(--text-primary); }
.storage-accounting-note p { margin: 8px 0 0; color: var(--text-muted); font-size: 10px; }
.storage-accounting-note p:empty { display: none; }

.lobby-rooms-bar-actions { flex-wrap: wrap; gap: 10px; height: auto; max-height: none; padding-top: 12px; padding-bottom: 12px; }
.lobby-room-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.lobby-usb-setup { text-decoration: none; white-space: nowrap; }
.lobby-usb-setup:focus-visible { outline: 2px solid var(--primary-lavender); outline-offset: 3px; }

/* Match the geometry of neighboring lobby actions and counters. */
.lobby-room-actions > .btn { box-sizing: border-box; height: 28px; padding: 0 10px; border-radius: 7px; line-height: 1; justify-content: center; }
.lobby-rooms-heading .lobby-limit-tag { box-sizing: border-box; display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 9.5px; line-height: 1; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }

.phone-sync-indicator{padding-right:4px}
.phone-sync-indicator .btn-refresh-history{width:22px;height:22px;flex:0 0 22px;padding:0;margin-left:3px;border:0;border-left:1px solid var(--glass-border);border-radius:0;background:transparent;color:inherit}
.phone-sync-indicator .btn-refresh-history:hover{background:transparent;color:var(--primary-lavender)}

/* Keep the landing map motif visible across the viewport, softer behind the cards. */
.landing-overlay{isolation:isolate;background-image:none}
.landing-overlay::before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background-image:var(--topographic-background,none);background-size:cover;background-position:center;opacity:.72;mask-image:linear-gradient(100deg,#000 0%,#0007 38%,#0005 60%,#000 100%)}
@media(max-width:680px){.landing-overlay::before{opacity:.52}}

.bento-badge-tag[id^="bento-transport-"][hidden]{display:none}
/* The map can fail independently; leave the room sidebar and its data usable. */
#map-load-status { position: absolute; z-index: 20; left: 50%; top: 45%; transform: translate(-50%, -50%); max-width: 85%; padding: 24px; text-align: center; background: #131c31; color: #c6cffb; border: 1px solid #394461; border-radius: 12px; }
#map-load-status[hidden] { display: none; }
#map-load-retry[hidden] { display: none; }
.bento-radio-link {
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: calc(100% - 17px);
    box-sizing: border-box;
    padding: 4px 7px;
    border: 1px solid rgba(201, 209, 255, .2);
    border-radius: 6px;
    background: rgba(201, 209, 255, .07);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #c9d1ff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    margin: 3px 0 3px 17px;
}
.bento-radio-link svg { width: 13px; height: 13px; flex: none; }
.bento-radio-kind { font-size: 8px; font-weight: 700; opacity: .65; flex: none; }
.bento-radio-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.radio-key-own-section{border:1px solid var(--border-color,#3c4664);border-radius:8px;padding:10px;margin-bottom:14px}.radio-key-own-section>summary{cursor:pointer;font-weight:600}.radio-public-key{overflow-wrap:anywhere;user-select:text}

#radio-key-settings [hidden]{display:none!important}

.mqtt-peer-verification{margin-top:16px;padding:12px;border:1px solid var(--border-color,#3c4664);border-radius:10px;background:rgba(10,17,33,.2)}.mqtt-peer-verification>summary{list-style:none;cursor:pointer}.mqtt-peer-verification>summary::-webkit-details-marker{display:none}.mqtt-peer-verification[open]>summary .mqtt-crypto-chevron{transform:rotate(180deg)}.recipient-key-card{margin:10px 0 14px;padding:12px;background:rgba(8,14,28,.35);border:1px solid var(--border-color,#3c4664);border-radius:8px}.recipient-key-card[hidden]{display:none}.recipient-key-owner{font-size:11px;font-weight:700;margin-bottom:12px;overflow-wrap:anywhere}.recipient-key-label{display:block;font-size:11px;color:var(--text-secondary);margin-bottom:6px}.recipient-key-card code{display:block;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.6;user-select:text}.recipient-key-fingerprint{margin-top:12px;padding-top:10px;border-top:1px solid var(--border-color,#3c4664);font-size:11px;color:var(--text-secondary)}.recipient-key-fingerprint>summary{cursor:pointer}.recipient-key-fingerprint code{margin-top:8px}.recipient-key-changed{color:#ff6666;font-size:11px;margin-bottom:10px}

/* Reception metadata wraps below coordinates on narrow waypoint cards. */
.bento-wp-meta { flex-wrap: wrap; }
.waypoint-received-time { font-family: var(--font-mono); font-size: 10px; opacity: .7; }
.bento-wp-meta .waypoint-received-time { flex-basis: 100%; padding-left: 16px; }
#tx-wp-name { min-width: 0; overflow-wrap: anywhere; }
#tx-wp-badge { flex-shrink: 0; margin-left: 8px; }

 .wp-provenance { margin:6px 0; font:11px/1.4 var(--font-mono, monospace); color:var(--text-secondary); overflow-wrap:anywhere; }
.wp-origin-label { opacity:.65; margin-right:3px; }
.wp-forwarded { display:flex; align-items:center; gap:6px; margin-top:4px; }
.wp-forwarded svg { flex:none; opacity:.7; }
.wp-forwarded-name { min-width:0; }
.wp-forwarded b { font-weight:500; color:var(--text-primary); }
.wp-mecc { flex:none; padding:3px 6px; border:1px solid transparent; border-radius:5px; color:#cad3ff; background:rgba(202,211,255,.09); font:10px/1.2 var(--font-mono,monospace); white-space:nowrap; cursor:pointer; }
.wp-mecc:hover { background:rgba(202,211,255,.17); }
.wp-mecc:focus-visible { outline:2px solid #cad3ff; outline-offset:2px; }
.chat-origin { margin-top:6px; display:flex; align-items:center; }

/* Keep access guidance in History, outside its action toolbar. */
.phone-access-notice { margin: 16px 20px 0; padding: 14px 16px; border: 1px solid var(--glass-border); border-radius: 12px; background: rgba(186,155,255,.06); display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.phone-access-notice[hidden] { display: none; }
.phone-access-notice strong { color: var(--primary-lavender); font-size: 13px; }
.phone-access-notice span, .phone-access-notice small { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.lobby-column-right > .lobby-rooms-bar { flex-wrap: wrap; height: auto; min-height: 52px; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.lobby-column-right .phone-sync-indicator { flex-shrink: 0; white-space: nowrap; }

/* Never render cached geographic content before the room capability is accepted. */
html[data-page="room"] body[data-room-access="pending"] #map-container,
body[data-room-access="denied"] #app-container,
body[data-room-access="denied"] #landing-overlay { visibility: hidden; }
#room-unavailable-screen { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 24px; background: #0b1223; color: #d2d6ff; isolation: isolate; }
#room-unavailable-screen > div { width: min(100%, 460px); padding: 32px; border: 1px solid #39425c; border-radius: 20px; background: #151e31; }
#room-unavailable-screen::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--topographic-background, url('/logo/startup-contours.svg')); background-size: cover; background-position: center; opacity: .72; }
#room-unavailable-screen .room-unavailable-brand { display: flex; align-items: center; gap: 12px; }
#room-unavailable-screen .room-unavailable-brand img { display: block; object-fit: contain; max-width: 65%; }
#room-unavailable-screen a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
#room-unavailable-screen h1 { margin: 24px 0 12px; }
#room-unavailable-screen p { line-height: 1.6; color: #b5bed3; }
#room-unavailable-screen a { display: block; width: fit-content; margin: 24px auto 0; text-align: center; letter-spacing: .06em; padding: 12px 20px; border-radius: 8px; background: #ced2ff; color: #11182b; font-weight: 700; text-decoration: none; }

.node-removal-overlay { display:flex !important; position:fixed; inset:0; z-index:10000; align-items:center; justify-content:center; background:rgba(5,10,20,.7); backdrop-filter:blur(8px); }
.node-removal-overlay p { margin:0; line-height:1.5; color:var(--text-secondary); }
.node-removal-actions { display:flex; gap:12px; margin-top:8px; }
.node-removal-actions button { border-radius:8px; font-family:var(--font-mono,monospace); font-size:11px; font-weight:600; flex:1; padding:10px; text-align:center; cursor:pointer; }
.node-removal-actions [data-delete] { color:#ff5555; border:1px solid #ff555566; background:#ff555514; }
.node-removal-actions [data-delete]:hover { background:#ff55552b; }
