/* ---------------------------------------------------------------------
   ATHENA — Dashboard CSS
   Extraido de Components/Pages/Home.razor (linhas 35-3588) para reduzir
   o tamanho do componente. Referenciado em App.razor via <link>.
   --------------------------------------------------------------------- */

    .top-row, .sidebar { display: none !important; }
    main { padding: 0 !important; margin: 0 !important; }
    article { padding: 0 !important; }

    /* VARIÁVEIS DE TEMA (DARK PADRÃO) */
    :root {
        --bg-sidebar: #080808;
        --bg-workspace: #030303;
        --bg-card: #0a0a0a;
        --text-main: #ffffff;
        --text-muted: #888888;
        --border-color: rgba(255, 255, 255, 0.05);
        --input-bg: #111111;
        --accent: #ff6600;
        --danger: #ff3333;
        --success: #00ff66;
        
        --info: #00d2ff;
        --info-border: rgba(0, 210, 255, 0.3);
        --info-bg: rgba(0, 210, 255, 0.1);
    }

    .light-theme {
        --bg-sidebar: #f8f9fa;
        --bg-workspace: #f1f3f5;
        --bg-card: #ffffff;
        --text-main: #212529; 
        --text-muted: #6c757d;
        --border-color: rgba(0, 0, 0, 0.05);
        --input-bg: #ffffff;
        
        --success: #008f39; 
        --danger: #d32f2f;
        
        --info: #005b9f;
        --info-border: rgba(0, 91, 159, 0.4);
        --info-bg: rgba(0, 91, 159, 0.08);
    }

    *, *::before, *::after { box-sizing: border-box; }

    .nexus-system-root { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg-workspace); color: var(--text-main); font-family: 'Inter', sans-serif; display: flex; overflow: hidden; z-index: 9999; transition: background 0.3s, color 0.3s; }
    
    .mobile-header { display: none; }
    .mobile-overlay-menu { display: none; }

    .side-panel { width: 320px; height: 100%; background: var(--bg-sidebar); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; flex-shrink: 0; box-shadow: 2px 0 10px rgba(0,0,0,0.02); z-index: 20; transition: background 0.3s, left 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);}
    .brand-header { padding: 30px 24px 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 15px; cursor: pointer; }
    
    .brand-logo { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 15px rgba(255,102,0,0.22); }
    .brand-logo img { width: 46px; height: 46px; object-fit: contain; display:block; }
    .brand-title-group { display: flex; flex-direction: column; }
    .brand-title { font-size: 20px; font-weight: 900; letter-spacing: 5px; line-height: 1; color: var(--text-main); }
    .brand-subtitle { font-size: 8px; color: var(--text-muted); letter-spacing: 1px; font-weight: 700; margin-top: 4px; text-transform: uppercase; }

    .search-container { padding: 15px 24px; border-bottom: 1px solid var(--border-color); background: var(--bg-card); }
    .search-input { width: 100%; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 4px; padding: 10px 15px; color: var(--text-main); font-family: 'JetBrains Mono'; font-size: 11px; outline: none; transition: 0.3s; }
    .search-input:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(255,102,0,0.1); }

    .vehicle-list-container { flex: 1; overflow-y: auto; padding: 15px 0; scrollbar-width: thin; }
    .node-item { cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 11px; letter-spacing: 0.5px; transition: background 0.2s; user-select: none; }
    .node-item:hover { background: rgba(128,128,128,0.05); }
    .node-client { font-weight: 700; color: var(--text-main); text-transform: uppercase; background: rgba(128,128,128,0.02); margin-bottom: 1px; }
    .node-usina { padding-left: 35px; color: var(--text-muted); }
    .node-frente { padding-left: 50px; color: var(--text-muted); font-weight: 600; }

    .vehicle-btn { width: 100%; background: transparent; border: none; cursor: pointer; padding: 8px 20px 8px 70px; font-size: 13px; color: var(--text-muted); font-family: 'JetBrains Mono'; display: flex; align-items: center; justify-content: space-between; outline: none; }
    .vehicle-btn:hover { color: var(--text-main); background: rgba(128,128,128,0.1); }
    .vehicle-btn.active { color: var(--accent); background: rgba(255,102,0,0.1); border-right: 3px solid var(--accent); font-weight: 700; }

    @keyframes alertBlink { 0% { text-shadow: none; } 50% { color: var(--danger); text-shadow: 0 0 12px var(--danger); } 100% { text-shadow: none; } }
    .text-fault { animation: alertBlink 1s infinite; font-weight: 900; }
    .btn-fault { animation: alertBlink 1s infinite; }

    .system-actions { padding: 20px; border-top: 1px solid var(--border-color); background: rgba(128,128,128,0.02); display: flex; flex-direction: column; gap: 8px; }
    .sys-btn { width: 100%; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); padding: 12px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
    .sys-btn:hover { border-color: var(--text-muted); color: var(--text-main); background: rgba(128,128,128,0.05); }
    .sys-btn-add { border-color: rgba(0, 255, 102, 0.3); color: var(--success); }
    .sys-btn-user { border-color: var(--info-border); color: var(--info); }

    /* Edge-to-edge 2026 — estilo Tesla/cockpit, sem moldura externa desperdiçada.
       Antes: padding 30px 40px → 80px laterais perdidos em telas grandes.
       Agora: 0 horizontal (cards fazem padding interno), padding-top 0
       (topbar já cobre), bottom enxuto. */
    .main-workspace { flex: 1; padding: 0 0 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; position: relative; }

    /* FULL-BLEED — todos os filhos diretos colam na borda direita da viewport
       e na borda direita da sidebar. ZERO margem lateral. O respiro interno
       fica nos paddings de cada card. */
    .main-workspace > .athena-topbar { margin: 0 !important; border-radius: 0; }
    .main-workspace > section,
    .main-workspace > div:not(.athena-topbar):not(.mapa-frota-overlay) {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .main-workspace > .map-container {
        width: 100% !important;
        margin: 0 !important;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    .main-workspace > .asset-header-bar {
        margin: 0 !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .main-workspace > .nexus-hero-shell { margin: 0 !important; }
    
    .mqtt-status-bar { position: absolute; top: 0; left: 0; right: 0; padding: 5px; text-align: center; font-size: 9px; font-weight: 900; letter-spacing: 2px; z-index: 10; transition: 0.3s; }
    .mqtt-online { background: rgba(0, 255, 102, 0.1); color: var(--success); border-bottom: 1px solid rgba(0, 255, 102, 0.3); }
    .mqtt-offline { background: rgba(255, 51, 51, 0.2); color: var(--danger); border-bottom: 1px solid var(--danger); animation: alertBlink 1s infinite; }

    .asset-header-bar { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); padding: 15px 25px; border-radius: 8px; border: 1px solid var(--border-color); border-left: 3px solid var(--accent); flex-shrink: 0; margin: 10px 12px 0; flex-wrap: wrap; gap: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.01); }
    .asset-title-group { display: flex; flex-direction: column; }
    .asset-tag { font-family: 'JetBrains Mono'; font-size: 9px; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }
    .asset-id { font-family: 'JetBrains Mono'; font-weight: 800; font-size: 22px; color: var(--text-main); margin: 2px 0; }
    .asset-meta { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
    
    .status-container { display: flex; gap: 12px; margin-top: 8px; }
    .status-badge { display: flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 4px; background: rgba(128,128,128,0.1); border: 1px solid var(--border-color); }
    .led { width: 7px; height: 7px; border-radius: 50%; }
    .led-on { background: var(--success); box-shadow: 0 0 10px var(--success); }
    .led-off { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

    .btn-edit-stealth { background: transparent; border: 1px solid rgba(255, 102, 0, 0.3); color: var(--accent); padding: 6px 12px; border-radius: 4px; font-size: 9px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
    .btn-edit-stealth:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

    .btn-delete-stealth { background: transparent; border: 1px solid rgba(255, 51, 51, 0.3); color: var(--danger); padding: 6px 12px; border-radius: 4px; font-size: 9px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
    .btn-delete-stealth:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

    /* ESTILOS DO RELATÓRIO PDF */
    .btn-report-stealth { background: rgba(0, 210, 255, 0.05); border: 1px solid rgba(0, 210, 255, 0.3); color: #00d2ff; padding: 6px 12px; border-radius: 4px; font-size: 9px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
    .btn-report-stealth:hover { background: #00d2ff; color: #000; border-color: #00d2ff; }
    .light-theme .btn-report-stealth { color: var(--info); border-color: var(--info-border); background: var(--info-bg); }
    .light-theme .btn-report-stealth:hover { background: var(--info); color: #fff; }

    .pdf-modal-card { width: 900px; max-width: 95vw; background: #eaedf0; border-radius: 12px; padding: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.8); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; gap: 15px;}
    .pdf-document { background: #ffffff; color: #1a1a1a; padding: 40px; font-family: 'Inter', sans-serif; width: 100%; max-width: 800px; margin: 0 auto; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
    .pdf-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #ff6600; padding-bottom: 20px; margin-bottom: 20px; }
    .pdf-logo { width: 45px; height: 45px; background: #ff6600; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #000; font-weight: 900; font-size: 24px; }
    .pdf-title-box { text-align: right; }
    .pdf-title { font-size: 22px; font-weight: 900; letter-spacing: 2px; margin: 0; color: #111; }
    .pdf-subtitle { font-size: 10px; color: #666; font-family: 'JetBrains Mono'; text-transform: uppercase; letter-spacing: 1px; }
    .pdf-section-title { font-size: 11px; font-weight: 900; color: white; text-transform: uppercase; letter-spacing: 2px; margin: 18px 0 8px 0; background: linear-gradient(90deg, #ff6600 0%, #ff8800 60%, #ffa330 100%); border-radius: 6px; padding: 8px 14px; box-shadow: 0 2px 8px rgba(255,102,0,0.18); }
    .pdf-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
    .pdf-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
    .pdf-kpi-box { background: #ffffff; border: 1px solid #e3e8ee; border-radius: 7px; padding: 12px 10px 10px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.03); position: relative; overflow: hidden; min-height: 78px; display:flex; flex-direction:column; justify-content:center; }
    .pdf-kpi-box::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg, #ff6600, #ff8800); opacity: .85; border-radius: 7px 7px 0 0; }
    .pdf-kpi-val { font-size: 22px; font-weight: 900; color: #111; font-family: 'JetBrains Mono'; line-height: 1.1; margin-top: 2px; }
    .pdf-kpi-lbl { font-size: 8.5px; color: #666; text-transform: uppercase; font-weight: 800; letter-spacing: 1.2px; margin-top: 5px; }
    .pdf-ai-box { background: linear-gradient(180deg, #fff7f0 0%, #fff 100%); border-left: 4px solid #ff6600; padding: 16px 22px; font-size: 12px; color: #2a2a2a; line-height: 1.65; border-radius: 0 8px 8px 0; font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
    .pdf-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 10px; font-family: 'JetBrains Mono'; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border-radius: 6px; overflow: hidden; }
    .pdf-table th { background: linear-gradient(180deg, #1a1a1a, #0a0a0a); color: #fff; text-align: left; padding: 11px 12px; font-weight: 800; letter-spacing: 0.8px; font-size: 9.5px; }
    .pdf-table td { border-bottom: 1px solid #eef1f4; padding: 11px 12px; color: #333; vertical-align: top; }
    .pdf-table tr:nth-child(even) td { background: #fafbfc; }
    .pdf-table tr:last-child td { border-bottom: none; }

    .map-container { width: calc(100% - 24px); height: 360px; margin: 0 12px; border-radius: 10px; border: 1px solid var(--border-color); overflow: hidden; background: #000; flex-shrink: 0; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

    /* =========================================================
       ANIMAÇÕES DA TELA INICIAL VAZIA (HERO)
       ========================================================= */
    @keyframes heroGridFade { 0% { opacity: 0; } 100% { opacity: 1; } }
    @keyframes titleEntrance { 0% { opacity: 0; transform: translateY(-40px); letter-spacing: 5px; } 100% { opacity: 1; transform: translateY(0); letter-spacing: 25px; } }
    @keyframes subtitleEntrance { 0% { opacity: 0; transform: scale(0.9); letter-spacing: 0px; } 100% { opacity: 1; transform: scale(1); letter-spacing: 2px; } }
    @keyframes cardPop { 0% { opacity: 0; transform: translateY(40px) scale(0.9); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
    @keyframes kpiPulse { 0% { text-shadow: 0 0 5px transparent; } 50% { text-shadow: 0 0 25px currentColor; } 100% { text-shadow: 0 0 5px transparent; } }

    .nexus-empty-bg {
        position: absolute; top: 0; left: 0; right: 0; bottom: 0;
        background-image: linear-gradient(rgba(255, 102, 0, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 102, 0, 0.05) 1px, transparent 1px);
        background-size: 50px 50px; background-position: center center; z-index: 0; opacity: 0;
        animation: heroGridFade 2s forwards; pointer-events: none;
    }
    .light-theme .nexus-empty-bg { background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px); }

    /* ESTILIZAÇÃO PREMIUM DO TÍTULO ATHENA (HERO) */
    .nexus-hero-title { 
        font-family: 'Inter', sans-serif;
        font-weight: 900; 
        font-size: 75px; 
        margin: 0; 
        background: linear-gradient(to right, #ffffff, #ff6600);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 0 30px rgba(255, 102, 0, 0.2);
        animation: titleEntrance 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; 
        position: relative; z-index: 1; 
    }
    .light-theme .nexus-hero-title {
        background: linear-gradient(to right, #111111, #ff6600);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 0 30px rgba(255, 102, 0, 0.1);
    }
    .nexus-hero-subtitle { animation: subtitleEntrance 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; position: relative; z-index: 1; font-family:'JetBrains Mono'; font-size: 12px; color: var(--accent); }

    .global-dashboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; padding: 20px; position: relative; z-index: 1; width: 100%; max-width: 900px;}
    .global-kpi-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 35px 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-bottom: 3px solid var(--accent); opacity: 0; animation: cardPop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
    
    .card-1 { animation-delay: 0.1s; } .card-2 { animation-delay: 0.3s; } .card-3 { animation-delay: 0.5s; }

    .global-kpi-value { font-family: 'JetBrains Mono'; font-size: 55px; font-weight: 800; color: var(--text-main); margin: 10px 0; animation: kpiPulse 3s infinite ease-in-out; }
    .global-kpi-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; text-align: center; }

    /* MODAL BASE */
    .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 100000; }
    .modal-card { width: 500px; max-height: 90vh; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border-color); border-top: 4px solid var(--accent); border-radius: 12px; padding: 40px; box-shadow: 0 30px 60px rgba(0,0,0,0.6); }
    
    /* MODAL DE USUÁRIOS */
    .modal-card-users { width: 900px; max-width: 95vw; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
    .modal-users-form { border-right: 1px solid var(--border-color); padding-right: 40px; }
    .modal-users-list-container { display: flex; flex-direction: column; height: 100%; }
    
    .modal-header-nexus { margin-bottom: 25px; }
    .modal-title-nexus { font-family: 'JetBrains Mono'; font-size: 18px; font-weight: 800; color: var(--text-main); letter-spacing: 1px; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
    .modal-subtitle-nexus { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; margin-top: 8px; font-weight: 700; border-left: 2px solid var(--accent); padding-left: 10px; }
    
    .nexus-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
    .nexus-input-group { margin-bottom: 15px; }
    .nexus-label { font-size: 9px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; display: block; }
    .nexus-input { width: 100%; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 6px; padding: 12px; color: var(--text-main); font-family: 'JetBrains Mono'; font-size: 12px; transition: 0.3s; outline: none; }
    .nexus-input:focus { border-color: var(--accent); }
    .nexus-input:disabled { opacity: 0.5; cursor: not-allowed; }
    
    .nexus-checkbox-group { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
    .nexus-checkbox { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; }
    
    .nexus-footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 25px; }
    .btn-nexus-save { background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 15px; font-weight: 900; font-size: 11px; text-transform: uppercase; cursor: pointer; transition: 0.3s; letter-spacing: 1px; }
    .btn-nexus-save:hover { filter: brightness(1.1); transform: translateY(-2px); }
    .btn-nexus-cancel { background: transparent; color: var(--text-muted); border: 1px solid var(--border-color); border-radius: 6px; padding: 15px; font-weight: 700; font-size: 11px; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
    .btn-nexus-cancel:hover { color: var(--text-main); background: rgba(128,128,128,0.1); }

    .user-list-box { max-height: 400px; overflow-y: auto; padding-right: 10px; scrollbar-width: thin; }
    .user-item-row { background: var(--bg-workspace); border: 1px solid var(--border-color); padding: 15px; border-radius: 6px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
    .user-item-name { font-size: 13px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .user-item-role { font-size: 8px; background: var(--info-bg); color: var(--info); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--info-border); }
    .user-item-email { font-size: 10px; color: var(--text-muted); font-family: 'JetBrains Mono'; }
    .btn-delete-user { background: rgba(255,51,51,0.05); color: var(--danger); border: 1px solid rgba(255,51,51,0.2); padding: 8px 12px; border-radius: 4px; font-size: 10px; font-weight: 700; cursor: pointer; transition: 0.3s; }
    .btn-delete-user:hover { background: var(--danger); color: #fff; }

    /* =========================================================
       RESPONSIVIDADE MOBILE TÁTICA E DEFINITIVA
       ========================================================= */
    @media (max-width: 900px) {
        .nexus-system-root { display: block; overflow-y: auto; }
        
        .mobile-header {
            display: flex; justify-content: space-between; align-items: center;
            background: var(--bg-sidebar); border-bottom: 1px solid var(--border-color);
            padding: 10px 20px; position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
            height: 60px; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        }
        .mobile-logo-group { display: flex; align-items: center; gap: 10px; }
        .mobile-logo-icon { width: 34px; height: 34px; display: flex; justify-content: center; align-items: center; border-radius: 8px; }
        .mobile-logo-icon img { width: 34px; height: 34px; object-fit: contain; display:block; }
        .mobile-logo-text { font-family: 'JetBrains Mono'; font-weight: 800; font-size: 16px; color: var(--text-main); letter-spacing: 2px;}
        .mobile-menu-btn { background: transparent; border: none; color: var(--text-main); font-size: 26px; cursor: pointer; padding: 5px; outline: none; }

        .side-panel {
            position: fixed; top: 0; left: -100%; height: 100vh; width: 280px;
            z-index: 10000; transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); border-right: 1px solid var(--border-color);
        }
        .side-panel.open { left: 0; box-shadow: 5px 0 30px rgba(0,0,0,0.8); }
        .brand-header { display: none; } /* Oculta a logo gigante no menu lateral do celular */
        .search-container { padding-top: 30px; } /* Dá um respiro extra já que tiramos o header do menu */

        .mobile-overlay-menu { display: none; }
        .mobile-overlay-menu.open {
            display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.7); z-index: 9999; backdrop-filter: blur(3px);
        }

        .main-workspace {
            padding: 85px 15px 25px 15px; /* Espaço pro header + status bar */
            display: flex; flex-direction: column; min-height: 100vh; overflow-y: visible;
        }
        .mqtt-status-bar { top: 60px; position: fixed; z-index: 90; }

        .global-dashboard { grid-template-columns: 1fr; margin-top: 20px; padding: 0; }
        .nexus-hero-title { font-size: 38px !important; letter-spacing: 10px !important; }
        
        .modal-card { width: 95%; padding: 20px; }
        .modal-card-users { grid-template-columns: 1fr; padding: 20px; max-height: 95vh; }
        .modal-users-form { border-right: none; padding-right: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 20px; }
        .asset-header-bar { flex-direction: column; align-items: flex-start; }
    }


    /* Configurações: limpa a tela principal e centraliza funções administrativas */
    .sys-config-btn { border-color: rgba(255,102,0,0.35) !important; color: var(--accent) !important; background: rgba(255,102,0,0.08) !important; }
    .sys-compare-btn { border-color: rgba(0,210,255,0.35) !important; color: #00d2ff !important; background: rgba(0,210,255,0.08) !important; }
    .sys-compare-btn:hover { background: rgba(0,210,255,0.18) !important; box-shadow: 0 0 16px rgba(0,210,255,0.16) !important; }
    .sys-map-btn { border-color: rgba(46,204,113,0.35) !important; color: #2ecc71 !important; background: rgba(46,204,113,0.08) !important; }
    .sys-map-btn:hover { background: rgba(46,204,113,0.18) !important; box-shadow: 0 0 16px rgba(46,204,113,0.16) !important; }
    .sys-back-btn { border-color: rgba(255,255,255,0.20) !important; color: rgba(255,255,255,0.85) !important; background: rgba(255,255,255,0.04) !important; }
    .sys-back-btn:hover { background: rgba(255,255,255,0.10) !important; }

    /* ── MAPA DE FROTA AO VIVO ───────────────────────────────────────── */
    /* z-index 100001 (acima de .nexus-system-root=9999 e dos modais=100000) */
    .mapa-frota-overlay {
        position: fixed !important;
        top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
        width: 100vw !important; height: 100vh !important;
        z-index: 100001 !important;
        background: #0a0a0f !important;
        display: flex !important; flex-direction: column !important;
        animation: mapaFrotaFadeIn .25s ease-out;
    }
    @keyframes mapaFrotaFadeIn { from { opacity: 0; } to { opacity: 1; } }
    .mapa-frota-header {
        flex: 0 0 auto;
        display: flex; align-items: center; justify-content: space-between;
        padding: 14px 22px;
        background: linear-gradient(180deg, rgba(20,20,26,0.96), rgba(12,12,18,0.96));
        border-bottom: 1px solid rgba(255,255,255,0.07);
        box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    }
    .mapa-frota-title {
        display: flex; align-items: center; gap: 12px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 13px; font-weight: 800; letter-spacing: 2px;
        color: #fff; text-transform: uppercase;
    }
    .mapa-frota-dot {
        color: #2ecc71;
        animation: mapaFrotaPulse 1.6s ease-in-out infinite;
    }
    @keyframes mapaFrotaPulse {
        0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(46,204,113,.65); }
        50%      { opacity: .45; text-shadow: 0 0 4px rgba(46,204,113,.25); }
    }
    .mapa-frota-sub {
        font-size: 10px; font-weight: 600; letter-spacing: 1.4px;
        color: rgba(255,255,255,.45); margin-left: 8px;
    }
    .mapa-frota-close {
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.14);
        color: rgba(255,255,255,0.85);
        width: 36px; height: 36px; border-radius: 8px;
        cursor: pointer; font-size: 16px;
        transition: background .2s, border-color .2s;
        margin-left: 12px;
    }

    /* Seletor de tipo de mapa — pill no header do overlay.
       3 modos: Ruas / Satélite / Híbrido. Padrão = Satélite. */
    .athena-map-mode-selector {
        display: inline-flex; gap: 4px; padding: 4px;
        background: rgba(15, 18, 26, 0.85);
        backdrop-filter: blur(10px) saturate(160%);
        -webkit-backdrop-filter: blur(10px) saturate(160%);
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 999px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
        margin-left: auto;
    }
    /* ── ATHENA Topbar 2026 — substitui o ticker matrix legacy ──
       Layout: brand (esquerda) + chips (centro/direita).
       Glassmorphism dark + gradient accent laranja na borda inferior. */
    .athena-topbar {
        position: relative;
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 10px 22px;
        background: linear-gradient(180deg, rgba(15, 18, 26, 0.94) 0%, rgba(10, 12, 18, 0.88) 100%);
        backdrop-filter: blur(18px) saturate(160%);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        z-index: 100;
    }
    .athena-topbar::after {
        content: '';
        position: absolute;
        left: 0; right: 0; bottom: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, rgba(255, 104, 31, 0.55) 35%, rgba(255, 104, 31, 0.85) 50%, rgba(255, 104, 31, 0.55) 65%, transparent 100%);
        opacity: .8;
    }
    .atb-brand {
        display: flex; align-items: center; gap: 12px;
        flex: 0 0 auto;
    }
    .atb-mark {
        width: 36px; height: 36px;
        display: inline-flex; align-items: center; justify-content: center;
        background: linear-gradient(135deg, #ff681f, #ff8c4d);
        color: #fff;
        border-radius: 10px;
        font-family: var(--font-display, system-ui), system-ui, sans-serif;
        font-weight: 900;
        font-size: 16px;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 14px rgba(255, 104, 31, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    .atb-titles { display: flex; flex-direction: column; line-height: 1.1; }
    .atb-title {
        font-family: var(--font-display, system-ui), system-ui, sans-serif;
        font-weight: 900;
        font-size: 16px;
        letter-spacing: 0.04em;
        color: #fff;
    }
    .atb-sub {
        font-family: var(--font-mono, 'JetBrains Mono', monospace);
        font-size: 9.5px;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.45);
    }
    .atb-sub em { font-style: normal; color: rgba(255, 104, 31, 0.85); }

    .atb-chips {
        display: flex; align-items: center; gap: 8px;
        margin-left: auto;
        flex-wrap: wrap;
    }
    .atb-chip {
        display: inline-flex; align-items: center; gap: 8px;
        padding: 6px 12px;
        font-family: var(--font-display, system-ui), system-ui, sans-serif;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.78);
        transition: background 0.2s, border-color 0.2s, color 0.2s;
    }
    .atb-chip:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
    .atb-dot {
        width: 8px; height: 8px; border-radius: 50%;
        background: currentColor;
        box-shadow: 0 0 8px currentColor;
        flex: 0 0 auto;
    }
    .atb-chip-ok {
        color: #4ade80;
        background: rgba(34, 197, 94, 0.10);
        border-color: rgba(34, 197, 94, 0.30);
    }
    .atb-chip-ok .atb-dot { animation: atb-pulse 2.2s ease-in-out infinite; }
    .atb-chip-warn {
        color: #fbbf24;
        background: rgba(245, 158, 11, 0.10);
        border-color: rgba(245, 158, 11, 0.32);
    }
    .atb-chip-warn .atb-dot { animation: atb-pulse 1.1s ease-in-out infinite; }
    .atb-chip-info {
        color: #93c5fd;
        background: rgba(59, 130, 246, 0.10);
        border-color: rgba(59, 130, 246, 0.28);
    }
    .atb-chip-neutral {
        color: rgba(255, 255, 255, 0.55);
        background: rgba(255, 255, 255, 0.04);
    }
    @@keyframes atb-pulse {
        0%, 100% { box-shadow: 0 0 6px currentColor; opacity: 0.95; }
        50%      { box-shadow: 0 0 14px currentColor; opacity: 1; }
    }

    /* Variante SLIM — quando sidebar já tem o brand. Sem brand no topbar,
       só uma barra fina com chips à direita. Altura reduzida pra ~36px.
       Evita ocupar espaço vertical sem motivo. */
    .athena-topbar--slim {
        padding: 6px 18px;
        gap: 8px;
        justify-content: flex-end;
    }
    .athena-topbar--slim .atb-chips { margin-left: 0; }
    .athena-topbar--slim::after { opacity: .55; } /* gradiente inferior mais discreto */

    /* Mobile: chips compactos, brand reduzido */
    @@media (max-width: 720px) {
        .athena-topbar { padding: 8px 14px; gap: 10px; }
        .athena-topbar--slim { padding: 6px 12px; }
        .atb-mark { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; }
        .atb-title { font-size: 14px; }
        .atb-sub { font-size: 8.5px; letter-spacing: 0.14em; }
        .atb-chip { padding: 4px 9px; font-size: 10px; }
        .atb-chips { gap: 6px; }
    }
    @@media (max-width: 480px) {
        /* Em telas muito pequenas: esconde o chip "BMB Mode Center" pra não quebrar linha */
        .atb-chip-info { display: none; }
        .atb-sub { display: none; }
    }

    /* Esconde o ticker matrix antigo se algum CSS legado ainda renderizar.
       Defesa contra resíduos cacheados. */
    .mqtt-status-bar { display: none !important; }

    /* Variante FLUTUANTE — usada sobre o mapa do dashboard (#tactical-map).
       Posicionada absoluta no canto superior direito. z-index alto pra ficar
       acima dos tiles Leaflet (default z-index 200-400). */
    .athena-map-mode-selector--floating {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 1000;
        margin-left: 0;
    }
    /* Garante âncora pro filho absoluto. */
    .map-container { position: relative; }
    .amms-btn {
        display: inline-flex; align-items: center; gap: 5px;
        padding: 6px 12px;
        font-family: var(--font-display, system-ui), system-ui, sans-serif;
        font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
        color: rgba(255, 255, 255, 0.7);
        background: transparent; border: none; border-radius: 999px;
        cursor: pointer;
        transition: background 0.18s, color 0.18s, box-shadow 0.18s;
        white-space: nowrap;
    }
    .amms-btn:hover {
        background: rgba(255, 255, 255, 0.06); color: #fff;
    }
    .amms-btn.amms-btn-active {
        background: linear-gradient(135deg, #ff681f, #ff8c4d);
        color: #fff;
        box-shadow: 0 2px 8px rgba(255, 104, 31, 0.4);
    }
    @@media (max-width: 768px) {
        .athena-map-mode-selector { padding: 3px; gap: 3px; }
        .amms-btn { padding: 5px 9px; font-size: 10px; }
    }
    @@media (max-width: 480px) {
        /* Em telas muito pequenas: esconde label, mostra só emoji */
        .amms-btn { font-size: 0; padding: 6px 8px; }
        .amms-btn::first-letter { font-size: 14px; }
    }
    .mapa-frota-close:hover {
        background: rgba(255,90,90,0.18);
        border-color: rgba(255,90,90,0.45);
        color: #ff8888;
    }
    .mapa-frota-canvas { flex: 1 1 auto; width: 100% !important; min-height: 0; background: #f1f3f6; }

    /* Marker base + container do radar */
    .mapa-frota-icon {
        background: transparent !important;
        border: none !important;
        position: relative;
    }
    .mapa-frota-icon svg {
        position: relative; z-index: 3;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
        cursor: pointer;
        transition: transform .15s ease-out;
    }
    .mapa-frota-icon:hover svg { transform: scale(1.12); }

    /* Aneis RADAR — so aparecem quando o marker tem .has-falha */
    .mapa-frota-radar,
    .mapa-frota-radar-2 {
        position: absolute;
        top: 50%; left: 50%;
        width: 36px; height: 36px;
        margin: -18px 0 0 -18px;
        border-radius: 50%;
        border: 2px solid #e63946;
        background: rgba(230,57,70,.18);
        opacity: 0;
        pointer-events: none;
        z-index: 1;
        animation: mapaFrotaRadar 1.7s cubic-bezier(.16,1,.3,1) infinite;
    }
    .mapa-frota-radar-2 { animation-delay: .85s; }
    @keyframes mapaFrotaRadar {
        0%   { transform: scale(0.55); opacity: 0.85; }
        80%  { transform: scale(2.6);  opacity: 0;    }
        100% { transform: scale(2.6);  opacity: 0;    }
    }

    /* Tooltip rica: Nome + Velocidade + Cliente (+ aviso de falha se houver) */
    .mapa-frota-tooltip {
        background: rgba(12,14,20,.97) !important;
        border: 1px solid rgba(255,102,0,.55) !important;
        color: #fff !important;
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        letter-spacing: .4px;
        padding: 8px 12px !important;
        border-radius: 8px !important;
        box-shadow: 0 8px 24px rgba(0,0,0,.55) !important;
        line-height: 1.55 !important;
        min-width: 180px !important;
    }
    .mapa-frota-tooltip::before {
        border-top-color: rgba(255,102,0,.55) !important;
    }
    .mapa-frota-tooltip .mff-nome {
        font-size: 12.5px;
        font-weight: 800;
        color: #ffb567;
        text-transform: uppercase;
        letter-spacing: .8px;
    }
    .mapa-frota-tooltip .mff-meta {
        color: rgba(255,255,255,.62);
        font-size: 10px;
        letter-spacing: .6px;
        text-transform: uppercase;
    }
    .mapa-frota-tooltip .mff-meta b {
        color: #fff;
        font-weight: 800;
        letter-spacing: .3px;
    }
    .mapa-frota-tooltip .mff-falha {
        display: inline-block;
        background: rgba(230,57,70,.18);
        color: #ff6b78;
        border: 1px solid rgba(230,57,70,.55);
        padding: 2px 7px;
        border-radius: 4px;
        font-size: 9.5px;
        letter-spacing: 1px;
        font-weight: 800;
        animation: mapaFrotaFalhaBlink 1.1s ease-in-out infinite;
    }
    @keyframes mapaFrotaFalhaBlink {
        0%, 100% { opacity: 1; }
        50%      { opacity: .45; }
    }

    /* Override Leaflet attribution control (caso volte a aparecer) */
    .mapa-frota-canvas .leaflet-control-attribution { font-size: 9px !important; opacity: .7; }
    /* ─────── MODAL DE CONFIGURAÇÕES — DESIGN VERTICAL "LISTA" ─────── */
    .cfg-modal {
        padding: 26px 26px 22px 26px !important;
    }
    .cfg-header {
        text-align: left;
        margin-bottom: 22px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .cfg-eyebrow {
        font-family: 'JetBrains Mono', monospace;
        font-size: 9.5px;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: rgba(255,255,255,0.42);
        margin-top: 6px;
    }
    .cfg-title {
        font-family: 'Inter', sans-serif;
        font-size: 24px;
        font-weight: 900;
        letter-spacing: -0.01em;
        color: var(--text-main, #f7f7f4);
        line-height: 1;
    }
    .cfg-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .cfg-row {
        display: grid;
        grid-template-columns: 42px 1fr 18px;
        gap: 14px;
        align-items: center;
        padding: 13px 14px;
        background: rgba(255,255,255,0.025);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 12px;
        cursor: pointer;
        transition: transform .22s cubic-bezier(.16,1,.3,1),
                    border-color .22s ease,
                    background .22s ease,
                    box-shadow .22s ease;
        width: 100%;
        text-align: left;
        color: var(--text-main, #f7f7f4);
        font-family: inherit;
    }
    .cfg-row:hover {
        transform: translateX(3px);
        border-color: rgba(255,104,31,0.45);
        background: linear-gradient(90deg, rgba(255,104,31,0.08), rgba(255,255,255,0.015) 60%);
        box-shadow: 0 6px 16px -6px rgba(255,102,0,0.22);
    }
    .cfg-row-glyph {
        width: 42px; height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 800;
        font-family: 'JetBrains Mono', monospace;
        color: var(--accent, #ff681f);
        background: rgba(255,104,31,0.08);
        border: 1px solid rgba(255,104,31,0.22);
        border-radius: 10px;
        line-height: 1;
        transition: background .22s ease, border-color .22s ease, transform .22s ease;
    }
    .cfg-row:hover .cfg-row-glyph {
        background: rgba(255,104,31,0.18);
        border-color: rgba(255,104,31,0.5);
        transform: scale(1.04);
    }
    .cfg-row-body {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }
    .cfg-row-title {
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.01em;
        color: var(--text-main, #f7f7f4);
        line-height: 1.2;
    }
    .cfg-row-sub {
        font-size: 11px;
        color: rgba(255,255,255,0.45);
        line-height: 1.4;
    }
    .cfg-row-arrow {
        font-size: 22px;
        font-weight: 300;
        color: rgba(255,255,255,0.25);
        line-height: 1;
        text-align: center;
        transition: color .22s ease, transform .22s ease;
    }
    .cfg-row:hover .cfg-row-arrow {
        color: var(--accent, #ff681f);
        transform: translateX(2px);
    }
    .cfg-close {
        width: 100%;
        margin-top: 18px;
        padding: 12px 16px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.015);
        color: rgba(255,255,255,0.65);
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        cursor: pointer;
        transition: background .22s, color .22s, border-color .22s;
    }
    .cfg-close:hover {
        background: rgba(255,255,255,0.04);
        color: var(--text-main, #f7f7f4);
        border-color: rgba(255,255,255,0.16);
    }
    /* Light theme do modal de configurações */
    .light-theme .cfg-eyebrow { color: rgba(0,0,0,0.45); }
    .light-theme .cfg-title { color: #0d1117; }
    .light-theme .cfg-header { border-bottom-color: rgba(0,0,0,0.08); }
    .light-theme .cfg-row { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); color: #0d1117; }
    .light-theme .cfg-row:hover { background: linear-gradient(90deg, rgba(255,104,31,0.07), rgba(0,0,0,0.01) 60%); border-color: rgba(255,104,31,0.35); }
    .light-theme .cfg-row-title { color: #0d1117; }
    .light-theme .cfg-row-sub { color: rgba(0,0,0,0.55); }
    .light-theme .cfg-row-arrow { color: rgba(0,0,0,0.30); }
    .light-theme .cfg-close { color: rgba(0,0,0,0.55); border-color: rgba(0,0,0,0.10); background: rgba(0,0,0,0.02); }
    .light-theme .cfg-close:hover { background: rgba(0,0,0,0.04); color: #0d1117; border-color: rgba(0,0,0,0.20); }

    .config-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
        margin-top: 18px;
    }
    .config-action {
        min-height: 92px;
        border-radius: 14px;
        border: 1px solid var(--border-color);
        background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
        color: var(--text-main);
        cursor: pointer;
        padding: 14px 16px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
        transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
        text-align: left;
        position: relative;
        overflow: hidden;
    }
    .config-action::before {
        content: '';
        position: absolute;
        left: 0; top: 0; bottom: 0;
        width: 3px;
        background: var(--accent);
        opacity: 0;
        transition: opacity .22s ease;
    }
    .config-action:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 104, 31, 0.45);
        box-shadow: 0 12px 28px -8px rgba(255,102,0,0.20), 0 0 0 1px rgba(255,104,31,0.06) inset;
        background: linear-gradient(160deg, rgba(255,104,31,0.07), rgba(255,255,255,0.015));
    }
    .config-action:hover::before { opacity: 1; }
    .config-action b {
        font-size: 12px;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        line-height: 1.2;
    }
    .config-action span {
        font-size: 10.5px;
        color: var(--text-muted);
        line-height: 1.45;
    }
    .vehicle-list-container .vehicle-btn { justify-content: space-between; padding: 13px 14px; border-radius: 10px; }
    .vehicle-list-container .vehicle-btn.active { background: linear-gradient(90deg, rgba(255,102,0,.22), rgba(255,102,0,.06)) !important; box-shadow: inset 3px 0 0 var(--accent), 0 0 18px rgba(255,102,0,.08); }
    .node-item { border-radius: 8px; }
    #tactical-map { isolation: isolate; }
    .gps-only-map-notice { position:absolute; bottom:10px; left:10px; background:rgba(0,0,0,0.82); padding:8px 12px; border-radius:6px; font-size:9px; color:#fff; z-index:2000; border:1px solid rgba(255,255,255,0.18); max-width: 270px; pointer-events:none; }


    /* =========================================================
       SIDEBAR FROTA V73 - HIERARQUIA VISUAL PROFISSIONAL
       ========================================================= */
    .search-container {
        padding: 16px 20px 14px;
        background:
            radial-gradient(circle at 0% 0%, rgba(255,102,0,0.10), transparent 34%),
            var(--bg-card);
    }

    .search-input {
        border-radius: 14px;
        min-height: 44px;
        background: rgba(255,255,255,0.035);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
    }

    .vehicle-list-container {
        padding: 16px 10px 18px;
    }
    .fleet-section-title {
        padding: 0 10px 12px;
        color: var(--text-muted);
        font-size: 9px;
        font-weight: 900;
        letter-spacing: 2px;
        text-transform: uppercase;
        display:flex;
        justify-content:space-between;
        align-items:center;
    }
    .node-item {
        margin: 5px 0;
        border-radius: 14px;
        border: 1px solid transparent;
        min-height: 42px;
        padding: 10px 12px;
        background: rgba(255,255,255,0.015);
    }
    .node-item:hover {
        background: rgba(255,102,0,0.06);
        border-color: rgba(255,102,0,0.13);
    }
    .node-client {
        color: var(--text-main);
        background:
            linear-gradient(90deg, rgba(255,102,0,0.08), rgba(255,255,255,0.015));
        border-color: rgba(255,102,0,0.08);
        font-size: 12px;
    }
    .node-usina {
        padding-left: 22px;
        background: rgba(255,255,255,0.018);
    }
    .node-frente {
        padding-left: 34px;
        background: rgba(255,255,255,0.012);
    }
    .node-main {
        display:flex;
        flex-direction:column;
        min-width:0;
        flex:1;
        gap:3px;
    }
    .node-title {
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
        font-weight:900;
        text-transform:uppercase;
    }
    .node-sub {
        font-size:8px;
        color: var(--text-muted);
        letter-spacing:1px;
        text-transform:uppercase;
        font-weight:800;
    }
    .node-count-pill {
        min-width:52px;
        text-align:center;
        border-radius:999px;
        padding:4px 7px;
        font-family:'JetBrains Mono';
        font-size:9px;
        font-weight:900;
        color: var(--text-muted);
        border:1px solid rgba(255,255,255,0.08);
        background:rgba(0,0,0,0.24);
    }
    .node-count-pill.ok {
        color: var(--success);
        border-color: rgba(0,255,102,0.18);
        background:rgba(0,255,102,0.04);
    }
    .node-count-pill.fault {
        color: var(--danger);
        border-color: rgba(255,51,51,0.24);
        background:rgba(255,51,51,0.06);
    }
    .vehicle-btn {
        margin: 7px 0 7px 48px;
        width: calc(100% - 52px);
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,0.06);
        background:
            linear-gradient(90deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
        padding: 11px 12px;
        min-height: 50px;
    }

    .vehicle-btn:hover {
        background: rgba(255,102,0,0.07);
        border-color: rgba(255,102,0,0.16);
        transform: translateX(2px);
    }

    .vehicle-btn.active {
        border: 1px solid rgba(255,102,0,0.55);
        border-left: 4px solid var(--accent);
        border-right: 1px solid rgba(255,102,0,0.55);
        background:
            radial-gradient(circle at 100% 50%, rgba(255,102,0,0.22), transparent 38%),
            rgba(255,102,0,0.11);
        box-shadow: 0 0 22px rgba(255,102,0,0.12);
    }

    .vehicle-info {
        display:flex;
        flex-direction:column;
        align-items:flex-start;
        min-width:0;
        gap:4px;
    }

    .vehicle-name {
        font-weight:950;
        color:inherit;
        letter-spacing:.7px;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
        max-width:180px;
    }

    .vehicle-mini {
        display:flex;
        gap:8px;
        font-size:8px;
        color: var(--text-muted);
        text-transform:uppercase;
        letter-spacing:.7px;
        font-weight:800;
    }

    .vehicle-status-pack {
        display:flex;
        align-items:center;
        gap:7px;
    }

    .vehicle-status-text {
        font-size:8px;
        font-weight:900;
        color:var(--text-muted);
        letter-spacing:.8px;
        text-transform:uppercase;
    }

    .chevron {
        transition:.2s ease;
        color: var(--text-muted);
    }

    .chevron.open {
        transform: rotate(90deg);
        color: var(--accent);
    }


    /* =========================================================
       V74 - SIDEBAR OPERACIONAL REFINADA
       ========================================================= */
    .fleet-summary-v74 { margin: 0 10px 14px; padding: 13px; border-radius: 16px; border: 1px solid rgba(255,102,0,.16); background: radial-gradient(circle at 0 0, rgba(255,102,0,.18), transparent 35%), linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
    .fleet-summary-top-v74 { display:flex; align-items:center; justify-content:space-between; margin-bottom:11px; }
    .fleet-summary-title-v74 { color:#fff; font-family:'JetBrains Mono', monospace; font-size:10px; font-weight:950; letter-spacing:1.8px; text-transform:uppercase; }
    .fleet-summary-total-v74 { color:var(--accent); font-family:'JetBrains Mono', monospace; font-size:10px; font-weight:950; padding:4px 8px; border-radius:999px; border:1px solid rgba(255,102,0,.22); background:rgba(255,102,0,.06); }
    .fleet-summary-grid-v74 { display:grid; grid-template-columns: repeat(3, 1fr); gap:8px; }
    .fleet-summary-kpi-v74 { border-radius:12px; padding:9px 7px; border:1px solid rgba(255,255,255,.07); background:rgba(0,0,0,.24); text-align:center; }
    .fleet-summary-kpi-v74 strong { display:block; font-family:'JetBrains Mono', monospace; color:#fff; font-size:16px; line-height:1; font-weight:950; }
    .fleet-summary-kpi-v74 span { display:block; margin-top:5px; color:#777; font-size:7px; font-weight:950; letter-spacing:.8px; text-transform:uppercase; }
    .fleet-summary-kpi-v74.online strong { color:var(--success); }
    .fleet-summary-kpi-v74.fault strong { color:var(--danger); }
    /* nowrap evita quebrar "HIERARQUIA OPERACIONAL" em 2 linhas quando a sidebar
       encolhe ao selecionar um caminhão (painel lateral cresce, sidebar perde
       largura). letter-spacing/font-size escalam via clamp pra caber sempre. */
    .fleet-section-title.v74 { margin: 0 10px 8px; padding:0; color:#777; font-size:clamp(7px, 0.62vw, 8px); font-weight:950; letter-spacing:clamp(0.6px, 0.14vw, 1.8px); text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .node-item { position:relative; overflow:hidden; min-height:46px; border-radius:15px; border:1px solid rgba(255,255,255,.055); background:linear-gradient(90deg, rgba(255,255,255,.028), rgba(255,255,255,.012)); }
    .node-item:before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:transparent; transition:.2s ease; }
    .node-item:hover:before { background:var(--accent); }
    .node-client { border-color:rgba(255,102,0,.14); background:linear-gradient(90deg, rgba(255,102,0,.105), rgba(255,255,255,.018)); }
    .node-usina { margin-left:10px; width:calc(100% - 10px); padding-left:14px; }
    .node-frente { margin-left:22px; width:calc(100% - 22px); padding-left:14px; }
    .node-title { font-size:11px; letter-spacing:.9px; }
    .node-sub { font-size:7px; opacity:.9; }
    .node-count-pill { min-width:46px; padding:5px 7px; border-radius:10px; font-size:8px; }
    .vehicle-btn { margin:7px 0 7px 34px; width:calc(100% - 38px); border-radius:17px; min-height:58px; padding:12px 12px 12px 14px; background: radial-gradient(circle at 100% 50%, rgba(255,255,255,.035), transparent 40%), linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.014)); }
    .vehicle-btn.active { transform:translateX(2px); border-color:rgba(255,102,0,.52); box-shadow:0 0 24px rgba(255,102,0,.16), inset 0 1px 0 rgba(255,255,255,.04); background: radial-gradient(circle at 100% 50%, rgba(255,102,0,.28), transparent 44%), linear-gradient(90deg, rgba(255,102,0,.16), rgba(255,255,255,.02)); }
    .vehicle-name { font-size:12px; letter-spacing:.8px; }
    .vehicle-mini span { padding:3px 6px; border-radius:999px; border:1px solid rgba(255,255,255,.06); background:rgba(0,0,0,.20); }
    .vehicle-status-text { letter-spacing:1px; }
    .system-actions { padding:18px 20px 20px; gap:10px; background:linear-gradient(180deg, rgba(255,255,255,.01), rgba(0,0,0,.22)); }
    .sys-config-btn { min-height:42px; border-radius:14px !important; border-color:rgba(255,102,0,.32) !important; color:var(--accent) !important; background:rgba(255,102,0,.055) !important; letter-spacing:.8px; }
    .sys-btn:not(.sys-config-btn) { border-radius:14px; min-height:42px; }


    /* =========================================================
       V78 - MOBILE RESPONSIVO SEM ALTERAR O DESIGNER DESKTOP
       ========================================================= */

    html, body { max-width:100%; overflow-x:hidden; }

    .light-theme .side-panel,
    .light-theme .mobile-header,
    .light-theme .modal-card,
    .light-theme .modal-card-users,
    .light-theme .config-action {
        background:#ffffff !important;
        color:#111827 !important;
        border-color:rgba(15,23,42,.12) !important;
    }

    .light-theme .main-workspace {
        background:
            radial-gradient(circle at 20% 0%, rgba(255,102,0,.07), transparent 28%),
            linear-gradient(180deg, #f7f8fb 0%, #eef2f7 100%) !important;
        color:#111827 !important;
    }

    .light-theme .brand-title,
    .light-theme .brand-subtitle,
    .light-theme .node-title,
    .light-theme .vehicle-name,
    .light-theme .asset-id,
    .light-theme .asset-title,
    .light-theme .modal-title-nexus,
    .light-theme .config-action b,
    .light-theme .mobile-logo-text {
        color:#111827 !important;
        text-shadow:none !important;
    }

    .light-theme .node-sub,
    .light-theme .vehicle-mini,
    .light-theme .asset-meta,
    .light-theme .asset-tag,
    .light-theme .modal-subtitle-nexus,
    .light-theme .config-action span,
    .light-theme .fleet-section-title,
    .light-theme small {
        color:#5f6b7a !important;
    }

    .light-theme .node-item,
    .light-theme .vehicle-btn,
    .light-theme .search-input,
    .light-theme .nexus-input {
        background:#ffffff !important;
        color:#111827 !important;
        border-color:rgba(15,23,42,.14) !important;
    }

    .light-theme .vehicle-btn.active {
        background:linear-gradient(135deg, rgba(255,102,0,.13), #ffffff) !important;
        border-color:rgba(255,102,0,.42) !important;
        box-shadow:0 12px 28px rgba(255,102,0,.12) !important;
    }

    .light-theme .mqtt-status-bar {
        background:#ffffff !important;
        color:#111827 !important;
        border:1px solid rgba(15,23,42,.12) !important;
        box-shadow:0 12px 26px rgba(15,23,42,.08) !important;
    }

    .light-theme input,
    .light-theme select,
    .light-theme textarea {
        background:#ffffff !important;
        color:#111827 !important;
        border-color:rgba(15,23,42,.16) !important;
    }

    .light-theme input::placeholder,
    .light-theme textarea::placeholder {
        color:#94a3b8 !important;
    }

    @media (max-width: 1180px) {
        .side-panel { width:300px; flex:0 0 300px; }
        /* FIX 2026-06: era padding:18px (igual desktop antigo 30/40px) — gastava
           ~36px laterais em laptops 1366px. Edge-to-edge mantém só 12px de respiro
           nos cards (já aplicado em .main-workspace > seletor no topo do arquivo). */
        .main-workspace { padding: 0 0 12px !important; }
        .asset-header-bar {
            flex-direction:column !important;
            align-items:flex-start !important;
            gap:14px !important;
        }
        .asset-actions,
        .header-actions {
            display:flex !important;
            flex-wrap:wrap !important;
            gap:8px !important;
            width:100%;
        }
        .asset-actions button,
        .header-actions button {
            flex:1 1 150px;
        }
    }

    @media (max-width: 900px) {
        .nexus-system-root {
            position:fixed;
            display:block;
            overflow-y:auto;
            -webkit-overflow-scrolling:touch;
        }

        .mobile-header {
            height:62px !important;
            padding:10px 14px !important;
        }

        .side-panel {
            width:min(88vw, 340px) !important;
            max-width:340px;
            left:-105%;
            overflow-y:auto;
            padding-bottom:24px;
        }

        .side-panel.open { left:0; }

        .main-workspace {
            padding:88px 14px 28px 14px !important;
            width:100% !important;
            min-height:100vh;
            overflow:visible !important;
        }

        .mqtt-status-bar {
            top:62px !important;
            left:10px !important;
            right:10px !important;
            width:auto !important;
            min-height:34px !important;
            border-radius:12px !important;
            font-size:10px !important;
            line-height:1.25 !important;
            white-space:normal !important;
        }

        .global-dashboard {
            grid-template-columns:1fr !important;
            gap:12px !important;
            padding:0 !important;
        }

        .global-kpi-card {
            min-height:auto !important;
            padding:18px !important;
        }

        .nexus-hero-title {
            font-size:34px !important;
            letter-spacing:7px !important;
        }

        .asset-header-bar {
            padding:18px !important;
            border-radius:18px !important;
        }

        .asset-id {
            font-size:28px !important;
            line-height:1.1 !important;
            word-break:break-word;
        }

        .map-container {
            min-height:320px !important;
            border-radius:18px !important;
        }

        .modal-card,
        .modal-card-users,
        .pdf-modal-card {
            width:calc(100vw - 24px) !important;
            max-width:calc(100vw - 24px) !important;
            max-height:calc(100vh - 24px) !important;
            overflow:auto !important;
            padding:18px !important;
            border-radius:18px !important;
        }

        .modal-card-users {
            grid-template-columns:1fr !important;
        }

        .config-grid {
            grid-template-columns:1fr !important;
        }
    }

    @media (max-width: 520px) {
        .mobile-logo-text {
            font-size:14px !important;
            letter-spacing:1.5px !important;
        }

        .main-workspace {
            padding-left:10px !important;
            padding-right:10px !important;
        }

        .nexus-hero-title {
            font-size:28px !important;
            letter-spacing:5px !important;
        }

        .vehicle-btn,
        .node-usina,
        .node-frente {
            margin-left:0 !important;
            width:100% !important;
        }

        .sys-btn,
        .btn-nexus-save,
        .btn-nexus-cancel,
        .btn-report-stealth,
        .btn-edit-stealth,
        .btn-delete-stealth {
            width:100% !important;
        }
    }

    :root {
        --bg-sidebar:     #09090f;
        --bg-workspace:   #06060e;
        --bg-card:        rgba(255,255,255,0.028);
        --bg-card-2:      rgba(255,255,255,0.048);
        --bg-card-solid:  #0e0e1a;
        --text-main:      #eeeef4;
        --text-muted:     #55607a;
        --border-color:   rgba(255,255,255,0.07);
        --input-bg:       rgba(255,255,255,0.04);
        --accent:         #ff6600;
        --accent-dim:     rgba(255,102,0,0.12);
        --accent-glow:    rgba(255,102,0,0.32);
        --accent-border:  rgba(255,102,0,0.28);
        --danger:         #ff1744;
        --danger-dim:     rgba(255,23,68,0.12);
        --danger-border:  rgba(255,23,68,0.28);
        --success:        #00e676;
        --success-dim:    rgba(0,230,118,0.1);
        --success-border: rgba(0,230,118,0.25);
        --info:           #00b4d8;
        --info-border:    rgba(0,180,216,0.28);
        --info-bg:        rgba(0,180,216,0.08);
    }

    .light-theme {
        --bg-sidebar:     #ffffff;
        --bg-workspace:   #f1f3f8;
        --bg-card:        rgba(255,255,255,0.85);
        --bg-card-solid:  #ffffff;
        --text-main:      #111827;
        --text-muted:     #6b7280;
        --border-color:   rgba(0,0,0,0.08);
        --input-bg:       rgba(0,0,0,0.04);
        --success:        #059669;
        --success-dim:    rgba(5,150,105,0.1);
        --success-border: rgba(5,150,105,0.25);
        --danger:         #dc2626;
        --danger-dim:     rgba(220,38,38,0.1);
        --danger-border:  rgba(220,38,38,0.25);
        --info:           #0284c7;
        --info-border:    rgba(2,132,199,0.3);
        --info-bg:        rgba(2,132,199,0.07);
    }

    /* ── RAIZ ───────────────────────────────────────────── */
    .nexus-system-root {
        background: var(--bg-workspace) !important;
    }

    .nexus-system-root::before {
        content: '';
        position: fixed;
        bottom: -25%; left: -10%;
        width: 55vw; height: 55vw;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255,102,0,0.045) 0%, transparent 68%);
        pointer-events: none;
        z-index: 0;
    }

    @keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

    /* ── SIDEBAR ────────────────────────────────────────── */
    .side-panel {
        background: var(--bg-sidebar) !important;
        border-right: 1px solid var(--border-color) !important;
        width: 295px !important;
        position: relative !important;
    }

    .side-panel::after {
        content: '';
        position: absolute;
        top: 18%; right: -1px;
        width: 1px; height: 38%;
        background: linear-gradient(180deg, transparent, var(--accent-glow), transparent);
        pointer-events: none;
    }

    /* Brand */
    .brand-header {
        padding: 22px 18px 18px !important;
        border-bottom: 1px solid var(--border-color) !important;
        position: relative; overflow: hidden;
    }

    .brand-header::before {
        content: '';
        position: absolute; inset: 0;
        background: radial-gradient(circle at 0% 50%, var(--accent-dim), transparent 60%);
        opacity: 0; transition: opacity 0.3s ease;
    }

    .brand-header:hover::before { opacity: 1; }

    .brand-logo {
        background: linear-gradient(135deg, rgba(255,102,0,0.2), rgba(255,102,0,0.05)) !important;
        border: 1px solid var(--accent-border) !important;
        box-shadow: 0 0 22px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.08) !important;
        border-radius: 13px !important;
        width: 44px !important; height: 44px !important;
    }

    .brand-title { font-size: 17px !important; letter-spacing: 5px !important; color: var(--text-main) !important; }
    .brand-subtitle { color: var(--text-muted) !important; letter-spacing: 2px !important; }

    /* Search */
    .search-container {
        padding: 12px 14px !important;
        background: var(--bg-sidebar) !important;
        border-bottom: 1px solid var(--border-color) !important;
    }

    .search-input {
        background: var(--input-bg) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 12px !important;
        min-height: 40px !important;
        color: var(--text-main) !important;
        box-shadow: none !important;
    }

    .search-input:focus {
        border-color: var(--accent-border) !important;
        background: var(--accent-dim) !important;
        box-shadow: 0 0 0 3px rgba(255,102,0,0.08) !important;
    }

    /* Fleet List */
    .vehicle-list-container { padding: 12px 8px 16px !important; }

    /* Hierarchy Nodes */
    .node-item {
        border-radius: 14px !important;
        border: 1px solid transparent !important;
        background: rgba(255,255,255,0.018) !important;
        margin: 4px 0 !important;
        min-height: 46px !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .node-item::before {
        content: '' !important;
        position: absolute !important;
        inset: 0 auto 0 0 !important;
        width: 3px !important;
        background: transparent !important;
        border-radius: 0 3px 3px 0 !important;
        transition: background 0.2s ease !important;
    }

    .node-item:hover { background: rgba(255,102,0,0.07) !important; border-color: var(--accent-border) !important; }
    .node-item:hover::before { background: var(--accent) !important; }

    .node-client {
        background: linear-gradient(90deg, rgba(255,102,0,0.1), rgba(255,255,255,0.015)) !important;
        border-color: rgba(255,102,0,0.12) !important;
    }

    .node-usina { margin-left: 10px !important; width: calc(100% - 10px) !important; }
    .node-frente { margin-left: 22px !important; width: calc(100% - 22px) !important; }

    .node-title { font-family: 'JetBrains Mono', monospace !important; font-size: 10px !important; font-weight: 800 !important; letter-spacing: 0.28em !important; text-transform: uppercase !important; color: rgba(255,255,255,0.80) !important; }
    .node-sub { font-family: 'JetBrains Mono', monospace !important; font-size: 8px !important; letter-spacing: 0.16em !important; text-transform: uppercase !important; color: rgba(255,255,255,0.42) !important; }

    .node-count-pill {
        border-radius: 10px !important; font-size: 8px !important;
        border: 1px solid var(--border-color) !important;
        background: rgba(0,0,0,0.2) !important; color: var(--text-muted) !important;
    }

    .node-count-pill.ok { color: var(--success) !important; border-color: var(--success-border) !important; background: var(--success-dim) !important; }
    .node-count-pill.fault { color: var(--danger) !important; border-color: var(--danger-border) !important; background: var(--danger-dim) !important; }

    /* Vehicle Buttons */
    .vehicle-btn {
        margin: 5px 0 5px 32px !important;
        width: calc(100% - 36px) !important;
        border-radius: 16px !important;
        border: 1px solid var(--border-color) !important;
        background: rgba(255,255,255,0.025) !important;
        min-height: 56px !important;
        padding: 11px 12px 11px 14px !important;
        color: var(--text-muted) !important;
        transition: all 0.22s cubic-bezier(0.16,1,0.3,1) !important;
    }

    .vehicle-btn:hover {
        background: rgba(255,102,0,0.08) !important;
        border-color: var(--accent-border) !important;
        color: var(--text-main) !important;
        transform: translateX(2px) !important;
    }

    .vehicle-btn.active {
        border: 1.5px solid rgba(255,102,0,0.55) !important;
        background: rgba(255,102,0,0.12) !important;
        box-shadow: 0 0 20px rgba(255,102,0,0.16) !important;
        color: var(--accent) !important;
        transform: translateX(2px) !important;
    }

    .vehicle-name { color: inherit !important; }

    .vehicle-mini span {
        padding: 2px 6px !important; border-radius: 999px !important;
        border: 1px solid var(--border-color) !important; background: rgba(0,0,0,0.15) !important;
    }

    /* LEDs */
    .led-on { background: var(--success) !important; box-shadow: 0 0 0 2px var(--success-dim), 0 0 10px var(--success) !important; }
    .led-off { background: var(--danger) !important; box-shadow: 0 0 0 2px var(--danger-dim), 0 0 8px var(--danger) !important; }

    /* System Actions */
    .system-actions {
        padding: 14px 14px 20px !important;
        border-top: 1px solid var(--border-color) !important;
        background: linear-gradient(180deg, transparent, rgba(0,0,0,0.18)) !important;
        gap: 8px !important;
    }

    .sys-btn {
        background: var(--bg-card) !important; border: 1px solid var(--border-color) !important;
        color: var(--text-muted) !important; border-radius: 13px !important;
        min-height: 40px !important; padding: 10px 14px !important;
        font-size: 10px !important; letter-spacing: 0.8px !important; text-align: left !important;
        transition: all 0.22s ease !important;
    }

    .sys-btn:hover { color: var(--text-main) !important; background: var(--bg-card-2) !important; border-color: rgba(255,255,255,0.12) !important; }
    .sys-config-btn { border-color: var(--accent-border) !important; color: var(--accent) !important; background: var(--accent-dim) !important; }
    .sys-config-btn:hover { background: rgba(255,102,0,0.2) !important; box-shadow: 0 0 16px rgba(255,102,0,0.1) !important; }

    /* ── WORKSPACE ──────────────────────────────────────── */
    .main-workspace {
        padding: 0 36px 28px !important;
        background: var(--bg-workspace) !important;
        scrollbar-width: thin;
        scrollbar-color: var(--border-color) transparent;
    }

    .mqtt-status-bar {
        position: fixed !important;
        top: 0 !important;
        left: 320px !important; /* alinha com a borda direita do side-panel (320px no desktop) */
        right: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 9999 !important;
        backdrop-filter: blur(14px) saturate(1.4) !important;
        -webkit-backdrop-filter: blur(14px) saturate(1.4) !important;
        overflow: hidden;
        height: 30px;
        display: flex;
        align-items: center;
        text-align: left !important;
        flex-shrink: 0;
    }
    /* FIX 2026-06: removido `padding-top: 52px` legacy.
       Era pra compensar o ticker MQTT fixo no topo. Esse ticker foi
       substituído por .athena-topbar inline (parte do fluxo normal),
       então não precisa mais reservar espaço vertical extra. */

    .mqtt-bar-track {
        display: flex;
        width: max-content;
        animation: athenaMarquee 38s linear infinite;
        will-change: transform;
    }

    .mqtt-bar-content {
        display: inline-flex;
        align-items: center;
        gap: 14px;
        padding-right: 14px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 3px;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .mqtt-bar-dot {
        font-size: 8px;
        line-height: 1;
        animation: athenaPulseDot 2.2s ease-in-out infinite;
    }

    .mqtt-bar-sep {
        opacity: 0.45;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0;
    }
    .mqtt-status-bar:hover .mqtt-bar-track { animation-play-state: paused; }

    @keyframes athenaMarquee {
        from { transform: translateX(0); }
        to   { transform: translateX(-50%); }
    }
    @keyframes athenaPulseDot {
        0%, 100% { opacity: 0.6; transform: scale(1); }
        50%      { opacity: 1;   transform: scale(1.25); }
    }

    .mqtt-online {
        background: linear-gradient(90deg, rgba(0,230,118,0.05), rgba(0,230,118,0.10), rgba(0,230,118,0.05)) !important;
        color: #00e676 !important;
        border-bottom: 1px solid rgba(0,230,118,0.22) !important;
        text-shadow: 0 0 12px rgba(0,230,118,0.25);
    }
    .mqtt-online .mqtt-bar-sep { color: rgba(0,230,118,0.5); }

    .mqtt-offline {
        background: linear-gradient(90deg, rgba(255,23,68,0.08), rgba(255,23,68,0.18), rgba(255,23,68,0.08)) !important;
        color: #ff5577 !important;
        border-bottom: 1px solid rgba(255,23,68,0.35) !important;
        text-shadow: 0 0 12px rgba(255,23,68,0.30);
    }
    .mqtt-offline .mqtt-bar-sep { color: rgba(255,23,68,0.55); }
    .mqtt-offline .mqtt-bar-dot { animation: athenaPulseDot 0.9s ease-in-out infinite; }

    /* ── HERO ───────────────────────────────────────────── */
    .nexus-hero-title {
        font-size: 82px !important; letter-spacing: 22px !important;
        background: linear-gradient(135deg, var(--text-main) 20%, var(--accent) 100%) !important;
        -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important;
        background-clip: text !important; text-shadow: none !important;
    }
    .light-theme .nexus-hero-title {
        background: linear-gradient(135deg, #111827 20%, var(--accent) 100%) !important;
        -webkit-background-clip: text !important; background-clip: text !important;
    }
    .nexus-hero-subtitle {
        letter-spacing: 5px !important; color: var(--accent) !important;
        font-size: 10px !important; margin-top: 10px !important; font-weight: 700 !important;
    }

    .nexus-empty-bg {
        background-image: linear-gradient(rgba(255,102,0,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,102,0,0.04) 1px, transparent 1px) !important;
        background-size: 48px 48px !important;
    }

    .light-theme .nexus-empty-bg {
        background-image: linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px) !important;
    }

    /* KPI Cards */
    .global-dashboard { gap: 18px !important; margin-top: 50px !important; }

    .global-kpi-card {
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 22px !important;
        padding: 36px 26px !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        transition: transform 0.3s ease, box-shadow 0.3s ease !important;
        position: relative !important; overflow: hidden !important;
    }

    .global-kpi-card::before {
        content: '' !important; position: absolute !important;
        top: 0 !important; left: 0 !important; right: 0 !important; height: 1px !important;
        background: linear-gradient(90deg, transparent, var(--accent-glow), transparent) !important;
    }

    .global-kpi-card:hover {
        transform: translateY(-6px) !important;
        box-shadow: 0 20px 48px rgba(0,0,0,0.35), 0 0 30px rgba(255,102,0,0.1) !important;
    }

    .card-1 { border-bottom: 2px solid var(--accent) !important; }
    .card-2 { border-bottom: 2px solid var(--success) !important; }
    .card-3 { border-bottom: 2px solid var(--danger) !important; }

    .global-kpi-value { font-size: 56px !important; font-weight: 900 !important; line-height: 1 !important; }
    .global-kpi-label { font-size: 9px !important; letter-spacing: 2.5px !important; color: var(--text-muted) !important; }

    /* ── ASSET HEADER ───────────────────────────────────── */
    .asset-header-bar {
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        border-left: 3px solid var(--accent) !important;
        border-radius: 22px !important;
        padding: 22px 28px !important;
        backdrop-filter: blur(24px) !important; -webkit-backdrop-filter: blur(24px) !important;
        margin-top: 0 !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important;
        position: relative !important; overflow: hidden !important;
    }
    .asset-header-bar::before {
        content: '' !important; position: absolute !important;
        top: 0 !important; left: 0 !important; right: 0 !important; height: 1px !important;
        background: linear-gradient(90deg, var(--accent-glow), transparent 55%) !important;
    }

    .asset-header-bar::after {
        content: '' !important; position: absolute !important;
        top: -40% !important; left: -5% !important; width: 35% !important; height: 180% !important;
        background: radial-gradient(ellipse, rgba(255,102,0,0.07) 0%, transparent 70%) !important;
        pointer-events: none !important;
    }

    .asset-tag { font-size: 8px !important; letter-spacing: 3px !important; color: var(--accent) !important; font-weight: 800 !important; text-transform: uppercase !important; }
    .asset-id { font-size: 26px !important; font-weight: 900 !important; letter-spacing: 1px !important; color: var(--text-main) !important; }
    .asset-meta { color: var(--text-muted) !important; font-size: 10px !important; letter-spacing: 1px !important; text-transform: uppercase !important; }
    .status-badge { border-radius: 999px !important; border: 1px solid var(--border-color) !important; background: var(--bg-card-2) !important; font-size: 9px !important; padding: 4px 10px !important; }

    /* Botões de ação */
    .btn-report-stealth {
        background: var(--info-bg) !important; border: 1px solid var(--info-border) !important;
        color: var(--info) !important; border-radius: 12px !important; padding: 8px 14px !important;
        font-size: 9.5px !important; letter-spacing: 0.8px !important; transition: all 0.22s ease !important;
    }
    .btn-report-stealth:hover { background: var(--info) !important; color: #000 !important; box-shadow: 0 0 20px rgba(0,180,216,0.3) !important; transform: translateY(-1px) !important; }

    .btn-edit-stealth {
        background: transparent !important; border: 1px solid var(--accent-border) !important;
        color: var(--accent) !important; border-radius: 12px !important; padding: 8px 14px !important;
        font-size: 9.5px !important; letter-spacing: 0.8px !important; transition: all 0.22s ease !important;
    }
    .btn-edit-stealth:hover { background: var(--accent) !important; color: #fff !important; box-shadow: 0 0 20px var(--accent-glow) !important; transform: translateY(-1px) !important; }

    .btn-delete-stealth {
        background: transparent !important; border: 1px solid var(--danger-border) !important;
        color: var(--danger) !important; border-radius: 12px !important; padding: 8px 14px !important;
        font-size: 9.5px !important; letter-spacing: 0.8px !important; transition: all 0.22s ease !important;
    }
    .btn-delete-stealth:hover { background: var(--danger) !important; color: #fff !important; box-shadow: 0 0 20px rgba(255,23,68,0.3) !important; transform: translateY(-1px) !important; }

    /* Mapa */
    .map-container { border-radius: 22px !important; border: 1px solid var(--border-color) !important; box-shadow: 0 8px 32px rgba(0,0,0,0.25) !important; }

    .gps-only-map-notice {
        background: rgba(6,6,14,0.88) !important;
        backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important;
        border-radius: 14px !important; border: 1px solid rgba(255,255,255,0.12) !important;
    }

    /* ── MODAIS ─────────────────────────────────────────── */
    .modal-overlay {
        background: rgba(4,4,10,0.88) !important;
        backdrop-filter: blur(20px) !important; -webkit-backdrop-filter: blur(20px) !important;
    }

    .modal-card {
        background: linear-gradient(180deg, rgba(20,20,25,0.97), rgba(12,12,16,0.99)) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        border-top: none !important;
        border-radius: 18px !important; padding: 30px !important;
        box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03) !important;
        position: relative !important;
        /* overflow: hidden auto = X clipa (mantem a barra colorida do ::before
           cortada nas bordas) + Y permite scroll quando conteudo cresce.
           max-height/min-height garante que o card NUNCA estoura a viewport. */
        overflow-x: hidden !important;
        overflow-y: auto !important;
        max-height: 92vh !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(255, 102, 0, .55) transparent !important;
    }
    .modal-card::-webkit-scrollbar { width: 8px; }
    .modal-card::-webkit-scrollbar-track { background: transparent; }
    .modal-card::-webkit-scrollbar-thumb {
        background: rgba(255, 102, 0, .45);
        border-radius: 8px;
    }
    .modal-card::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 102, 0, .70);
    }
    /* ═══════════════════════════════════════════════════════════════════
       MODAL DE CADASTRO DE CAMINHÃO — design novo (2026-05)
       Layout em 3 zonas: head fixo · body scroll · footer fixo.
       Largura 760px (96vw em mobile), 2 colunas onde cabe.
       ═══════════════════════════════════════════════════════════════════ */
    .cadastro-truck-card {
        width: 760px !important;
        max-width: 96vw !important;
        max-height: 92vh !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        border-radius: 18px !important;
        background: linear-gradient(180deg, rgba(22,22,28,0.985), rgba(13,13,18,0.99)) !important;
        border: 1px solid rgba(255,255,255,0.10) !important;
        border-top: none !important;
        box-shadow: 0 40px 100px rgba(0,0,0,0.78), 0 0 0 1px rgba(255,102,0,0.06) !important;
    }
    /* Barra superior gradiente fina (identidade ATHENA) */
    .cadastro-truck-card::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important; left: 0 !important; right: 0 !important; height: 3px !important;
        background: linear-gradient(90deg, #00d4ff 0%, #00a8e8 30%, #ff8c00 70%, #ff6600 100%) !important;
        border-radius: 18px 18px 0 0 !important;
        pointer-events: none !important;
        z-index: 2 !important;
    }
    .cadastro-truck-head {
        flex: 0 0 auto;
        padding: 26px 32px 18px 32px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        background: linear-gradient(180deg, rgba(28,28,36,0.55), rgba(20,20,26,0.20));
        position: relative;
    }
    .cadastro-truck-eyebrow {
        font-size: 9.5px; letter-spacing: 3px; font-weight: 800;
        color: rgba(255,102,0,0.78); text-transform: uppercase;
    }
    .cadastro-truck-title {
        font-size: 22px; font-weight: 900; letter-spacing: .5px;
        color: #fff; margin-top: 6px;
        display: flex; align-items: center; gap: 12px;
    }
    .cadastro-truck-ico {
        display: inline-flex; align-items: center; justify-content: center;
        width: 32px; height: 32px;
        background: linear-gradient(135deg, rgba(255,140,0,0.25), rgba(255,102,0,0.10));
        border: 1px solid rgba(255,102,0,0.35);
        border-radius: 8px;
        font-size: 16px; color: #ffb567;
    }
    .cadastro-truck-sub {
        font-size: 11px; color: rgba(255,255,255,0.45);
        margin-top: 4px; letter-spacing: .3px;
    }

    .cadastro-truck-body {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 22px 32px 22px 32px;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,102,0,0.45) transparent;
    }
    .cadastro-truck-body::-webkit-scrollbar { width: 8px; }
    .cadastro-truck-body::-webkit-scrollbar-track { background: transparent; }
    .cadastro-truck-body::-webkit-scrollbar-thumb { background: rgba(255,102,0,0.45); border-radius: 8px; }
    .cadastro-truck-body::-webkit-scrollbar-thumb:hover { background: rgba(255,102,0,0.70); }

    .cadastro-truck-section { margin-bottom: 18px; }
    .cadastro-truck-section:last-child { margin-bottom: 4px; }
    .cadastro-truck-section-title {
        font-size: 10px; letter-spacing: 2.5px; font-weight: 800;
        color: rgba(255,102,0,0.85); text-transform: uppercase;
        margin-bottom: 10px;
    }

    .cadastro-truck-grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    .cadastro-truck-card .nexus-input-group { margin-bottom: 12px; }
    .cadastro-truck-card .nexus-input-group:last-child { margin-bottom: 0; }
    .cadastro-truck-card .nexus-input { padding: 11px 14px; font-size: 12px; }
    .cadastro-truck-card .nexus-input.mono { font-family: 'JetBrains Mono', monospace; }
    .cadastro-truck-hint {
        margin-top: 5px;
        font-size: 9.5px;
        color: rgba(255,255,255,0.42);
        line-height: 1.45;
    }
    .cadastro-truck-hint code {
        background: rgba(255,102,0,0.10);
        color: #ffb567;
        padding: 1px 5px;
        border-radius: 3px;
        font-size: 9px;
    }

    /* Radios estilo card (ao invés de radio default minúsculo) */
    .cadastro-truck-radio-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 4px;
    }
    .cadastro-truck-radio {
        display: flex; align-items: center; gap: 10px;
        padding: 10px 12px;
        border: 1px solid rgba(255,255,255,0.10);
        background: rgba(255,255,255,0.02);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.18s ease;
    }
    .cadastro-truck-radio:hover {
        background: rgba(255,255,255,0.05);
        border-color: rgba(255,255,255,0.18);
    }
    .cadastro-truck-radio.active {
        border-color: rgba(255,102,0,0.55);
        background: rgba(255,102,0,0.08);
        box-shadow: 0 0 0 1px rgba(255,102,0,0.18);
    }
    .cadastro-truck-radio input[type="radio"] { accent-color: #ff6600; }
    .cadastro-truck-radio-title {
        font-size: 12px; font-weight: 700; color: #fff;
    }
    .cadastro-truck-radio-sub {
        font-size: 10px; color: rgba(255,255,255,0.45);
        margin-top: 1px;
    }

    .cadastro-truck-footer {
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-end;
        gap: 12px;
        padding: 16px 32px 22px 32px;
        border-top: 1px solid rgba(255,255,255,0.08);
        background: linear-gradient(180deg, rgba(15,15,20,0.20), rgba(10,10,14,0.55));
    }
    .cadastro-truck-footer .btn-nexus-save {
        flex: 0 0 auto !important;
        min-width: 220px !important;
    }
    .cadastro-truck-footer .btn-nexus-cancel {
        flex: 0 0 auto !important;
        min-width: 140px !important;
    }

    @media (max-width: 720px) {
        .cadastro-truck-grid-2,
        .cadastro-truck-radio-row { grid-template-columns: 1fr !important; }
        .cadastro-truck-head { padding: 22px 22px 14px 22px; }
        .cadastro-truck-body { padding: 18px 22px; }
        .cadastro-truck-footer { padding: 14px 22px 18px 22px; }
        .cadastro-truck-footer .btn-nexus-save,
        .cadastro-truck-footer .btn-nexus-cancel { min-width: 0 !important; flex: 1 1 auto !important; }
    }
    .modal-card::before {
        content: '' !important; position: absolute !important;
        top: 0 !important; left: 0 !important; right: 0 !important; height: 4px !important;
        background: linear-gradient(90deg, #00d4ff 0%, #00a8e8 25%, #ff8c00 75%, #ff6600 100%) !important;
        border-radius: 18px 18px 0 0 !important; pointer-events: none !important;
    }
    .modal-card::after {
        content: '' !important; position: absolute !important;
        top: 4px !important; left: 0 !important; right: 0 !important; height: 90px !important;
        background: radial-gradient(ellipse at 30% 0%, rgba(0,212,255,0.05), transparent 60%),
                    radial-gradient(ellipse at 70% 0%, rgba(255,102,0,0.06), transparent 60%) !important;
        pointer-events: none !important;
    }

    .modal-header-nexus { position: relative !important; margin-bottom: 22px !important; padding-bottom: 16px !important; border-bottom: 1px solid rgba(255,255,255,0.06) !important; }
    .modal-title-nexus { font-family: 'JetBrains Mono','Courier New',monospace !important; font-size: 11.5px !important; font-weight: 700 !important; color: rgba(255,255,255,0.55) !important; letter-spacing: 2.5px !important; text-transform: uppercase !important; display: flex !important; align-items: center !important; gap: 10px !important; }
    .modal-title-nexus > span:first-child { color: var(--accent) !important; font-size: 14px !important; opacity: 0.9 !important; }
    .modal-subtitle-nexus { font-size: 10.5px !important; color: rgba(255,255,255,0.78) !important; letter-spacing: 2px !important; margin-top: 8px !important; font-weight: 600 !important; border-left: 2px solid var(--accent) !important; padding: 4px 0 4px 10px !important; font-family: 'JetBrains Mono',monospace !important; text-transform: uppercase !important; }

    /* Inputs — visual mais limpo, com indicador laranja sutil ao lado do label */
    .nexus-input-group { position: relative !important; }
    .nexus-input { background: rgba(0,0,0,0.35) !important; border: 1px solid rgba(255,255,255,0.08) !important; border-radius: 10px !important; color: var(--text-main) !important; transition: all 0.18s cubic-bezier(.2,.8,.2,1) !important; padding: 13px 14px !important; font-size: 12px !important; }
    .nexus-input:hover { border-color: rgba(255,255,255,0.14) !important; background: rgba(0,0,0,0.45) !important; }
    .nexus-input:focus { border-color: rgba(255,102,0,0.55) !important; background: rgba(0,0,0,0.5) !important; box-shadow: 0 0 0 3px rgba(255,102,0,0.10) !important; }
    .nexus-input::placeholder { color: rgba(255,255,255,0.28) !important; }
    .nexus-label { color: rgba(255,255,255,0.55) !important; font-size: 9.5px !important; letter-spacing: 1.6px !important; font-weight: 700 !important; text-transform: uppercase !important; margin-bottom: 7px !important; display: flex !important; align-items: center !important; gap: 6px !important; font-family: 'JetBrains Mono',monospace !important; }
    .nexus-label::before { content: '' !important; display: inline-block !important; width: 4px !important; height: 4px !important; border-radius: 50% !important; background: var(--accent) !important; box-shadow: 0 0 6px var(--accent) !important; }

    /* Botões de modal — mais polidos */
    .btn-nexus-save { background: linear-gradient(135deg, #ff8c00, #ff6600) !important; border: none !important; border-radius: 10px !important; padding: 13px 22px !important; letter-spacing: 1.4px !important; transition: all 0.18s cubic-bezier(.2,.8,.2,1) !important; font-weight: 800 !important; font-size: 11px !important; box-shadow: 0 4px 16px rgba(255,102,0,0.28) !important; color: #fff !important; }
    .btn-nexus-save:hover { transform: translateY(-1px) !important; box-shadow: 0 8px 24px rgba(255,102,0,0.45) !important; filter: brightness(1.08) !important; }
    .btn-nexus-save:active { transform: translateY(0) !important; }
    .btn-nexus-cancel { border: 1px solid rgba(255,255,255,0.10) !important; border-radius: 10px !important; padding: 13px 22px !important; background: transparent !important; color: rgba(255,255,255,0.55) !important; transition: all 0.18s cubic-bezier(.2,.8,.2,1) !important; font-weight: 700 !important; font-size: 11px !important; letter-spacing: 1.4px !important; }
    .btn-nexus-cancel:hover { color: #fff !important; background: rgba(255,255,255,0.04) !important; border-color: rgba(255,255,255,0.20) !important; }
    .nexus-footer-actions { display: flex !important; gap: 10px !important; margin-top: 22px !important; }
    .nexus-footer-actions .btn-nexus-save { flex: 2 !important; }
    .nexus-footer-actions .btn-nexus-cancel { flex: 1 !important; }

    /* Lista de usuários */
    .user-item-row { background: var(--bg-card) !important; border: 1px solid var(--border-color) !important; border-radius: 14px !important; transition: border-color 0.2s ease !important; }
    .user-item-row:hover { border-color: rgba(255,255,255,0.12) !important; }
    .user-item-name { color: var(--text-main) !important; }
    .user-item-email { color: var(--text-muted) !important; }
    .user-item-role { background: var(--info-bg) !important; color: var(--info) !important; border: 1px solid var(--info-border) !important; border-radius: 999px !important; }
    .btn-delete-user { background: var(--danger-dim) !important; border: 1px solid var(--danger-border) !important; color: var(--danger) !important; border-radius: 8px !important; transition: all 0.22s ease !important; }
    .btn-delete-user:hover { background: var(--danger) !important; color: #fff !important; box-shadow: 0 0 14px rgba(255,23,68,0.3) !important; }

    /* Config actions */
    .config-action { border-radius: 18px !important; border: 1px solid var(--border-color) !important; background: var(--bg-card) !important; transition: all 0.25s ease !important; }
    .config-action b { color: var(--text-main) !important; }
    .config-action span { color: var(--text-muted) !important; }
    .config-action:hover { transform: translateY(-3px) !important; border-color: var(--accent-border) !important; box-shadow: 0 8px 24px rgba(255,102,0,0.1) !important; background: rgba(255,102,0,0.06) !important; }

    /* Fleet summary */
    .fleet-summary-v74 { border-radius: 16px !important; margin: 0 4px 12px !important; }
    .fleet-summary-kpi-v74 { border-radius: 10px !important; }

    /* ── LIGHT THEME OVERRIDES ──────────────────────────── */
    .light-theme .side-panel { box-shadow: 4px 0 20px rgba(0,0,0,0.06) !important; }
    .light-theme .node-item { background: rgba(0,0,0,0.025) !important; }
    .light-theme .node-item:hover { background: rgba(255,102,0,0.06) !important; }
    .light-theme .node-client { background: linear-gradient(90deg, rgba(255,102,0,0.08), rgba(0,0,0,0.02)) !important; }
    .light-theme .vehicle-btn { background: rgba(0,0,0,0.025) !important; color: #4b5563 !important; }
    .light-theme .vehicle-btn:hover { background: rgba(255,102,0,0.07) !important; color: #111 !important; }
    .light-theme .vehicle-btn.active { background: linear-gradient(135deg, rgba(255,102,0,0.12), #fff) !important; }
    .light-theme .main-workspace { background: radial-gradient(circle at 20% 0%, rgba(255,102,0,0.06), transparent 25%), linear-gradient(180deg, #f1f3f8, #e8ecf4) !important; }
    .light-theme .asset-header-bar { background: rgba(255,255,255,0.92) !important; }
    .light-theme .global-kpi-card { background: rgba(255,255,255,0.88) !important; }
    .light-theme .modal-card { background: #fff !important; box-shadow: 0 24px 64px rgba(0,0,0,0.14) !important; }
    .light-theme .node-title,
    .light-theme .brand-title,
    .light-theme .asset-id,
    .light-theme .modal-title-nexus,
    .light-theme .config-action b,
    .light-theme .mobile-logo-text { color: #111827 !important; text-shadow: none !important; }
    .light-theme .nexus-input { background: rgba(0,0,0,0.04) !important; color: #111827 !important; border-color: rgba(0,0,0,0.1) !important; }
    .light-theme .mqtt-status-bar { background: rgba(255,255,255,0.92) !important; backdrop-filter: blur(12px) !important; }
    .light-theme .sys-btn { background: #fff !important; color: #374151 !important; border-color: rgba(0,0,0,0.1) !important; }
    .light-theme .user-item-row { background: rgba(0,0,0,0.025) !important; }

    /* ── MOBILE — Preservação dos estilos responsivos ───── */
    @media (max-width: 900px) {
        .mqtt-status-bar {
            position: fixed !important; top: 62px !important;
            left: 10px !important; right: 10px !important; width: auto !important;
            margin: 0 !important; border-radius: 12px !important;
        }

        /* Mobile: padding-top compensa mobile-header fixo (~62px). Sem lateral. */
        .main-workspace { padding: 62px 0 20px !important; }

        .asset-header-bar {
            border-radius: 18px !important; padding: 18px !important;
        }

        .map-container { border-radius: 18px !important; }

        .modal-card, .modal-card-users, .pdf-modal-card {
            border-radius: 18px !important; padding: 18px !important;
        }
    }

    /* ── HERO SHELL ─────────────────────────────────────── */
    .nexus-hero-shell {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .nexus-empty-bg {
        position: absolute !important;
        inset: 0 !important;
        pointer-events: none !important;
        z-index: 0 !important;
    }

    .nexus-hero-inner {
        position: relative !important;
        z-index: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* ── ASSET ACTIONS ──────────────────────────────────── */
    .asset-actions {
        display: flex !important;
        gap: 10px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }

    @keyframes ambientOrb {
        0%, 100% { opacity: 0.5;  transform: translate(-50%,-50%) scale(1); }
        50%       { opacity: 0.78; transform: translate(-50%,-50%) scale(1.1); }
    }

    @keyframes radarRing {
        0%   { transform: translate(-50%,-50%) scale(0.28); opacity: 0.65; }
        100% { transform: translate(-50%,-50%) scale(2.9);  opacity: 0; }
    }

    @keyframes borderGlow {
        0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
        50%       { box-shadow: 0 8px 32px rgba(0,0,0,0.2), -5px 0 22px rgba(255,102,0,0.2); }
    }

    @keyframes hmLed {
        0%, 100% { box-shadow: 0 0 0 2px rgba(0,230,118,0.15), 0 0 6px rgba(0,230,118,0.55); }
        50%       { box-shadow: 0 0 0 4px rgba(0,230,118,0.06), 0 0 18px rgba(0,230,118,0.85); }
    }

    @keyframes hmShimmer {
        0%   { transform: translateX(-100%); }
        100% { transform: translateX(500%); }
    }

    @keyframes heroTitleGlow {
        0%, 100% { filter: none; }
        50%       { filter: drop-shadow(0 0 22px rgba(255,102,0,0.22)); }
    }

    /* Hero Shell — floating ambient orb */
    .nexus-hero-shell {
        overflow: hidden !important;
    }

    .nexus-hero-shell::after {
        content: '' !important;
        position: absolute !important;
        top: 50% !important; left: 50% !important;
        width: min(740px, 92vw) !important;
        height: min(740px, 92vw) !important;
        background: radial-gradient(circle, rgba(255,102,0,0.054) 0%, transparent 66%) !important;
        border-radius: 50% !important;
        animation: ambientOrb 7s ease-in-out infinite !important;
        pointer-events: none !important;
        z-index: 0 !important;
    }

    /* Hero Inner — dual radar rings */
    .nexus-hero-inner {
        position: relative !important;
    }

    .nexus-hero-inner::before {
        content: '' !important;
        position: absolute !important;
        top: 38px !important; left: 50% !important;
        width: 170px !important; height: 170px !important;
        border: 1px solid rgba(255,102,0,0.16) !important;
        border-radius: 50% !important;
        animation: radarRing 4.2s ease-out infinite !important;
        pointer-events: none !important;
    }

    .nexus-hero-inner::after {
        content: '' !important;
        position: absolute !important;
        top: 38px !important; left: 50% !important;
        width: 170px !important; height: 170px !important;
        border: 1px solid rgba(255,102,0,0.10) !important;
        border-radius: 50% !important;
        animation: radarRing 4.2s ease-out infinite 2.1s !important;
        pointer-events: none !important;
    }

    /* Hero title — entrance + subtle breath glow */
    .nexus-hero-title {
        animation: titleEntrance 1.5s cubic-bezier(0.2,0.8,0.2,1) forwards,
                   heroTitleGlow 5s ease-in-out infinite 2s !important;
    }

    /* KPI Cards — shimmer sweep */
    .global-kpi-card {
        overflow: hidden !important;
    }

    .global-kpi-card::after {
        content: '' !important;
        position: absolute !important;
        top: 0 !important; left: 0 !important; bottom: 0 !important;
        width: 20% !important;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.036), transparent) !important;
        animation: hmShimmer 6s ease-in-out infinite !important;
        pointer-events: none !important;
    }

    .global-kpi-card.card-1::after { animation-delay: 0s !important; }
    .global-kpi-card.card-2::after { animation-delay: 1.8s !important; }
    .global-kpi-card.card-3::after { animation-delay: 3.6s !important; }

    /* KPI Values — pulsing glow */
    .global-kpi-value {
        animation: kpiPulse 4s ease-in-out infinite !important;
    }

    /* Asset Header — pulsing left border shadow */
    .asset-header-bar {
        animation: borderGlow 4.5s ease-in-out infinite !important;
    }

    /* Status bar — live dot indicator */
    .mqtt-online::before {
        content: '' !important;
        display: inline-block !important;
        width: 5px !important; height: 5px !important;
        background: var(--success) !important;
        border-radius: 50% !important;
        margin-right: 8px !important;
        animation: hmLed 2s ease-in-out infinite !important;
        vertical-align: middle !important;
        position: relative !important;
        top: -1px !important;
    }

    /* Vehicle buttons — active name glow */
    .vehicle-btn.active .vehicle-name {
        text-shadow: 0 0 14px rgba(255,102,0,0.42) !important;
    }

    /* System action config button — hover lift */
    .sys-config-btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 0 26px rgba(255,102,0,0.2) !important;
    }

    /* Light theme — disable all glow animations */
    .light-theme .nexus-hero-shell::after           { animation: none !important; opacity: 0.18 !important; }
    .light-theme .nexus-hero-inner::before,
    .light-theme .nexus-hero-inner::after           { display: none !important; }
    .light-theme .nexus-hero-title                  { animation: titleEntrance 1.5s cubic-bezier(0.2,0.8,0.2,1) forwards !important; }
    .light-theme .asset-header-bar                  { animation: none !important; }
    .light-theme .global-kpi-card::after            { display: none !important; }
    .light-theme .global-kpi-value                  { animation: none !important; }
    .light-theme .mqtt-online::before               { animation: none !important; box-shadow: none !important; }
    .light-theme .vehicle-btn.active .vehicle-name  { text-shadow: none !important; }
    .light-theme .sys-config-btn:hover              { transform: translateY(-1px) !important; box-shadow: none !important; }

    /* ══════════════════════════════════════════════════════
       HOME — MISSION CONTROL SHELL V100
    ══════════════════════════════════════════════════════ */
    @keyframes hmScan    { 0%{top:-2px;opacity:0}5%{opacity:.85}95%{opacity:.85}100%{top:100%;opacity:0} }
    @keyframes hmOrb     { 0%,100%{opacity:.38;transform:translate(-50%,-50%) scale(1)}50%{opacity:.6;transform:translate(-50%,-50%) scale(1.12)} }
    @keyframes hmRing    { from{transform:translate(-50%,-50%) scale(.18);opacity:.7}to{transform:translate(-50%,-50%) scale(3);opacity:0} }
    @keyframes hmFadeUp  { from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none} }
    @keyframes hmPulse   { 0%,100%{opacity:1}50%{opacity:.5} }
    @keyframes hmShine   { from{transform:translateX(-120%)}to{transform:translateX(500%)} }
    @keyframes hmLedGrn  { 0%,100%{box-shadow:0 0 3px 1px rgba(0,230,118,.6)}50%{box-shadow:0 0 9px 3px rgba(0,230,118,.9)} }
    @keyframes hmGlow    { 0%,100%{filter:none}50%{filter:drop-shadow(0 0 18px rgba(255,102,0,.28))} }
    @keyframes hmBorderP { 0%,100%{box-shadow:0 8px 32px rgba(0,0,0,.22)}50%{box-shadow:0 8px 32px rgba(0,0,0,.22),-5px 0 28px rgba(255,102,0,.18)} }

    /* SIDEBAR REDESIGN */
    .nexus-sidebar {
        background: linear-gradient(180deg,rgba(10,10,22,.99) 0%,rgba(6,6,16,1) 100%) !important;
        border-right: 1px solid rgba(255,255,255,.055) !important;
        box-shadow: 4px 0 40px rgba(0,0,0,.45) !important;
        position: relative !important;
        overflow: hidden !important;
    }
    .nexus-sidebar::before {
        content:''; position:absolute; top:0; right:0; width:1px; height:100%;
        background: linear-gradient(180deg,var(--accent),rgba(0,210,255,.5),transparent);
        pointer-events:none;
    }
    .nexus-sidebar::after {
        content:''; position:absolute; top:0; left:0; right:0; bottom:0;
        background: radial-gradient(ellipse at 50% 0%, rgba(255,102,0,.06) 0%, transparent 65%);
        pointer-events:none;
    }
    .nexus-brand-area {
        position: relative; overflow: hidden;
        background: linear-gradient(135deg,rgba(255,102,0,.12),rgba(0,0,0,0)) !important;
        border-bottom: 1px solid rgba(255,255,255,.06) !important;
        padding-bottom: 16px !important;
    }
    .nexus-brand-area::after {
        content:''; position:absolute; top:0; left:0; right:0; height:1px;
        background: linear-gradient(90deg,transparent,var(--accent),transparent);
    }

    /* VEHICLE BUTTONS */
    .vehicle-btn {
        position: relative; overflow: hidden;
        border-radius: 12px !important;
        transition: all .25s cubic-bezier(.16,1,.3,1) !important;
        border: 1px solid transparent !important;
    }
    .vehicle-btn:hover {
        background: rgba(255,102,0,.08) !important;
        border-color: rgba(255,102,0,.25) !important;
        transform: translateX(4px) !important;
    }
    .vehicle-btn.active {
        background: linear-gradient(135deg,rgba(255,102,0,.15),rgba(0,210,255,.05)) !important;
        border-color: rgba(255,102,0,.4) !important;
        box-shadow: 0 4px 20px rgba(255,102,0,.15), inset 0 1px 0 rgba(255,255,255,.06) !important;
    }
    .vehicle-btn.active::after { content: none !important; }

    /* HERO SHELL REDESIGN */
    .nexus-hero-shell {
        position: relative !important; overflow: hidden !important;
        background: linear-gradient(160deg,rgba(12,12,24,.97) 0%,rgba(6,6,14,.99) 100%) !important;
        border-radius: 20px !important;
        border: 1px solid rgba(255,255,255,.06) !important;
        box-shadow: 0 24px 64px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05) !important;
        animation: hmFadeUp .5s cubic-bezier(.16,1,.3,1) both, hmBorderP 5s ease-in-out infinite !important;
    }
    .nexus-hero-shell::before {
        content:''; position:absolute; top:0; left:0; right:0; height:2px;
        background: linear-gradient(90deg,transparent,var(--accent) 30%,rgba(0,210,255,.6) 70%,transparent);
    }
    .nexus-hero-shell::after {
        content:''; position:absolute; top:-100%; left:-50%; width:200%; height:300%;
        background: radial-gradient(ellipse at 50% 0%,rgba(255,102,0,.07) 0%,transparent 60%);
        pointer-events:none; animation: hmOrb 6s ease-in-out infinite;
    }

    /* HERO INNER: radar rings */
    .nexus-hero-inner {
        position: relative !important;
        padding: 32px !important;
    }
    .nexus-hero-inner::before,
    .nexus-hero-inner::after {
        content:''; position:absolute; left:50%; top:50%;
        width:560px; height:560px; border-radius:50%;
        border:1px solid rgba(255,102,0,.07);
        pointer-events:none;
        animation: hmRing 5s linear infinite;
    }
    .nexus-hero-inner::after { animation-delay: 2.5s; }

    /* HERO TITLE */
    .nexus-hero-title {
        animation: hmGlow 5s ease-in-out infinite !important;
    }

    /* KPI CARDS */
    .global-kpi-card {
        position: relative !important; overflow: hidden !important;
        border-radius: 16px !important;
        background: linear-gradient(160deg,rgba(18,18,32,.97),rgba(10,10,22,.99)) !important;
        border: 1px solid rgba(255,255,255,.07) !important;
        box-shadow: 0 12px 36px rgba(0,0,0,.35) !important;
        transition: transform .25s, box-shadow .25s !important;
    }
    .global-kpi-card:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 20px 48px rgba(0,0,0,.45) !important;
    }
    .global-kpi-card::before {
        content:''; position:absolute; top:0; left:0; right:0; height:1px;
        background:linear-gradient(90deg,transparent,var(--accent),transparent);
    }
    .global-kpi-card::after {
        content:''; position:absolute; top:0; left:-60%; width:40%; height:100%;
        background:linear-gradient(90deg,transparent,rgba(255,255,255,.04),transparent);
        animation: hmShine 4s ease-in-out infinite;
    }
    .global-kpi-card:nth-child(2)::after { animation-delay: .8s; }
    .global-kpi-card:nth-child(3)::after { animation-delay: 1.6s; }
    .global-kpi-card:nth-child(4)::after { animation-delay: 2.4s; }

    /* ASSET HEADER BAR */
    .asset-header-bar {
        border-radius: 16px !important;
        background: linear-gradient(135deg,rgba(18,18,32,.97),rgba(10,10,22,.99)) !important;
        border: 1px solid rgba(255,255,255,.07) !important;
        box-shadow: 0 12px 36px rgba(0,0,0,.35) !important;
        animation: hmBorderP 4.5s ease-in-out infinite !important;
    }

    /* MQTT LED */
    .mqtt-online::before {
        content:''; display:inline-block; width:7px; height:7px; border-radius:50%;
        background:var(--success); margin-right:6px; vertical-align:middle;
        animation: hmLedGrn 2s infinite !important;
    }

    /* SEARCH BOX */
    .nexus-search-input {
        background: rgba(255,255,255,.04) !important;
        border: 1px solid rgba(255,255,255,.08) !important;
        border-radius: 10px !important;
        transition: border-color .2s, box-shadow .2s !important;
    }
    .nexus-search-input:focus {
        border-color: rgba(255,102,0,.5) !important;
        box-shadow: 0 0 0 3px rgba(255,102,0,.1) !important;
    }

    /* STATUS BAR */
    .nexus-status-bar {
        border-radius: 12px !important;
        background: rgba(10,10,20,.92) !important;
        border: 1px solid rgba(255,255,255,.06) !important;
        backdrop-filter: blur(12px) !important;
    }

    /* SCAN LINE on hero */
    .nexus-hero-shell .nexus-hero-inner > .mc-scan-line {
        position:absolute; top:0; left:0; right:0; height:2px;
        background: linear-gradient(90deg,transparent,rgba(255,102,0,.5),transparent);
        animation: hmScan 6s linear infinite; pointer-events:none;
    }

    /* LIGHT THEME */
    .light-theme .nexus-sidebar           { background: rgba(248,248,252,.98) !important; border-color:rgba(0,0,0,.08) !important; box-shadow:none !important; }
    .light-theme .nexus-sidebar::before   { display:none !important; }
    .light-theme .nexus-sidebar::after    { display:none !important; }
    .light-theme .nexus-hero-shell        { background:rgba(248,248,252,.97) !important; border-color:rgba(0,0,0,.08) !important; box-shadow:0 8px 24px rgba(0,0,0,.08) !important; animation:none !important; }
    .light-theme .nexus-hero-shell::before,.light-theme .nexus-hero-shell::after { display:none !important; }
    .light-theme .nexus-hero-inner::before,.light-theme .nexus-hero-inner::after { display:none !important; }
    .light-theme .global-kpi-card         { background:rgba(248,248,252,.97) !important; border-color:rgba(0,0,0,.08) !important; box-shadow:0 4px 16px rgba(0,0,0,.06) !important; }
    .light-theme .global-kpi-card::before,.light-theme .global-kpi-card::after { display:none !important; }
    .light-theme .asset-header-bar        { background:rgba(248,248,252,.97) !important; border-color:rgba(0,0,0,.08) !important; animation:none !important; }
    .light-theme .vehicle-btn:hover       { transform:none !important; }

    /* ══════════════════════════════════════════════════════
       V101 — MODAIS PREMIUM + LIGHT THEME IMPECÁVEL
    ══════════════════════════════════════════════════════ */
    @keyframes modalIn   { from{opacity:0;transform:scale(.95) translateY(20px)} to{opacity:1;transform:scale(1) translateY(0)} }
    @keyframes modalGlow { 0%,100%{box-shadow:0 28px 72px rgba(0,0,0,.65),0 0 0 1px rgba(255,255,255,.04)} 50%{box-shadow:0 28px 72px rgba(0,0,0,.65),0 0 0 1px rgba(255,102,0,.18),0 0 60px rgba(255,102,0,.08)} }
    @keyframes overlayIn { from{opacity:0;backdrop-filter:blur(0)} to{opacity:1;backdrop-filter:blur(20px)} }
    @keyframes inputFlow { 0%,100%{box-shadow:0 0 0 3px rgba(255,102,0,.08)} 50%{box-shadow:0 0 0 5px rgba(255,102,0,.15)} }
    @keyframes saveBtn   { 0%,100%{filter:brightness(1)} 50%{filter:brightness(1.08)} }

    /* MODAL OVERLAY UPGRADE */
    .modal-overlay {
        background: linear-gradient(135deg,rgba(4,4,12,.85),rgba(8,8,20,.92)) !important;
        backdrop-filter: blur(24px) saturate(140%) !important;
        animation: overlayIn .3s ease-out !important;
    }

    /* MODAL CARD PREMIUM */
    .modal-card {
        background: linear-gradient(160deg,rgba(20,20,38,.99),rgba(8,8,20,.99)) !important;
        border: 1px solid rgba(255,255,255,.08) !important;
        border-top: none !important;
        border-radius: 24px !important;
        padding: 36px !important;
        box-shadow: 0 32px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 1px rgba(255,102,0,.06) !important;
        position: relative !important; overflow: hidden !important;
        animation: modalIn .35s cubic-bezier(.16,1,.3,1) both, modalGlow 4s ease-in-out infinite !important;
    }
    .modal-card::before {
        content:'' !important; position:absolute !important;
        top:0 !important; left:0 !important; right:0 !important; height:3px !important;
        background: linear-gradient(90deg,transparent,var(--accent) 20%,#00d2ff 50%,var(--accent) 80%,transparent) !important;
        border-radius: 0 !important;
        pointer-events: none !important;
    }
    .modal-card::after {
        content:''; position:absolute; top:-30%; right:-20%;
        width:520px; height:520px; border-radius:50%;
        background: radial-gradient(circle,rgba(255,102,0,.08) 0%,transparent 60%);
        pointer-events: none;
    }
    .modal-card > * { position: relative; z-index: 2; }

    .modal-title-nexus {
        /* Ciano → laranja: legível em qualquer fundo escuro e nunca some */
        background: linear-gradient(135deg,#00d2ff 0%,var(--accent) 100%) !important;
        -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent !important;
        font-size: 18px !important; letter-spacing: 1.5px !important;
    }
    .modal-subtitle-nexus {
        background: rgba(255,102,0,.06) !important;
        border-left: 3px solid var(--accent) !important;
        border-radius: 0 8px 8px 0 !important;
        padding: 6px 12px !important;
        color: rgba(255,255,255,.7) !important;
    }

    /* INPUTS PREMIUM */
    .nexus-input {
        background: rgba(255,255,255,.04) !important;
        border: 1px solid rgba(255,255,255,.1) !important;
        border-radius: 12px !important;
        padding: 12px 16px !important;
        font-family: 'Inter',sans-serif !important;
        transition: all .25s cubic-bezier(.16,1,.3,1) !important;
    }
    .nexus-input:hover {
        border-color: rgba(255,255,255,.18) !important;
        background: rgba(255,255,255,.05) !important;
    }
    .nexus-input:focus {
        border-color: var(--accent) !important;
        background: rgba(255,102,0,.04) !important;
        box-shadow: 0 0 0 4px rgba(255,102,0,.12) !important;
        animation: inputFlow 2.5s ease-in-out infinite;
    }
    .nexus-label {
        display: flex; align-items: center; gap: 6px;
        margin-bottom: 8px !important;
    }
    .nexus-label::before {
        content: ''; display: inline-block; width: 4px; height: 4px;
        border-radius: 50%; background: var(--accent);
        box-shadow: 0 0 6px var(--accent);
    }

    /* BOTÕES PREMIUM */
    .btn-nexus-save {
        position: relative; overflow: hidden;
        background: linear-gradient(135deg,#ff6600,#ff8800) !important;
        border: none !important;
        border-radius: 12px !important;
        padding: 13px 24px !important;
        font-weight: 900 !important;
        letter-spacing: 1.5px !important;
        text-transform: uppercase;
        font-size: 11px !important;
        /* Texto escuro em fundo laranja = contraste 12:1 */
        color: #1a0500 !important;
        text-shadow: none !important;
        box-shadow: 0 8px 24px rgba(255,102,0,.3), inset 0 1px 0 rgba(255,255,255,.3) !important;
        transition: all .25s cubic-bezier(.16,1,.3,1) !important;
        animation: saveBtn 3s ease-in-out infinite;
    }
    .btn-nexus-save::before {
        content:''; position:absolute; top:0; left:-110%;
        width:60%; height:100%;
        background: linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);
        transition: left .6s ease;
    }
    .btn-nexus-save:hover { transform: translateY(-2px) !important; box-shadow: 0 14px 36px rgba(255,102,0,.45) !important; filter: brightness(1.08) !important; }
    .btn-nexus-save:hover::before { left: 110%; }

    .btn-nexus-cancel {
        background: rgba(255,255,255,.04) !important;
        border: 1px solid rgba(255,255,255,.12) !important;
        border-radius: 12px !important;
        padding: 13px 24px !important;
        color: rgba(255,255,255,.6) !important;
        font-weight: 800 !important;
        letter-spacing: 1.5px !important;
        text-transform: uppercase;
        font-size: 11px !important;
        transition: all .22s cubic-bezier(.16,1,.3,1) !important;
    }
    .btn-nexus-cancel:hover {
        background: rgba(255,255,255,.08) !important;
        color: #fff !important;
        border-color: rgba(255,255,255,.2) !important;
    }

    /* CONFIG ACTIONS */
    .config-action {
        position: relative; overflow: hidden;
        background: linear-gradient(160deg,rgba(255,255,255,.04),rgba(255,255,255,.01)) !important;
        border: 1px solid rgba(255,255,255,.08) !important;
        border-radius: 18px !important;
        padding: 22px !important;
        transition: all .3s cubic-bezier(.16,1,.3,1) !important;
    }
    .config-action::before {
        content:''; position:absolute; top:0; left:-110%;
        width:50%; height:100%;
        background: linear-gradient(90deg,transparent,rgba(255,102,0,.06),transparent);
        transition: left .8s ease;
    }
    .config-action:hover::before { left: 120%; }
    .config-action:hover {
        transform: translateY(-4px) !important;
        border-color: rgba(255,102,0,.4) !important;
        background: linear-gradient(160deg,rgba(255,102,0,.08),rgba(0,210,255,.03)) !important;
        box-shadow: 0 14px 36px rgba(255,102,0,.18), inset 0 1px 0 rgba(255,255,255,.08) !important;
    }
    .config-action b {
        font-size: 13px !important; font-weight: 900 !important;
        letter-spacing: .3px !important;
    }
    .config-action span {
        font-size: 10px !important; line-height: 1.5 !important;
        color: rgba(255,255,255,.5) !important;
    }

    /* USER ITEM ROW */
    .user-item-row {
        background: linear-gradient(160deg,rgba(255,255,255,.04),rgba(255,255,255,.01)) !important;
        border: 1px solid rgba(255,255,255,.08) !important;
        border-radius: 14px !important;
        padding: 14px 16px !important;
        transition: all .25s cubic-bezier(.16,1,.3,1) !important;
    }
    .user-item-row:hover {
        background: linear-gradient(160deg,rgba(255,102,0,.06),rgba(255,255,255,.02)) !important;
        border-color: rgba(255,102,0,.3) !important;
        transform: translateX(4px);
    }
    .user-item-name { font-weight: 800 !important; letter-spacing: .3px !important; }
    .user-item-role {
        font-size: 9px !important; font-weight: 900 !important;
        letter-spacing: 1.2px !important; padding: 4px 10px !important;
        text-transform: uppercase;
    }
    .btn-delete-user {
        background: rgba(255,51,51,.08) !important;
        border: 1px solid rgba(255,51,51,.25) !important;
        border-radius: 10px !important;
        padding: 8px 14px !important;
        color: var(--danger) !important;
        font-weight: 800 !important;
        font-size: 10px !important;
        letter-spacing: 1px !important;
        text-transform: uppercase;
        transition: all .22s ease !important;
    }
    .btn-delete-user:hover {
        background: var(--danger) !important;
        color: #fff !important;
        box-shadow: 0 6px 18px rgba(255,51,51,.4) !important;
        transform: translateY(-1px);
    }
    .btn-edit-user {
        background: rgba(0,131,176,.08) !important;
        border: 1px solid rgba(0,131,176,.30) !important;
        border-radius: 10px !important;
        padding: 8px 14px !important;
        color: var(--info, #0083b0) !important;
        font-weight: 800 !important;
        font-size: 11px !important;
        letter-spacing: 1px !important;
        cursor: pointer;
        transition: all .22s ease !important;
    }
    .btn-edit-user:hover {
        background: var(--info, #0083b0) !important;
        color: #fff !important;
        box-shadow: 0 6px 18px rgba(0,131,176,.4) !important;
        transform: translateY(-1px);
    }

    .light-theme {
        --light-bg-1: #f7f9fc;
        --light-bg-2: #eef2f8;
        --light-card: #ffffff;
        --light-border: rgba(13,27,42,.08);
        --light-text-1: #0d1b2a;
        --light-text-2: rgba(13,27,42,.65);
        --light-text-3: rgba(13,27,42,.45);
    }
    .light-theme .nexus-system-root {
        background: linear-gradient(135deg,var(--light-bg-1),var(--light-bg-2)) !important;
    }

    /* SIDEBAR LIGHT */
    .light-theme .nexus-sidebar {
        background: linear-gradient(180deg,#ffffff,#f7f9fc) !important;
        border-right: 1px solid var(--light-border) !important;
        box-shadow: 4px 0 32px rgba(13,27,42,.05) !important;
    }
    .light-theme .nexus-brand-area {
        background: linear-gradient(135deg,rgba(255,102,0,.08),rgba(255,255,255,0)) !important;
        border-bottom: 1px solid var(--light-border) !important;
    }

    /* WORKSPACE LIGHT */
    .light-theme .main-workspace {
        background:
            radial-gradient(ellipse at 20% 0%,rgba(255,102,0,.07) 0%,transparent 35%),
            radial-gradient(ellipse at 80% 100%,rgba(0,131,176,.06) 0%,transparent 40%),
            linear-gradient(135deg,#f7f9fc 0%,#eef2f8 100%) !important;
    }

    /* HERO LIGHT */
    .light-theme .nexus-hero-shell {
        background: linear-gradient(160deg,#ffffff 0%,#f7f9fc 100%) !important;
        border: 1px solid var(--light-border) !important;
        box-shadow: 0 16px 48px rgba(13,27,42,.06), 0 2px 8px rgba(13,27,42,.04) !important;
    }
    .light-theme .nexus-hero-title {
        background: linear-gradient(135deg,#0d1b2a 0%,#ff6600 100%) !important;
        -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent !important;
    }

    /* KPI CARDS LIGHT */
    .light-theme .global-kpi-card {
        background: linear-gradient(160deg,#ffffff,#f7f9fc) !important;
        border: 1px solid var(--light-border) !important;
        box-shadow: 0 8px 24px rgba(13,27,42,.05) !important;
    }
    .light-theme .global-kpi-card:hover {
        box-shadow: 0 14px 36px rgba(255,102,0,.12) !important;
    }
    .light-theme .global-kpi-value { color: #0d1b2a !important; }

    /* ASSET HEADER LIGHT */
    .light-theme .asset-header-bar {
        background: linear-gradient(135deg,#ffffff,#f7f9fc) !important;
        border: 1px solid var(--light-border) !important;
        box-shadow: 0 4px 14px rgba(13,27,42,.05) !important;
    }

    /* STATUS BAR LIGHT */
    .light-theme .nexus-status-bar,
    .light-theme .mqtt-status-bar {
        background: rgba(255,255,255,.92) !important;
        border: 1px solid var(--light-border) !important;
        backdrop-filter: blur(14px) saturate(160%) !important;
        box-shadow: 0 4px 12px rgba(13,27,42,.04) !important;
    }
    .light-theme .mqtt-online::before {
        background: #10b981 !important;
        box-shadow: 0 0 8px rgba(16,185,129,.5) !important;
    }

    /* VEHICLE BUTTONS LIGHT */
    .light-theme .vehicle-btn {
        background: rgba(13,27,42,.025) !important;
        color: #4b5563 !important;
        border: 1px solid transparent !important;
    }
    .light-theme .vehicle-btn:hover {
        background: rgba(255,102,0,.08) !important;
        border-color: rgba(255,102,0,.25) !important;
        color: #1f2937 !important;
    }
    .light-theme .vehicle-btn.active {
        background: linear-gradient(135deg,rgba(255,102,0,.12),#fff) !important;
        border-color: rgba(255,102,0,.4) !important;
        box-shadow: 0 4px 14px rgba(255,102,0,.15) !important;
    }
    .light-theme .vehicle-btn.active::after { content: none !important; }
    .light-theme .vehicle-btn.active::before { content: none !important; }

    /* SEARCH LIGHT */
    .light-theme .nexus-search-input {
        background: #fff !important;
        border: 1px solid var(--light-border) !important;
        color: #0d1b2a !important;
        box-shadow: 0 1px 2px rgba(13,27,42,.03) !important;
    }
    .light-theme .nexus-search-input:focus {
        border-color: rgba(255,102,0,.5) !important;
        box-shadow: 0 0 0 4px rgba(255,102,0,.1) !important;
    }

    /* MODAIS LIGHT — ULTRA REFINADO */
    .light-theme .modal-overlay {
        background: linear-gradient(135deg,rgba(50,50,80,.45),rgba(13,27,42,.55)) !important;
        backdrop-filter: blur(20px) saturate(140%) !important;
    }
    .light-theme .modal-card {
        background: linear-gradient(160deg,#ffffff,#f7f9fc) !important;
        border: 1px solid var(--light-border) !important;
        box-shadow: 0 32px 80px rgba(13,27,42,.18), 0 0 0 1px rgba(255,102,0,.06) !important;
        animation: modalIn .35s cubic-bezier(.16,1,.3,1) both !important;
    }
    .light-theme .modal-card::before {
        background: linear-gradient(90deg,transparent,#ff6600 20%,#0083b0 50%,#ff6600 80%,transparent) !important;
    }
    .light-theme .modal-card::after {
        background: radial-gradient(circle,rgba(255,102,0,.05) 0%,transparent 60%) !important;
    }
    .light-theme .modal-title-nexus {
        background: linear-gradient(135deg,#0d1b2a 0%,#ff6600 100%) !important;
        -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent !important;
    }
    .light-theme .modal-subtitle-nexus {
        background: rgba(255,102,0,.06) !important;
        color: var(--light-text-2) !important;
    }
    .light-theme .nexus-input {
        background: #fff !important;
        border: 1px solid var(--light-border) !important;
        color: #0d1b2a !important;
        box-shadow: 0 1px 3px rgba(13,27,42,.04) !important;
    }
    .light-theme .nexus-input:hover { border-color: rgba(13,27,42,.18) !important; }
    .light-theme .nexus-input:focus {
        border-color: #ff6600 !important;
        background: #fff !important;
        box-shadow: 0 0 0 4px rgba(255,102,0,.12) !important;
    }
    .light-theme .nexus-label { color: var(--light-text-2) !important; }
    .light-theme .btn-nexus-cancel {
        background: #fff !important;
        border-color: var(--light-border) !important;
        color: var(--light-text-2) !important;
    }
    .light-theme .btn-nexus-cancel:hover {
        background: #f7f9fc !important;
        color: #0d1b2a !important;
        border-color: rgba(13,27,42,.18) !important;
    }

    /* CONFIG ACTIONS LIGHT */
    .light-theme .config-action {
        background: linear-gradient(160deg,#ffffff,#f7f9fc) !important;
        border: 1px solid var(--light-border) !important;
        box-shadow: 0 4px 14px rgba(13,27,42,.05) !important;
    }
    .light-theme .config-action:hover {
        background: linear-gradient(160deg,rgba(255,102,0,.08),#fff) !important;
        border-color: rgba(255,102,0,.4) !important;
        box-shadow: 0 12px 32px rgba(255,102,0,.18) !important;
    }
    .light-theme .config-action b { color: #0d1b2a !important; }
    .light-theme .config-action span { color: var(--light-text-2) !important; }

    /* USER ITEMS LIGHT */
    .light-theme .user-item-row {
        background: linear-gradient(160deg,#ffffff,#f7f9fc) !important;
        border: 1px solid var(--light-border) !important;
        box-shadow: 0 2px 8px rgba(13,27,42,.04) !important;
    }
    .light-theme .user-item-row:hover {
        background: linear-gradient(160deg,rgba(255,102,0,.06),#fff) !important;
        border-color: rgba(255,102,0,.3) !important;
    }
    .light-theme .user-item-name { color: #0d1b2a !important; }
    .light-theme .user-item-email { color: var(--light-text-2) !important; }
    .light-theme .user-item-role {
        background: rgba(0,131,176,.08) !important;
        color: #0083b0 !important;
        border: 1px solid rgba(0,131,176,.25) !important;
    }
    .light-theme .btn-delete-user {
        background: rgba(220,38,38,.06) !important;
        border-color: rgba(220,38,38,.25) !important;
        color: #dc2626 !important;
    }
    .light-theme .btn-delete-user:hover {
        background: #dc2626 !important;
        color: #fff !important;
        box-shadow: 0 6px 18px rgba(220,38,38,.35) !important;
    }

    /* SYSTEM BUTTONS LIGHT */
    .light-theme .sys-btn,
    .light-theme .sys-config-btn {
        background: #fff !important;
        color: #374151 !important;
        border: 1px solid var(--light-border) !important;
        box-shadow: 0 1px 3px rgba(13,27,42,.04) !important;
    }
    .light-theme .sys-btn:hover,
    .light-theme .sys-config-btn:hover {
        background: rgba(255,102,0,.06) !important;
        color: #ff6600 !important;
        border-color: rgba(255,102,0,.3) !important;
    }

    /* NODE TREE LIGHT */
    .light-theme .node-item {
        background: rgba(13,27,42,.025) !important;
        color: #4b5563 !important;
    }
    .light-theme .node-item:hover {
        background: rgba(255,102,0,.08) !important;
        color: #1f2937 !important;
    }
    .light-theme .node-client {
        background: linear-gradient(90deg,rgba(255,102,0,.08),rgba(13,27,42,.02)) !important;
    }
    .light-theme .node-title {
        color: #0d1b2a !important;
        text-shadow: none !important;
    }

    /* MOBILE HEADER LIGHT */
    .light-theme .mobile-header {
        background: rgba(255,255,255,.95) !important;
        border-bottom: 1px solid var(--light-border) !important;
        box-shadow: 0 2px 8px rgba(13,27,42,.04) !important;
        backdrop-filter: blur(12px);
    }
    .light-theme .mobile-logo-text { color: #0d1b2a !important; }

    /* FLEET SUMMARY LIGHT */
    .light-theme .fleet-summary-v74 {
        background: linear-gradient(160deg,#ffffff,#f7f9fc) !important;
        border: 1px solid var(--light-border) !important;
        box-shadow: 0 4px 14px rgba(13,27,42,.05) !important;
    }
    .light-theme .fleet-summary-kpi-v74 {
        background: rgba(13,27,42,.025) !important;
        border: 1px solid rgba(13,27,42,.04) !important;
    }

    /* SCROLLBARS — tema laranja/preto em toda a UI */
    * { scrollbar-width: thin; scrollbar-color: rgba(255,102,0,0.28) transparent; }
    ::-webkit-scrollbar { width: 4px; height: 4px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(255,102,0,0.30); border-radius: 99px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(255,102,0,0.58); }
    .light-theme * { scrollbar-color: rgba(255,102,0,0.22) transparent; }
    .light-theme ::-webkit-scrollbar-thumb { background: rgba(255,102,0,0.22); }
    .light-theme ::-webkit-scrollbar-thumb:hover { background: rgba(255,102,0,0.45); }

    /* BRAND LOGO — pulso laranja vivo */
    @keyframes logoPulse {
        0%,100% { box-shadow: 0 0 18px rgba(255,102,0,.28), inset 0 1px 0 rgba(255,255,255,.08); }
        50%      { box-shadow: 0 0 38px rgba(255,102,0,.55), 0 0 60px rgba(255,102,0,.14), inset 0 1px 0 rgba(255,255,255,.12); }
    }
    .brand-logo { animation: logoPulse 3.5s ease-in-out infinite !important; }
    .light-theme .brand-logo { animation: none !important; box-shadow: 0 0 14px rgba(255,102,0,.18) !important; }

    /* SIDEBAR — brilho laranja sutil no rodapé */
    .side-panel::before {
        content: '' !important;
        position: absolute !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
        height: 160px !important;
        background: radial-gradient(ellipse at 50% 100%, rgba(255,102,0,.09) 0%, transparent 70%) !important;
        pointer-events: none !important; z-index: 0 !important;
    }

    /* VEHICLE ATIVO — nome em laranja nítido, borda esquerda com glow */
    .vehicle-btn.active .vehicle-name {
        color: var(--accent) !important;
        text-shadow: 0 0 18px rgba(255,102,0,.55) !important;
    }
    .vehicle-btn.active {
        border-left-color: var(--accent) !important;
        box-shadow: 0 4px 24px rgba(255,102,0,.18), inset 0 1px 0 rgba(255,255,255,.05),
                    -2px 0 0 var(--accent) inset !important;
    }

    /* NODE HOVER — accent strip com glow */
    .node-item:hover::before { box-shadow: 0 0 8px var(--accent) !important; }

    /* TEXT MUTED — contraste levemente melhorado para leitura */
    :root { --text-muted: #6e7e98; }

    /* FLEET SUMMARY TOTAL PILL — glow laranja */
    .fleet-summary-total-v74 {
        box-shadow: 0 0 12px rgba(255,102,0,.2), inset 0 1px 0 rgba(255,255,255,.05) !important;
    }

    /* SYS CONFIG BTN — glow mais presente */
    .sys-config-btn { box-shadow: 0 0 14px rgba(255,102,0,.12) !important; }
    .sys-config-btn:hover { box-shadow: 0 0 28px rgba(255,102,0,.28) !important; }

    /* MQTT ONLINE — pulsação laranja no dot */
    @keyframes mqttDotPulse {
        0%,100% { box-shadow: 0 0 4px 1px rgba(0,230,118,.5); }
        50%      { box-shadow: 0 0 10px 3px rgba(0,230,118,.85); }
    }
    .mqtt-online::before { animation: mqttDotPulse 2s ease-in-out infinite !important; }

    /* SEARCH INPUT — ring laranja no foco mais vivo */
    .search-input:focus {
        border-color: rgba(255,102,0,.6) !important;
        box-shadow: 0 0 0 3px rgba(255,102,0,.12), 0 0 14px rgba(255,102,0,.08) !important;
    }

    /* MAP CONTAINER — borda laranja sutil */
    .map-container {
        border: 1px solid rgba(255,102,0,.14) !important;
        box-shadow: 0 8px 32px rgba(0,0,0,.3), 0 0 0 1px rgba(255,102,0,.06) !important;
    }

    /* ASSET HEADER — accent line top mais laranja */
    .asset-header-bar::before {
        background: linear-gradient(90deg, var(--accent) 0%, rgba(0,210,255,.5) 55%, transparent 100%) !important;
        opacity: 0.55 !important;
    }

    /* ── CHART TOOLTIP ── */
    #chart-tip {
        position: fixed;
        background: rgba(8,8,18,0.97);
        border: 1px solid rgba(255,102,0,0.45);
        border-radius: 10px;
        padding: 9px 14px;
        font-family: 'JetBrains Mono', monospace;
        pointer-events: none;
        z-index: 999999;
        display: none;
        backdrop-filter: blur(18px);
        min-width: 155px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 18px rgba(255,102,0,0.12);
    }
    .chart-tip-date { color: rgba(255,255,255,0.48); font-size: 10px; letter-spacing: 0.3px; }
    .chart-tip-value { color: #ff6600; font-weight: 700; font-size: 15px; margin-top: 4px; }

    /* ── OVERVIEW MAP (hero — todos os caminhões) ── */
    #overview-map {
        pointer-events: none !important;
        background: #060606 !important;
        background-image: none !important;
        opacity: 1 !important;
        animation: none !important;
    }
    #overview-map::after {
        content: '';
        position: absolute; top: 0; left: 0; right: 0; bottom: 0;
        background: linear-gradient(to bottom, rgba(0,0,0,0.42) 0%, rgba(3,3,6,0.62) 100%);
        z-index: 1;
        pointer-events: none;
    }


    .nexus-system-root {
        --bg-workspace:
            radial-gradient(ellipse 65% 50% at 18% 0%, rgba(255, 104, 31, 0.10), transparent 55%),
            radial-gradient(ellipse 55% 45% at 100% 30%, rgba(237, 84, 16, 0.06), transparent 60%),
            radial-gradient(ellipse 75% 60% at 50% 110%, rgba(196, 62, 10, 0.05), transparent 55%),
            linear-gradient(180deg, #0a0a0e 0%, #050507 100%);
        --bg-sidebar: rgba(10, 10, 14, 0.68);
        --bg-main: #0a0a0e;
        --bg-card: rgba(20, 20, 26, 0.62);
        --text-main: #f4f4f6;
        --text-muted: #8a8a96;
        --border-color: rgba(255, 255, 255, 0.06);
        --input-bg: rgba(0, 0, 0, 0.42);
        --accent: #ff681f;
        --accent-2: #ff8a32;
        --accent-3: #ffa566;
        --danger: #e63946;
        --success: #00b87a;
    }
    .nexus-system-root.light-theme {
        --bg-workspace:
            radial-gradient(ellipse 65% 50% at 18% 0%, rgba(255, 104, 31, 0.07), transparent 55%),
            radial-gradient(ellipse 55% 45% at 100% 30%, rgba(237, 84, 16, 0.04), transparent 60%),
            linear-gradient(180deg, #faf9f6 0%, #f5f4ef 100%);
        --bg-sidebar: rgba(255, 255, 255, 0.78);
        --bg-main: #faf9f6;
        --bg-card: rgba(255, 255, 255, 0.92);
        --text-main: #15151a;
        --text-muted: #5b5b66;
        --border-color: rgba(0, 0, 0, 0.08);
        --input-bg: rgba(255, 255, 255, 0.7);
        --danger: #c12d39;
        --success: #008f5a;
    }

    /* —— 2026.2 · Tipografia editorial e font-feature-settings —— */
    .nexus-system-root,
    .nexus-system-root * {
        font-feature-settings: 'cv11', 'ss01', 'ss02';
    }

    /* —— 2026.3 · Workspace e sidebar com glassmorphism profundo —— */
    .nexus-system-root {
        background: var(--bg-workspace) !important;
        background-attachment: fixed !important;
    }
    .nexus-system-root::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        opacity: 0.035;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
        mix-blend-mode: overlay;
    }

    .side-panel {
        backdrop-filter: blur(40px) saturate(1.6) !important;
        -webkit-backdrop-filter: blur(40px) saturate(1.6) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow:
            8px 0 32px rgba(0, 0, 0, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
        position: relative;
    }
    .side-panel::after {
        content: '';
        position: absolute;
        right: -1px; top: 12%;
        width: 1px; height: 76%;
        background: linear-gradient(180deg, transparent, rgba(255, 104, 31, 0.32), transparent);
        pointer-events: none;
    }

    /* —— 2026.4 · Brand header — escultural —— */
    .brand-header {
        padding: 32px 24px 22px !important;
        position: relative;
        overflow: hidden;
    }
    .brand-header::after {
        content: '';
        position: absolute;
        bottom: 0; left: 24px; right: 24px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 104, 31, 0.32), transparent);
    }
    .brand-logo img {
        filter: drop-shadow(0 0 24px rgba(255, 104, 31, 0.35));
        transition: filter 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
    }
    .brand-header:hover .brand-logo img {
        filter: drop-shadow(0 0 32px rgba(255, 104, 31, 0.55));
        transform: scale(1.04);
    }
    .brand-title {
        font-family: 'Inter', sans-serif !important;
        font-weight: 900 !important;
        letter-spacing: 0.18em !important;
        background: linear-gradient(135deg, #fff 0%, #ffb178 80%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
    }
    .brand-subtitle {
        font-family: 'JetBrains Mono', monospace !important;
        letter-spacing: 0.24em !important;
    }

    /* —— 2026.5 · Search input premium —— */
    .search-input {
        height: 42px !important;
        border-radius: 12px !important;
        background: rgba(0, 0, 0, 0.32) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        font-size: 12px !important;
        transition: all 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    .light-theme .search-input { background: rgba(255, 255, 255, 0.7) !important; }
    .search-input:focus {
        border-color: var(--accent) !important;
        background: rgba(0, 0, 0, 0.55) !important;
        box-shadow: 0 0 0 4px rgba(255, 104, 31, 0.14), 0 0 40px -12px rgba(255, 104, 31, 0.32) !important;
    }
    .light-theme .search-input:focus { background: #fff !important; }

    /* —— 2026.6 · Vehicle list — tactile + 3D —— */
    .vehicle-btn {
        position: relative;
        transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1) !important;
        border-radius: 12px !important;
        margin: 4px 8px 4px 32px !important;
        width: calc(100% - 40px) !important;
        padding: 8px 12px 8px 14px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }
    .vehicle-btn:hover {
        transform: translateX(3px);
        background: rgba(255, 104, 31, 0.06) !important;
        color: var(--text-main) !important;
    }
    .vehicle-btn.active {
        background: rgba(255,102,0,0.12) !important;
        border: 1.5px solid rgba(255,102,0,0.55) !important;
        box-shadow: 0 0 18px rgba(255,102,0,0.14) !important;
    }
    .vehicle-btn.active::before { content: none !important; }

    .vehicle-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }
    .vehicle-name {
        font-family: 'JetBrains Mono', monospace !important;
        font-weight: 900 !important;
        font-size: 11px !important;
        letter-spacing: 0.06em !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
    .vehicle-mini {
        display: flex !important;
        gap: 6px !important;
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 9px !important;
        letter-spacing: 0.05em !important;
        line-height: 1 !important;
    }
    .vehicle-mini span {
        white-space: nowrap !important;
        padding: 3px 7px !important;
        border-radius: 999px !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        background: rgba(0,0,0,0.22) !important;
        line-height: 1.2 !important;
    }
    .vehicle-status-pack {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }
    .vehicle-status-text {
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 9px !important;
        font-weight: 800 !important;
        letter-spacing: 0.08em !important;
        text-transform: uppercase !important;
    }

    /* —— 2026.7 · Node items (hierarquia) —— */
    .node-item {
        transition: all 240ms cubic-bezier(0.16, 1, 0.3, 1) !important;
        border-radius: 6px;
        margin: 1px 8px;
    }
    .node-item:hover {
        background: rgba(255, 104, 31, 0.04) !important;
    }
    .node-count-pill {
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        letter-spacing: 0.06em !important;
        padding: 3px 10px !important;
        border-radius: 999px !important;
        border: 1px solid rgba(255, 255, 255, 0.06);
        backdrop-filter: blur(12px);
    }
    .node-count-pill.ok {
        background: rgba(0, 184, 122, 0.12) !important;
        color: var(--success) !important;
        border-color: rgba(0, 184, 122, 0.30);
    }
    .node-count-pill.fault {
        background: rgba(230, 57, 70, 0.12) !important;
        color: var(--danger) !important;
        border-color: rgba(230, 57, 70, 0.32);
        animation: athenaPulseDot 2.4s ease-in-out infinite;
    }

    /* —— 2026.8 · LED com pulse refinado —— */
    .led {
        width: 9px !important;
        height: 9px !important;
        border-radius: 50% !important;
        position: relative;
    }
    .led-on {
        background: var(--success) !important;
        box-shadow: 0 0 10px var(--success), inset 0 0 4px rgba(255, 255, 255, 0.4);
        animation: ledPulse 2.4s ease-in-out infinite;
    }
    .led-off {
        background: rgba(255, 255, 255, 0.18) !important;
        box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
    }
    @keyframes ledPulse {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.65; transform: scale(1.18); }
    }

    /* —— 2026.9 · MQTT status bar —— */
    .mqtt-status-bar {
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 11px !important;
        letter-spacing: 0.16em !important;
        font-weight: 700 !important;
        padding: 12px 24px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        backdrop-filter: blur(20px);
        position: relative;
        overflow: hidden;
    }
    .mqtt-status-bar.mqtt-online {
        background: linear-gradient(90deg, rgba(0, 184, 122, 0.12), rgba(0, 184, 122, 0.04) 70%, transparent) !important;
        color: var(--success) !important;
    }
    .mqtt-status-bar.mqtt-offline {
        background: linear-gradient(90deg, rgba(230, 57, 70, 0.14), rgba(230, 57, 70, 0.04) 70%, transparent) !important;
        color: var(--danger) !important;
    }
    .mqtt-status-bar::after {
        content: '';
        position: absolute;
        bottom: 0; left: 0;
        height: 1px;
        width: 30%;
        background: linear-gradient(90deg, transparent, currentColor, transparent);
        animation: athenaScan 5s linear infinite;
        opacity: 0.5;
    }

    /* —— 2026.10 · Hero shell — dramático e cinematográfico —— */
    .nexus-hero-shell {
        position: relative;
        overflow: hidden;
    }
    .nexus-hero-title {
        font-family: 'Inter', sans-serif !important;
        font-weight: 900 !important;
        font-size: clamp(64px, 11vw, 168px) !important;
        line-height: 0.88 !important;
        letter-spacing: -0.06em !important;
        background: linear-gradient(180deg,
            #ffffff 0%,
            #ffd9b5 38%,
            #ff8a32 68%,
            #ff681f 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
        text-shadow: none !important;
        animation: athenaFadeUp 720ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
        filter: drop-shadow(0 8px 48px rgba(255, 104, 31, 0.25));
    }
    .nexus-hero-subtitle {
        font-family: 'JetBrains Mono', monospace !important;
        letter-spacing: 0.4em !important;
        font-size: clamp(10px, 0.9vw, 13px) !important;
        font-weight: 700 !important;
        color: rgba(255, 255, 255, 0.55) !important;
        animation: athenaFadeUp 900ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
        animation-delay: 120ms !important;
    }
    .light-theme .nexus-hero-subtitle { color: rgba(0, 0, 0, 0.55) !important; }

    /* —— 2026.11 · Global dashboard cards — 3D parallax sutil —— */
    .global-dashboard {
        animation: athenaFadeUp 800ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
        animation-delay: 240ms !important;
    }
    .global-kpi-card {
        position: relative;
        backdrop-filter: blur(28px) saturate(1.6) !important;
        -webkit-backdrop-filter: blur(28px) saturate(1.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        background: rgba(20, 20, 26, 0.55) !important;
        box-shadow:
            0 12px 32px rgba(0, 0, 0, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.04),
            0 0 60px -20px rgba(255, 104, 31, 0.10) !important;
        transform-style: preserve-3d;
        transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 360ms cubic-bezier(0.16, 1, 0.3, 1) !important;
        will-change: transform;
        overflow: hidden !important;
    }
    .global-kpi-card::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 104, 31, 0.55), transparent);
        opacity: 0.6;
    }
    .global-kpi-card::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 35%);
        pointer-events: none;
        border-radius: inherit;
    }
    .global-kpi-card:hover {
        transform: perspective(1200px) rotateX(2deg) rotateY(-1.5deg) translateY(-6px) !important;
        box-shadow:
            0 32px 64px rgba(0, 0, 0, 0.55),
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            0 0 100px -16px rgba(255, 104, 31, 0.28) !important;
    }
    .light-theme .global-kpi-card {
        background: rgba(255, 255, 255, 0.82) !important;
        border: 1px solid rgba(0, 0, 0, 0.06) !important;
        box-shadow:
            0 12px 32px rgba(20, 20, 30, 0.10),
            inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    }

    /* —— 2026.12 · Asset header bar (cabeçalho do veículo) —— */
    .asset-header-bar {
        backdrop-filter: blur(24px) saturate(1.5) !important;
        -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
        background: rgba(20, 20, 26, 0.62) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-left: 3px solid var(--accent) !important;
        border-radius: 16px !important;
        box-shadow:
            0 16px 40px rgba(0, 0, 0, 0.50),
            inset 0 1px 0 rgba(255, 255, 255, 0.04),
            0 0 60px -24px rgba(255, 104, 31, 0.18) !important;
        animation: athenaFadeUp 600ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
        position: relative;
        overflow: hidden;
    }
    .asset-header-bar::after {
        content: '';
        position: absolute;
        top: 0; left: 0;
        width: 30%; height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 104, 31, 0.55), transparent);
        animation: athenaScan 5s linear infinite;
    }
    .light-theme .asset-header-bar {
        background: rgba(255, 255, 255, 0.92) !important;
        border-color: rgba(0, 0, 0, 0.06) !important;
    }
    .asset-id {
        font-family: 'Inter', sans-serif !important;
        font-weight: 900 !important;
        letter-spacing: -0.02em !important;
        background: linear-gradient(135deg, #fff 0%, #ffb178 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
    }
    .light-theme .asset-id {
        background: linear-gradient(135deg, #15151a 0%, #ed5410 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
    }
    .asset-tag {
        font-family: 'JetBrains Mono', monospace !important;
        text-transform: uppercase !important;
        letter-spacing: 0.24em !important;
        color: var(--accent-2) !important;
        position: relative;
        padding-left: 18px !important;
    }
    .asset-tag::before {
        content: '';
        position: absolute;
        left: 0; top: 50%;
        width: 12px; height: 1px;
        background: var(--accent);
        transform: translateY(-50%);
    }
    .asset-meta {
        font-family: 'JetBrains Mono', monospace !important;
        letter-spacing: 0.06em !important;
        color: var(--text-muted) !important;
    }
    .status-badge {
        backdrop-filter: blur(12px);
        background: rgba(0, 0, 0, 0.42) !important;
        border-radius: 999px !important;
        padding: 6px 14px !important;
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 10.5px !important;
        letter-spacing: 0.14em !important;
        font-weight: 700 !important;
    }
    .light-theme .status-badge { background: rgba(255, 255, 255, 0.7) !important; }

    /* —— 2026.13 · Botões do header do ativo —— */
    .btn-report-stealth, .btn-edit-stealth, .btn-delete-stealth {
        font-family: 'Inter', sans-serif !important;
        font-weight: 700 !important;
        letter-spacing: 0.08em !important;
        text-transform: uppercase !important;
        font-size: 11.5px !important;
        padding: 10px 18px !important;
        border-radius: 999px !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        background: rgba(0, 0, 0, 0.32) !important;
        color: var(--text-main) !important;
        cursor: pointer !important;
        transition: all 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
        backdrop-filter: blur(12px);
    }
    .light-theme .btn-report-stealth,
    .light-theme .btn-edit-stealth,
    .light-theme .btn-delete-stealth {
        background: rgba(255, 255, 255, 0.7) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
    }
    .btn-report-stealth:hover, .btn-edit-stealth:hover {
        border-color: rgba(255, 104, 31, 0.40) !important;
        background: rgba(255, 104, 31, 0.08) !important;
        color: var(--accent-3) !important;
        transform: translateY(-1px);
        box-shadow: 0 8px 24px -8px rgba(255, 104, 31, 0.32);
    }
    .btn-delete-stealth:hover {
        background: var(--danger) !important;
        color: #fff !important;
        border-color: var(--danger) !important;
    }

    /* —— 2026.14 · System actions (sidebar bottom) —— */
    .sys-btn {
        font-family: 'Inter', sans-serif !important;
        font-weight: 700 !important;
        letter-spacing: 0.10em !important;
        text-transform: uppercase !important;
        font-size: 11px !important;
        border-radius: 12px !important;
        padding: 12px 16px !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        background: rgba(0, 0, 0, 0.32) !important;
        color: var(--text-muted) !important;
        cursor: pointer !important;
        transition: all 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    .light-theme .sys-btn {
        background: rgba(255, 255, 255, 0.7) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
    }
    .sys-btn:hover {
        background: rgba(255, 104, 31, 0.08) !important;
        border-color: rgba(255, 104, 31, 0.28) !important;
        color: var(--text-main) !important;
        transform: translateY(-1px);
    }
    .sys-config-btn {
        background: linear-gradient(135deg, rgba(255, 138, 50, 0.12), rgba(255, 104, 31, 0.06)) !important;
        color: var(--accent-3) !important;
        border-color: rgba(255, 104, 31, 0.24) !important;
    }
    .sys-config-btn:hover {
        background: var(--grad-ember) !important;
        color: #fff !important;
        box-shadow: 0 12px 28px -8px rgba(255, 104, 31, 0.45);
    }

    /* —— 2026.15 · Modais — backdrop deep + card escultural —— */
    .modal-overlay {
        backdrop-filter: blur(16px) saturate(1.4) !important;
        -webkit-backdrop-filter: blur(16px) saturate(1.4) !important;
        background: rgba(5, 5, 7, 0.62) !important;
        animation: athenaFadeIn 320ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    .light-theme .modal-overlay { background: rgba(247, 246, 241, 0.55) !important; }

    .modal-card {
        background: rgba(20, 20, 26, 0.92) !important;
        backdrop-filter: blur(40px) saturate(1.6);
        -webkit-backdrop-filter: blur(40px) saturate(1.6);
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-top: 3px solid var(--accent) !important;
        border-radius: 24px !important;
        box-shadow:
            0 40px 96px rgba(0, 0, 0, 0.65),
            inset 0 1px 0 rgba(255, 255, 255, 0.06),
            0 0 80px -20px rgba(255, 104, 31, 0.22) !important;
        animation: athenaScaleIn 400ms cubic-bezier(0.34, 1.56, 0.64, 1) !important;
        position: relative;
        overflow: hidden;
    }
    .modal-card::before {
        content: '';
        position: absolute;
        top: 3px; left: 0; right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    }
    .light-theme .modal-card {
        background: rgba(255, 255, 255, 0.97) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
        box-shadow:
            0 40px 96px rgba(20, 20, 30, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            0 0 80px -20px rgba(255, 104, 31, 0.18) !important;
    }

    .modal-title-nexus {
        font-family: 'Inter', sans-serif !important;
        font-weight: 800 !important;
        letter-spacing: -0.01em !important;
    }
    .modal-subtitle-nexus {
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 10.5px !important;
        letter-spacing: 0.18em !important;
        text-transform: uppercase !important;
        opacity: 0.7;
    }

    /* —— 2026.16 · Botões dos modais e formulários —— */
    .btn-nexus-save, .btn-nexus-cancel {
        font-family: 'Inter', sans-serif !important;
        font-weight: 800 !important;
        letter-spacing: 0.10em !important;
        text-transform: uppercase !important;
        font-size: 12px !important;
        padding: 12px 24px !important;
        border-radius: 999px !important;
        cursor: pointer !important;
        transition: all 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
        position: relative;
        overflow: hidden;
    }
    .btn-nexus-save {
        background: var(--grad-ember) !important;
        color: #fff !important;
        border: none !important;
        box-shadow: 0 8px 24px -8px rgba(255, 104, 31, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
    .btn-nexus-save:hover {
        transform: translateY(-2px);
        filter: brightness(1.08);
        box-shadow: 0 16px 40px -8px rgba(255, 104, 31, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    .btn-nexus-cancel {
        background: transparent !important;
        color: var(--text-muted) !important;
        border: 1px solid rgba(255, 255, 255, 0.10) !important;
    }
    .btn-nexus-cancel:hover {
        color: var(--text-main) !important;
        border-color: rgba(255, 255, 255, 0.24) !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }
    .light-theme .btn-nexus-cancel { border-color: rgba(0, 0, 0, 0.10) !important; }
    .light-theme .btn-nexus-cancel:hover { background: rgba(0, 0, 0, 0.04) !important; }

    /* —— 2026.17 · Inputs nexus —— */
    .nexus-input, .nexus-select, .nexus-textarea {
        background: rgba(0, 0, 0, 0.42) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 12px !important;
        padding: 11px 16px !important;
        color: var(--text-main) !important;
        font-family: 'Inter', sans-serif !important;
        font-size: 13px !important;
        transition: all 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
        outline: none !important;
    }
    .light-theme .nexus-input,
    .light-theme .nexus-select,
    .light-theme .nexus-textarea {
        background: rgba(255, 255, 255, 0.7) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
    }
    .nexus-input:focus, .nexus-select:focus, .nexus-textarea:focus {
        border-color: var(--accent) !important;
        background: rgba(0, 0, 0, 0.62) !important;
        box-shadow: 0 0 0 4px rgba(255, 104, 31, 0.14), 0 0 32px -12px rgba(255, 104, 31, 0.32) !important;
    }
    .light-theme .nexus-input:focus,
    .light-theme .nexus-select:focus,
    .light-theme .nexus-textarea:focus { background: #fff !important; }

    .nexus-label {
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        letter-spacing: 0.18em !important;
        text-transform: uppercase !important;
        color: var(--text-muted) !important;
        margin-bottom: 8px !important;
        display: block;
    }

    /* —— 2026.18 · Map container —— */
    .map-container {
        border-radius: 20px !important;
        overflow: hidden !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow:
            0 24px 56px rgba(0, 0, 0, 0.55),
            inset 0 1px 0 rgba(255, 255, 255, 0.04),
            0 0 80px -32px rgba(255, 104, 31, 0.18) !important;
        animation: athenaFadeUp 700ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
        animation-delay: 80ms !important;
    }
    .light-theme .map-container { border-color: rgba(0, 0, 0, 0.08) !important; }

    .gps-only-map-notice {
        background: rgba(20, 20, 26, 0.78) !important;
        backdrop-filter: blur(20px) saturate(1.5);
        -webkit-backdrop-filter: blur(20px) saturate(1.5);
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 14px !important;
        padding: 14px 16px !important;
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 11px !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
    }
    .light-theme .gps-only-map-notice {
        background: rgba(255, 255, 255, 0.92) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
        color: #15151a !important;
    }

    /* —— 2026.19 · Fleet section title (sidebar) —— */
    .fleet-section-title {
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        letter-spacing: 0.28em !important;
        text-transform: uppercase !important;
        color: rgba(255,255,255,0.80) !important;
        padding: 14px 24px 10px !important;
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .fleet-section-title::after {
        content: '';
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, rgba(255, 104, 31, 0.32), transparent);
    }

    /* —— 2026.20 · Mobile header (visível em telas pequenas) —— */
    .mobile-header {
        backdrop-filter: blur(24px) saturate(1.5) !important;
        -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
        background: rgba(10, 10, 14, 0.78) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    .light-theme .mobile-header {
        background: rgba(255, 255, 255, 0.85) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
    }

    /* —— 2026.21 · Animações compartilhadas —— */
    @keyframes athenaFadeUp {
        from { opacity: 0; transform: translateY(20px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes athenaFadeIn {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
    @keyframes athenaScaleIn {
        from { opacity: 0; transform: scale(0.94); }
        to   { opacity: 1; transform: scale(1); }
    }
    @keyframes athenaScan {
        0%   { transform: translateX(-100%); }
        100% { transform: translateX(330%); }
    }
    @keyframes athenaPulseDot {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.5; transform: scale(1.18); }
    }

    /* —— 2026.22 · Scroll behavior —— */
    .vehicle-list-container {
        scrollbar-color: rgba(255, 104, 31, 0.45) transparent;
        scrollbar-width: thin;
    }
    .vehicle-list-container::-webkit-scrollbar { width: 6px; }
    .vehicle-list-container::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, rgba(255, 104, 31, 0.55), rgba(255, 104, 31, 0.20));
        border-radius: 999px;
    }

    /* —— 2026.23 · Responsividade fluida —— */
    @media (max-width: 1280px) {
        .side-panel { width: 296px !important; }
        .vehicle-btn { padding-left: 60px !important; }
    }
    @media (max-width: 980px) {
        .nexus-hero-title { font-size: clamp(48px, 12vw, 96px) !important; }
        .global-dashboard {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 14px !important;
        }
    }
    @media (max-width: 640px) {
        .nexus-hero-title { font-size: clamp(40px, 14vw, 72px) !important; }
        .nexus-hero-subtitle { font-size: 10px !important; letter-spacing: 0.32em !important; }
        .global-dashboard {
            grid-template-columns: 1fr !important;
        }
        .asset-header-bar {
            border-radius: 14px !important;
            padding: 16px 20px !important;
        }
        .modal-card {
            border-radius: 18px !important;
            margin: 16px !important;
            max-width: calc(100vw - 32px) !important;
        }
    }

    /* —— 2026.24 · MODO CLARO IMPECÁVEL — overrides finais —— */
    .light-theme .side-panel {
        background: rgba(255, 255, 255, 0.78) !important;
        border-right-color: rgba(0, 0, 0, 0.06) !important;
        box-shadow:
            8px 0 32px rgba(20, 20, 30, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    }
    .light-theme .brand-title {
        background: linear-gradient(135deg, #15151a 0%, #ed5410 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
    }
    .light-theme .vehicle-btn:hover { background: rgba(255, 104, 31, 0.06) !important; }
    .light-theme .vehicle-btn.active {
        background: linear-gradient(90deg, rgba(255, 104, 31, 0.14), rgba(255, 104, 31, 0.04) 60%, transparent) !important;
        color: var(--accent) !important;
    }
    .light-theme .led-off { background: rgba(0, 0, 0, 0.18) !important; }
    .light-theme .nexus-hero-title {
        background: linear-gradient(180deg,
            #15151a 0%,
            #ed5410 60%,
            #c43e0a 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
        filter: drop-shadow(0 4px 16px rgba(255, 104, 31, 0.18));
    }
    .light-theme .asset-id {
        background: linear-gradient(135deg, #15151a 0%, #ed5410 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
    }

    /* ───────────────────────────────────────────────────────────────────
       MODO CLARO 2026-06 — HERO SHELL + MAPA OVERVIEW (fix definitivo).
       Havia ~5 definicoes conflitantes de .nexus-hero-shell espalhadas no
       arquivo + o #overview-map (Leaflet decorativo) pintando preto quando
       tiles nao carregam. Resultado: o splash gigante "ATHENA" ficava com
       fundo preto mesmo no modo claro.
       Prefixo .nexus-system-root.light-theme (0,3,0) vence as regras
       .light-theme .nexus-hero-shell (0,2,0) anteriores. O fundo do mapa
       eh forcado claro pra cobrir o caso de tiles falhando. */
    .nexus-system-root.light-theme .nexus-hero-shell {
        background: linear-gradient(160deg, #ffffff 0%, #f4f7fb 100%) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 16px 48px rgba(13, 27, 42, 0.08), 0 2px 8px rgba(13, 27, 42, 0.04) !important;
    }
    .nexus-system-root.light-theme .nexus-hero-inner { background: transparent !important; }
    .nexus-system-root.light-theme #overview-map,
    .nexus-system-root.light-theme .nexus-hero-shell .leaflet-container {
        background: #f4f7fb !important;   /* base clara — tiles pintam por cima quando carregam */
    }
    /* O mapa overview eh DECORATIVO. No modo claro, tiles satelite/dark deixavam
       o splash cinza-muddy. Reduz opacidade pra o shell branco dominar e o
       logo ATHENA laranja se destacar — visual limpo. */
    .nexus-system-root.light-theme #overview-map {
        opacity: 0.22 !important;
    }

    /* Print friendly — relatórios PDF preservam visual original */
    @media print {
        .side-panel, .mqtt-status-bar, .asset-actions, .system-actions { display: none !important; }
        .global-kpi-card, .asset-header-bar, .modal-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; }
        body::before, body::after { display: none !important; }
    }

/* ───────────────────────────────────────────────────────────────────
   CHAT LATERAL ATHENA — Gemma 2 2B local no navegador (WebGPU).
   Posição fixa canto inferior direito. Não interfere no resto do layout.
   ─────────────────────────────────────────────────────────────────── */
.athena-chat-toggle {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 2147483001 !important;  /* acima do painel */
    background: linear-gradient(135deg, #ff6600 0%, #ff8833 100%);
    color: #fff;
    border-radius: 50px;
    padding: 12px 18px;
    box-shadow: 0 8px 24px rgba(255,102,0,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 11px;
    transition: transform .2s ease, box-shadow .2s ease;
    user-select: none;
}
.athena-chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,102,0,0.55); }
.athena-chat-toggle.open { padding: 10px 14px; background: rgba(255,255,255,0.1); color: #fff; box-shadow: none; }
.athena-chat-toggle-lbl { font-family: 'Inter', sans-serif; }

.athena-chat-panel {
    /* IMPORTANT: usar !important nos posicionamentos pra ganhar de qualquer
       herança/scoped style (ex.: algum ancestor com transform/filter que
       transformaria position:fixed em relativo). Background sólido (sem
       backdrop-filter) elimina classes de bugs em certos drivers GPU. */
    position: fixed !important;
    right: 20px !important;
    bottom: 78px !important;
    width: 380px;
    height: 540px;
    z-index: 2147483000 !important;  /* top da pilha de inteiros 32-bit */
    background: #15171c;
    border: 1px solid rgba(255,102,0,0.35);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: #e8e8e8;
}

/* ═══════════════════════════════════════════════════════════════════
   MODO CLARO 2026-06 — gaps finais (auditoria exaustiva via workflow).
   Topbar de status, tooltip do grafico, painel de chat, pills da sidebar.
   ═══════════════════════════════════════════════════════════════════ */
.light-theme .athena-topbar {
    background: linear-gradient(180deg, #ffffff 0%, #f3f5f9 100%) !important;
    border-color: rgba(0,0,0,0.08) !important;
}
.light-theme .atb-title { color: #15151a !important; }
.light-theme .atb-sub   { color: rgba(0,0,0,0.50) !important; }
.light-theme .atb-chip,
.light-theme .atb-chip-neutral {
    color: rgba(0,0,0,0.70) !important;
    background: rgba(0,0,0,0.04) !important;
}
.light-theme .atb-chip:hover { color: #15151a !important; background: rgba(0,0,0,0.07) !important; }

.light-theme #chart-tip {
    background: rgba(255,255,255,0.97) !important;
    border-color: rgba(0,0,0,0.10) !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15) !important;
    color: #15151a !important;
}
.light-theme .chart-tip-date { color: rgba(0,0,0,0.50) !important; }

.light-theme .athena-chat-input  { background: rgba(0,0,0,0.04) !important; }
.light-theme .athena-chat-footer { background: rgba(0,0,0,0.03) !important; color: rgba(0,0,0,0.55) !important; }
.light-theme .athena-chat-empty  { color: rgba(0,0,0,0.50) !important; }

.light-theme .node-count-pill   { background: rgba(0,0,0,0.05) !important; }
.light-theme .vehicle-mini span { background: rgba(0,0,0,0.05) !important; }
.light-theme .athena-chat-panel { background: #ffffff; border-color: rgba(255,102,0,0.3); color: #111; }

.athena-chat-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,102,0,0.08), transparent);
}
.athena-chat-title { font-size: 13px; font-weight: 900; letter-spacing: 1.5px; color: #ff8833; text-transform: uppercase; }
.athena-chat-sub { font-size: 9px; font-weight: 700; letter-spacing: 1px; margin-top: 4px; color: #888; text-transform: uppercase; }

.athena-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.athena-chat-body::-webkit-scrollbar { width: 6px; }
.athena-chat-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.athena-chat-empty {
    color: #aaa;
    font-size: 12px;
    line-height: 1.6;
    padding: 20px 8px;
    text-align: left;
}

.athena-chat-msg { display: flex; flex-direction: column; gap: 4px; }
.athena-chat-msg.user { align-items: flex-end; }
.athena-chat-msg.ia   { align-items: flex-start; }
.athena-chat-bubble {
    max-width: 86%;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.55;
    word-wrap: break-word;
}
.athena-chat-msg.user .athena-chat-bubble {
    background: linear-gradient(135deg, #ff6600, #ff8833);
    color: #fff;
    border-bottom-right-radius: 3px;
}
.athena-chat-msg.ia .athena-chat-bubble {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e8e8e8;
    border-bottom-left-radius: 3px;
}
.light-theme .athena-chat-msg.ia .athena-chat-bubble { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #222; }

.athena-chat-feedback { display: flex; gap: 6px; margin-top: 2px; }
.athena-chat-feedback button {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #888;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
}
.athena-chat-feedback button:hover { background: rgba(255,102,0,0.15); color: #ff8833; border-color: rgba(255,102,0,0.3); }
.athena-chat-feedback-ok { font-size: 9px; color: #00aa44; margin-top: 2px; font-weight: 700; }

.athena-chat-typing { display: inline-flex; gap: 4px; align-items: center; }
.athena-chat-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: #888;
    animation: athenaTyping 1.2s infinite ease-in-out;
}
.athena-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.athena-chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes athenaTyping { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

.athena-chat-input {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.3);
}
.athena-chat-input input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
.athena-chat-input input:focus { border-color: rgba(255,102,0,0.5); background: rgba(255,255,255,0.08); }
.athena-chat-input input:disabled { opacity: 0.5; }
.athena-chat-input button {
    background: linear-gradient(135deg, #ff6600, #ff8833);
    border: none;
    color: #fff;
    width: 44px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 900;
    font-size: 14px;
    transition: transform .12s ease;
}
.athena-chat-input button:hover:not(:disabled) { transform: scale(1.05); }
.athena-chat-input button:disabled { opacity: 0.4; cursor: not-allowed; }
.light-theme .athena-chat-input input { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); color: #111; }

.athena-chat-footer {
    padding: 6px 12px 10px;
    font-size: 9px;
    color: #888;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
}

/* ──────────────────────────────────────────────────────────────────
   ALERTAS PROATIVOS — toasts hiper modernos no canto superior direito.
   2 níveis: WARN (âmbar) e CRITICAL (vermelho). Glow, gradiente, pulse
   na borda esquerda, animação slide-in vinda da direita.
   ────────────────────────────────────────────────────────────────── */
/* 2026-06: card compacto + modo rotativo (1 ativo por vez, 2s TTL). */
.athena-alert-stack {
    position: fixed !important;
    top: 80px;
    right: 20px;
    width: 280px;
    max-width: calc(100vw - 40px);
    z-index: 2147483600 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.athena-alert {
    pointer-events: auto;
    position: relative;
    display: grid;
    grid-template-columns: 24px 1fr 18px;
    gap: 8px;
    padding: 8px 8px 8px 12px;
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #f4f4f6;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow:
        0 12px 30px -8px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,255,255,0.08) inset;
    animation: athenaAlertSlideIn 0.30s cubic-bezier(0.2, 0.9, 0.25, 1.05);
    transform-origin: right center;
}
@keyframes athenaAlertSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(0.96); }
    to   { opacity: 1; transform: translateX(0)    scale(1); }
}
.athena-alert-warn {
    background: linear-gradient(135deg, rgba(60,40,15,0.94) 0%, rgba(30,18,8,0.96) 100%);
    border: 1px solid rgba(255,176,67,0.45);
    box-shadow:
        0 20px 50px -10px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,176,67,0.18) inset,
        0 0 32px -4px rgba(255,176,67,0.25);
}
.athena-alert-critical {
    background: linear-gradient(135deg, rgba(72,18,18,0.95) 0%, rgba(36,8,8,0.97) 100%);
    border: 1px solid rgba(255,71,87,0.55);
    box-shadow:
        0 20px 50px -10px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,71,87,0.22) inset,
        0 0 38px -4px rgba(255,71,87,0.4);
    animation: athenaAlertSlideIn 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.05),
               athenaAlertShake 0.45s 0.35s ease-in-out;
}
@keyframes athenaAlertShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-2px); }
    75%      { transform: translateX(2px); }
}

/* Pulse na borda esquerda — barra vertical animada */
.athena-alert-pulse {
    position: absolute;
    left: 0; top: 0; bottom: 0; width: 3px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    animation: athenaAlertPulse 2.2s ease-in-out infinite;
}
.athena-alert-warn .athena-alert-pulse {
    background: linear-gradient(180deg, #ffb043 0%, #ff8c1a 100%);
    box-shadow: 0 0 18px rgba(255,176,67,0.7);
}
.athena-alert-critical .athena-alert-pulse {
    background: linear-gradient(180deg, #ff4757 0%, #c41e3a 100%);
    box-shadow: 0 0 22px rgba(255,71,87,0.85);
}
@keyframes athenaAlertPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}

.athena-alert-icon {
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 0 5px currentColor);
}
.athena-alert-warn .athena-alert-icon { color: #ffb043; }
.athena-alert-critical .athena-alert-icon { color: #ff4757; }

.athena-alert-body { min-width: 0; }
.athena-alert-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.athena-alert-badge {
    font-size: 7.5px; font-weight: 900; letter-spacing: 1px;
    padding: 1px 5px; border-radius: 3px;
    text-transform: uppercase;
}
.athena-alert-warn .athena-alert-badge {
    background: rgba(255,176,67,0.18); color: #ffd089;
    border: 1px solid rgba(255,176,67,0.35);
}
.athena-alert-critical .athena-alert-badge {
    background: rgba(255,71,87,0.22); color: #ffb0b7;
    border: 1px solid rgba(255,71,87,0.45);
}
.athena-alert-truck {
    font-size: 9.5px; font-weight: 800; color: rgba(255,255,255,0.9);
    text-transform: uppercase; letter-spacing: 0.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.athena-alert-title {
    font-size: 10.5px; font-weight: 700; color: #fff;
    margin-bottom: 2px;
}
.athena-alert-numbers {
    display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    margin-bottom: 2px;
}
.athena-alert-now {
    font-size: 13px; font-weight: 900;
}
.athena-alert-warn .athena-alert-now { color: #ffd089; }
.athena-alert-critical .athena-alert-now { color: #ffb0b7; }
.athena-alert-arrow {
    font-size: 11px; opacity: 0.75;
}
.athena-alert-base {
    font-size: 9px; color: rgba(255,255,255,0.55);
}
.athena-alert-foot {
    font-size: 8.5px; color: rgba(255,255,255,0.5);
    letter-spacing: 0.2px;
}

.athena-alert-close {
    background: transparent; border: none; color: rgba(255,255,255,0.4);
    width: 18px; height: 18px; border-radius: 50%;
    cursor: pointer; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease;
    align-self: start;
    padding: 0;
}
.athena-alert-close:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.95);
    transform: scale(1.1);
}

/* Tema claro — ajustes */
.light-theme .athena-alert-warn {
    background: linear-gradient(135deg, #fff8ec 0%, #fff1d6 100%);
    color: #4a2a06;
}
.light-theme .athena-alert-critical {
    background: linear-gradient(135deg, #fff0f1 0%, #ffd9dd 100%);
    color: #4a0612;
}
.light-theme .athena-alert-warn .athena-alert-now    { color: #b35a00; }
.light-theme .athena-alert-critical .athena-alert-now { color: #b3001b; }
.light-theme .athena-alert-truck    { color: rgba(0,0,0,0.85); }
.light-theme .athena-alert-title    { color: #0d0d0f; }
.light-theme .athena-alert-base,
.light-theme .athena-alert-foot     { color: rgba(0,0,0,0.55); }
.light-theme .athena-alert-close    { color: rgba(0,0,0,0.45); }
.light-theme .athena-alert-close:hover { background: rgba(0,0,0,0.06); color: #000; }

/* Mobile: alerta full-width no topo */
@media (max-width: 640px) {
    .athena-alert-stack {
        top: 10px; right: 10px; left: 10px;
        width: auto;
    }
}
