/*
 * XLX026 — ATIVIDADE 24H V1
 * Igualação visual com página Conectados.
 * Escopo exclusivo: página Ao vivo / histórico.
 */


/* ==========================================================
   TITULO
   Conectados usa page-heading h1 = 34px.
   ========================================================== */

body[data-page="ao-vivo"]
.history-title-connected-size{
    font-size:34px !important;
}


/* ==========================================================
   TABELA
   Mesmo padrão-base da tabela Conectados.
   ========================================================== */

html body[data-page="ao-vivo"]
table.home-history th{
    font-size:11px !important;
}

html body[data-page="ao-vivo"]
table.home-history td{
    font-size:13px !important;
}


/* Links e protocolo acompanham o tamanho da célula. */

html body[data-page="ao-vivo"]
table.home-history td > a,

html body[data-page="ao-vivo"]
table.home-history td > .protocol{
    font-size:inherit !important;
}


/* ==========================================================
   NUMERACAO + BANDEIRA
   Reserva espaço suficiente até para 40.10 etc.
   ========================================================== */

html body[data-page="ao-vivo"]
table.home-history
.history-row-country{
    display:inline-flex !important;
    align-items:center !important;
    gap:5px !important;
    white-space:nowrap !important;
}

html body[data-page="ao-vivo"]
table.home-history
.history-row-number{
    display:inline-block !important;

    min-width:34px !important;

    text-align:right !important;

    font-size:inherit !important;
    font-weight:800 !important;

    line-height:1 !important;

    color:#9edff0 !important;

    font-variant-numeric:
        tabular-nums !important;
}


/* Subatividades ficam visualmente relacionadas ao principal. */

html body[data-page="ao-vivo"]
table.home-history
.history-previous-row
.history-row-number{
    color:#72cfe7 !important;
}


/* ==========================================================
   CELULAR
   Mesmo comportamento responsivo do título Conectados.
   ========================================================== */

@media(max-width:720px){

    body[data-page="ao-vivo"]
    .history-title-connected-size{
        font-size:28px !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history td{
        font-size:12px !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history
    .history-row-number{
        min-width:31px !important;
    }
}

/*
 * ==========================================================
 * XLX026 — AJUSTE DE LARGURA DA TABELA 24H V1
 *
 * Mantém as nove colunas dentro da largura do painel.
 * Aplicado somente à página Ao Vivo e somente em telas
 * onde a tabela usa a apresentação horizontal.
 * ==========================================================
 */

@media (min-width:821px){

    html body[data-page="ao-vivo"]
    .dashboard-main .table-wrap{
        width:100% !important;
        max-width:100% !important;
        overflow-x:hidden !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        table-layout:fixed !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history th,
    html body[data-page="ao-vivo"]
    table.home-history td{
        box-sizing:border-box !important;
        padding-left:6px !important;
        padding-right:6px !important;
        min-width:0 !important;
    }

    /* País */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(1),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(1){
        width:9% !important;
    }

    /* Horário */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(2),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(2){
        width:9% !important;
        white-space:nowrap !important;
    }

    /* Indicativo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(3),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(3){
        width:13% !important;
        white-space:nowrap !important;
    }

    /* Operador */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(4),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(4){
        width:25% !important;
        overflow-wrap:anywhere !important;
    }

    /* Cidade */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(5),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(5){
        width:16% !important;
        overflow-wrap:anywhere !important;
    }

    /* Protocolo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(6),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6){
        width:10% !important;
        text-align:center !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6) .protocol{
        max-width:100% !important;
        white-space:normal !important;
        overflow-wrap:normal !important;
        word-break:normal !important;
        line-height:1.15 !important;
    }

    /* Módulo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(7),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7){
        width:5% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* Duração */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(8),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8){
        width:7% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* Status */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(9),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(9){
        width:6% !important;
        text-align:center !important;
        white-space:nowrap !important;
        overflow:visible !important;
    }
}

/*
 * XLX026_GATEWAY_COLUMN_V4
 *
 * Somente /ao-vivo.
 * Dez colunas.
 * O bloco fica por último para prevalecer sobre
 * a distribuição anterior de nove colunas.
 */

@media (min-width:821px){

    html body[data-page="ao-vivo"] table.home-history{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        table-layout:fixed !important;
    }

    html body[data-page="ao-vivo"] table.home-history th,
    html body[data-page="ao-vivo"] table.home-history td{
        box-sizing:border-box !important;
        min-width:0 !important;
        padding-left:6px !important;
        padding-right:6px !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(1),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(1){
        width:8% !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(2),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(2){
        width:8% !important;
        white-space:nowrap !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(3),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(3){
        width:11% !important;
        white-space:nowrap !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(4),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(4){
        width:18% !important;
        overflow-wrap:anywhere !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(5),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(5){
        width:14% !important;
        overflow-wrap:anywhere !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(6),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(6){
        width:10% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(7),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(7){
        width:12% !important;
        text-align:center !important;
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(7) .protocol{
        max-width:100% !important;
        white-space:normal !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(8),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(8){
        width:5% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(9),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(9){
        width:7% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    html body[data-page="ao-vivo"] table.home-history th:nth-child(10),
    html body[data-page="ao-vivo"] table.home-history td:nth-child(10){
        width:7% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }
}

@media (max-width:820px){

    html body[data-page="ao-vivo"] table.home-history td:nth-child(1)::before{
        content:"País";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(2)::before{
        content:"Horário";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(3)::before{
        content:"Indicativo";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(4)::before{
        content:"Operador";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(5)::before{
        content:"Cidade";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(6)::before{
        content:"Gateway";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(7)::before{
        content:"Protocolo";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(8)::before{
        content:"Módulo";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(9)::before{
        content:"Duração";
    }

    html body[data-page="ao-vivo"] table.home-history td:nth-child(10)::before{
        content:"Status";
    }
}

/*
 * ==========================================================
 * XLX026_LAYOUT_HOTSPOT_V5
 *
 * Atividade das últimas 24 horas:
 *
 * 1 Status
 * 2 Indicativo
 * 3 Nome
 * 4 Hotspot / Repetidora
 * 5 Cidade
 * 6 Protocolo
 * 7 Módulo
 * 8 Tempo de transmissão + expansão
 * 9 País
 *
 * Este bloco vem depois do V4 e prevalece somente em /ao-vivo.
 * ==========================================================
 */

/* ----------------------------------------------------------
   INDICATIVO + NUMERAÇÃO
   ---------------------------------------------------------- */

html body[data-page="ao-vivo"]
table.home-history .history-call-cell{
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-width:0;
}

html body[data-page="ao-vivo"]
table.home-history .history-call-cell
.history-row-number{
    flex:0 0 auto;
}

/* ----------------------------------------------------------
   HOTSPOT / REPETIDORA
   ---------------------------------------------------------- */

html body[data-page="ao-vivo"]
.gateway-display{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    max-width:100%;
    white-space:nowrap;
}

html body[data-page="ao-vivo"]
.gateway-value{
    min-width:0;
}

/*
 * Luz neon amarela.
 *
 * NÃO pisca.
 * O brilho fica permanente para identificação rápida,
 * sem transformar o indicador em alerta intermitente.
 */
html body[data-page="ao-vivo"]
.gateway-neon{
    display:inline-block;
    flex:0 0 9px;
    width:9px;
    height:9px;
    border-radius:999px;
    background:#ffe600;
    border:1px solid #fff59a;
    box-shadow:
        0 0 3px #fffbd1,
        0 0 7px #ffe600,
        0 0 13px rgba(255,230,0,.90),
        0 0 20px rgba(255,230,0,.48);
}

html body[data-page="ao-vivo"]
.gateway-different .gateway-value{
    font-weight:800;
}

html body[data-page="ao-vivo"]
.hotspot-repeater-empty{
    opacity:.6;
}

/* ----------------------------------------------------------
   TEMPO + BOTÃO DO SUBMENU
   ---------------------------------------------------------- */

html body[data-page="ao-vivo"]
.history-duration-wrap{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    white-space:nowrap;
}

html body[data-page="ao-vivo"]
.history-duration-value{
    white-space:nowrap;
}

/*
 * O botão existente .history-toggle continua sendo o mesmo.
 * Apenas sua posição mudou de Status para Tempo.
 */
html body[data-page="ao-vivo"]
.history-duration-wrap .history-toggle{
    flex:0 0 19px;
    width:19px;
    min-width:19px;
    height:19px;
}

/* ----------------------------------------------------------
   PAÍS NO FINAL
   ---------------------------------------------------------- */

html body[data-page="ao-vivo"]
.history-country-final{
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

/* ----------------------------------------------------------
   BOX TRANSMITINDO AGORA
   ---------------------------------------------------------- */

html body[data-page="ao-vivo"]
.tx-hotspot-repeater .gateway-display{
    justify-content:flex-start;
}

html body[data-page="ao-vivo"]
.tx-hotspot-repeater .gateway-neon{
    width:10px;
    height:10px;
    flex-basis:10px;
}

/* ----------------------------------------------------------
   DESKTOP — 9 COLUNAS = 100%
   ---------------------------------------------------------- */

@media (min-width:821px){

    html body[data-page="ao-vivo"]
    table.home-history{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        table-layout:fixed !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history th,
    html body[data-page="ao-vivo"]
    table.home-history td{
        box-sizing:border-box !important;
        min-width:0 !important;
        padding-left:6px !important;
        padding-right:6px !important;
    }

    /* 1 — Status */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(1),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(1){
        width:9% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* 2 — Indicativo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(2),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(2){
        width:11% !important;
        white-space:nowrap !important;
    }

    /* 3 — Nome */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(3),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(3){
        width:16% !important;
        overflow-wrap:anywhere !important;
    }

    /* 4 — Hotspot / Repetidora */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(4),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(4){
        width:16% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* 5 — Cidade */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(5),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(5){
        width:14% !important;
        overflow-wrap:anywhere !important;
    }

    /* 6 — Protocolo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(6),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6){
        width:11% !important;
        text-align:center !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6) .protocol{
        max-width:100% !important;
        white-space:normal !important;
    }

    /* 7 — Módulo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(7),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7){
        width:6% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* 8 — Tempo de transmissão */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(8),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8){
        width:12% !important;
        text-align:center !important;
    }

    /* 9 — País */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(9),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(9){
        width:5% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }
}

/* ----------------------------------------------------------
   MOBILE — RÓTULOS NA NOVA ORDEM
   ---------------------------------------------------------- */

@media (max-width:820px){

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(1)::before{
        content:"Status";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(2)::before{
        content:"Indicativo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(3)::before{
        content:"Nome";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(4)::before{
        content:"Hotspot / Repetidora";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(5)::before{
        content:"Cidade";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6)::before{
        content:"Protocolo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7)::before{
        content:"Módulo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8)::before{
        content:"Tempo de transmissão";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(9)::before{
        content:"País";
    }

    html body[data-page="ao-vivo"]
    table.home-history .gateway-display{
        justify-content:flex-end;
    }

    html body[data-page="ao-vivo"]
    table.home-history .history-duration-wrap{
        justify-content:flex-end;
    }
}

/*
 * ==========================================================
 * XLX026_LAYOUT_NUMERO_V6
 *
 * 1  Nº + botão de registros
 * 2  Status
 * 3  Indicativo
 * 4  Nome
 * 5  Hotspot / Repetidora
 * 6  Cidade
 * 7  Protocolo
 * 8  Módulo
 * 9  Tempo de transmissão
 * 10 País
 * ==========================================================
 */

/* Nº + botão juntos */

html body[data-page="ao-vivo"]
table.home-history .history-number-cell{
    text-align:center !important;
    white-space:nowrap !important;
}

html body[data-page="ao-vivo"]
table.home-history .history-number-wrap{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:4px;
    white-space:nowrap;
}

html body[data-page="ao-vivo"]
table.home-history .history-number-wrap
.history-row-number{
    margin:0 !important;
    flex:0 0 auto;
}

/*
 * O MESMO botão do submenu.
 * Apenas foi transferido para ao lado do número.
 */
html body[data-page="ao-vivo"]
table.home-history .history-number-wrap
.history-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 18px;
    width:18px !important;
    min-width:18px !important;
    height:18px !important;
    margin:0 !important;
    padding:0 !important;
    line-height:1 !important;
    font-size:9px !important;
}

/* Status mais compacto */

html body[data-page="ao-vivo"]
table.home-history .history-status-cell{
    text-align:center !important;
    white-space:nowrap !important;
    padding-left:3px !important;
    padding-right:3px !important;
}

/* Indicativo não precisa mais carregar o número */

html body[data-page="ao-vivo"]
table.home-history .history-callsign-cell{
    white-space:nowrap !important;
}

/* Tempo agora contém somente o tempo */

html body[data-page="ao-vivo"]
table.home-history .history-duration-cell{
    text-align:center !important;
    white-space:nowrap !important;
}

html body[data-page="ao-vivo"]
table.home-history .history-duration-value{
    white-space:nowrap !important;
}

/*
 * A luz neon do V5 NÃO é alterada.
 * hotspotRepeaterMarkup() continua igual.
 */

/* ==========================================================
   DESKTOP — 10 COLUNAS
   TOTAL = 100%
   ========================================================== */

@media (min-width:821px){

    html body[data-page="ao-vivo"]
    table.home-history{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        table-layout:fixed !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history th,
    html body[data-page="ao-vivo"]
    table.home-history td{
        box-sizing:border-box !important;
        min-width:0 !important;
        padding-left:5px !important;
        padding-right:5px !important;
    }

    /* 1 — Nº + botão */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(1),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(1){
        width:6% !important;
        text-align:center !important;
    }

    /* 2 — Status */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(2),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(2){
        width:8% !important;
        text-align:center !important;
    }

    /* 3 — Indicativo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(3),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(3){
        width:11% !important;
        white-space:nowrap !important;
    }

    /* 4 — Nome */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(4),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(4){
        width:17% !important;
        overflow-wrap:anywhere !important;
    }

    /* 5 — Hotspot / Repetidora */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(5),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(5){
        width:16% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* 6 — Cidade */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(6),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6){
        width:14% !important;
        overflow-wrap:anywhere !important;
    }

    /* 7 — Protocolo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(7),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7){
        width:11% !important;
        text-align:center !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7) .protocol{
        max-width:100% !important;
        white-space:normal !important;
    }

    /* 8 — Módulo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(8),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8){
        width:5% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* 9 — Tempo de transmissão */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(9),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(9){
        width:8% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* 10 — País */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(10),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(10){
        width:4% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }
}

/* ==========================================================
   MOBILE — NOVA ORDEM
   ========================================================== */

@media (max-width:820px){

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(1)::before{
        content:"Nº / registros";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(2)::before{
        content:"Status";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(3)::before{
        content:"Indicativo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(4)::before{
        content:"Nome";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(5)::before{
        content:"Hotspot / Repetidora";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6)::before{
        content:"Cidade";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7)::before{
        content:"Protocolo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8)::before{
        content:"Módulo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(9)::before{
        content:"Tempo de transmissão";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(10)::before{
        content:"País";
    }

    html body[data-page="ao-vivo"]
    table.home-history .history-number-wrap{
        justify-content:flex-end;
    }
}

/*
 * ==========================================================
 * XLX026_BANDEIRA_V7
 *
 * 1 Nº + submenu
 * 2 País
 * 3 Status
 * 4 Indicativo
 * 5 Nome
 * 6 Hotspot / Repetidora
 * 7 Cidade
 * 8 Protocolo
 * 9 Módulo
 * 10 Tempo de transmissão
 * ==========================================================
 */

html body[data-page="ao-vivo"]
table.home-history .history-country-cell{
    text-align:center !important;
    white-space:nowrap !important;
}

html body[data-page="ao-vivo"]
table.home-history .history-country-final{
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

/* ==========================================================
   DESKTOP
   10 colunas = 100%
   ========================================================== */

@media (min-width:821px){

    html body[data-page="ao-vivo"]
    table.home-history{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        table-layout:fixed !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history th,
    html body[data-page="ao-vivo"]
    table.home-history td{
        box-sizing:border-box !important;
        min-width:0 !important;
        padding-left:5px !important;
        padding-right:5px !important;
    }

    /* Nº */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(1),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(1){
        width:5% !important;
        text-align:center !important;
    }

    /* País */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(2),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(2){
        width:4% !important;
        text-align:center !important;
    }

    /* Status */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(3),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(3){
        width:7% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* Indicativo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(4),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(4){
        width:10% !important;
        white-space:nowrap !important;
    }

    /* Nome */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(5),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(5){
        width:16% !important;
        overflow-wrap:anywhere !important;
    }

    /* Hotspot / Repetidora */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(6),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6){
        width:16% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* Cidade */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(7),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7){
        width:14% !important;
        overflow-wrap:anywhere !important;
    }

    /* Protocolo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(8),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8){
        width:11% !important;
        text-align:center !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8) .protocol{
        max-width:100% !important;
        white-space:normal !important;
    }

    /* Módulo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(9),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(9){
        width:5% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }

    /* Tempo */
    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(10),
    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(10){
        width:12% !important;
        text-align:center !important;
        white-space:nowrap !important;
    }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width:820px){

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(1)::before{
        content:"Nº / registros";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(2)::before{
        content:"País";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(3)::before{
        content:"Status";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(4)::before{
        content:"Indicativo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(5)::before{
        content:"Nome";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6)::before{
        content:"Hotspot / Repetidora";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7)::before{
        content:"Cidade";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8)::before{
        content:"Protocolo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(9)::before{
        content:"Módulo";
    }

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(10)::before{
        content:"Tempo de transmissão";
    }
}


/* ==============================================================
 * XLX026_MOBILE_MODERNO_V8
 * Escopo: /ao-vivo > Atividade das últimas 24 horas.
 * Somente telas pequenas, entrada por toque e navegador moderno.
 * Não altera desktop, modo compatível, JavaScript ou APIs.
 * ============================================================= */

@supports selector(:has(*)) {
  @media screen and (max-width:820px) and (hover:none) and (pointer:coarse) {

    html body[data-page="ao-vivo"]
    table.home-history tbody tr {
      grid-template-columns:repeat(12,minmax(0,1fr)) !important;
      gap:0 !important;
      overflow:hidden !important;
      border-left-width:3px !important;
      transition:border-color .16s ease,box-shadow .16s ease !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr:has(.state-pill.online) {
      border-left-color:#21eaa0 !important;
      box-shadow:inset 3px 0 0 rgba(33,234,160,.12) !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr:has(.state-pill.offline) {
      border-left-color:#ff4d72 !important;
      box-shadow:inset 3px 0 0 rgba(255,77,114,.10) !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td {
      min-width:0 !important;
      max-width:none !important;
      padding:8px 9px !important;
      gap:8px !important;
      align-items:center !important;
      box-sizing:border-box !important;
    }

    /* Linha compacta: número | país | status. */
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(1) {
      grid-column:1 / 6 !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(2) {
      grid-column:6 / 9 !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(3) {
      grid-column:9 / 13 !important;
    }

    /* Indicativo ocupa toda a largura e vira o ponto principal. */
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(4) {
      grid-column:1 / -1 !important;
      padding-top:10px !important;
      padding-bottom:10px !important;
      background:linear-gradient(90deg,rgba(0,216,255,.075),rgba(0,216,255,0)) !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history .history-callsign-cell > a {
      color:#ffffff !important;
      font-size:18px !important;
      font-weight:950 !important;
      line-height:1.08 !important;
      letter-spacing:.025em !important;
      text-shadow:0 0 12px rgba(0,216,255,.34) !important;
      text-decoration:none !important;
    }

    /* Nome e Hotspot/Repetidora aproveitam a mesma linha. */
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(5) {
      grid-column:1 / 8 !important;
      color:#f3fbff !important;
      font-size:13px !important;
      font-weight:750 !important;
      line-height:1.3 !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(6) {
      grid-column:8 / 13 !important;
    }

    /* Cidade em largura total, sem a metade direita vazia. */
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(7) {
      grid-column:1 / -1 !important;
      color:#dff7ff !important;
      font-size:13px !important;
      font-weight:750 !important;
      line-height:1.25 !important;
      background:rgba(0,216,255,.025) !important;
    }

    /* Rodapé técnico: protocolo | módulo | tempo. */
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(8) {
      grid-column:1 / 5 !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(9) {
      grid-column:5 / 8 !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(10) {
      grid-column:8 / 13 !important;
    }

    /* Rótulos continuam legíveis, mas deixam o conteúdo dominar. */
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td::before {
      color:#30dfff !important;
      font-size:7px !important;
      font-weight:900 !important;
      line-height:1.1 !important;
      letter-spacing:.075em !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(4)::before,
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(5)::before,
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td:nth-child(7)::before {
      flex:0 0 auto !important;
      min-width:64px !important;
    }

    /* Status fica maior e rapidamente reconhecível. */
    html body[data-page="ao-vivo"]
    table.home-history .history-status-cell .state-pill {
      min-width:44px !important;
      padding:4px 7px !important;
      font-size:9px !important;
      font-weight:900 !important;
    }

    /* Número e botão do submenu continuam juntos; botão próprio para toque. */
    html body[data-page="ao-vivo"]
    table.home-history .history-number-wrap {
      justify-content:flex-end !important;
      gap:5px !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history .history-number-wrap .history-row-number {
      width:24px !important;
      min-width:24px !important;
      height:24px !important;
      font-size:9px !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history .history-number-wrap .history-toggle {
      width:28px !important;
      min-width:28px !important;
      height:28px !important;
      flex-basis:28px !important;
      font-size:9px !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history .history-country-final img {
      width:28px !important;
      height:19px !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history .gateway-display {
      justify-content:flex-end !important;
      gap:6px !important;
      max-width:100% !important;
    }

    html body[data-page="ao-vivo"]
    table.home-history .gateway-different .gateway-value {
      color:#fff7b2 !important;
      text-shadow:0 0 9px rgba(255,230,0,.22) !important;
    }

    /* Mensagem de tabela vazia continua usando toda a largura. */
    html body[data-page="ao-vivo"]
    table.home-history tbody tr > td[colspan] {
      grid-column:1 / -1 !important;
      justify-content:center !important;
      min-height:72px !important;
    }

    /* Nomes muito longos ganham a linha toda em celulares estreitos. */
    @media (max-width:370px) {
      html body[data-page="ao-vivo"]
      table.home-history tbody tr > td:nth-child(5),
      html body[data-page="ao-vivo"]
      table.home-history tbody tr > td:nth-child(6) {
        grid-column:1 / -1 !important;
      }
    }

    @media (prefers-reduced-motion:reduce) {
      html body[data-page="ao-vivo"]
      table.home-history tbody tr {
        transition:none !important;
      }
    }
  }
}

/* FIM XLX026_MOBILE_MODERNO_V8 */

/*
 * ==========================================================
 * XLX026_HORARIO_TX_24H_V1
 *
 * SOMENTE:
 * Atividade das últimas 24 horas em /ao-vivo
 *
 * Colunas 1–9 preservadas.
 * 10 = Horário TX
 * 11 = Tempo de TX
 * ==========================================================
 */

@media (min-width:821px){

    html body[data-page="ao-vivo"]
    .dashboard-main .table-wrap{

        width:100% !important;
        max-width:100% !important;

        overflow-x:hidden !important;
    }


    html body[data-page="ao-vivo"]
    table.home-history{

        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;

        table-layout:fixed !important;
    }


    html body[data-page="ao-vivo"]
    table.home-history th,

    html body[data-page="ao-vivo"]
    table.home-history td{

        box-sizing:border-box !important;

        min-width:0 !important;

        padding-left:4px !important;
        padding-right:4px !important;
    }


    /* Nº */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(1),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(1){

        width:5% !important;
    }


    /* País */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(2),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(2){

        width:4.5% !important;
    }


    /* Status */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(3),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(3){

        width:7% !important;
    }


    /* Indicativo */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(4),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(4){

        width:8% !important;
    }


    /* Nome */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(5),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(5){

        width:14.5% !important;
    }


    /* Hotspot / Repetidora */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(6),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(6){

        width:13% !important;
    }


    /* Cidade */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(7),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(7){

        width:14% !important;
    }


    /* Protocolo */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(8),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(8){

        width:10% !important;
    }


    /* Módulo */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(9),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(9){

        width:5.5% !important;
    }


    /* Horário TX */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(10),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(10){

        width:8% !important;
    }


    /* Tempo de TX */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(11),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(11){

        width:10.5% !important;
    }


    /*
     * Valores temporais compactos e alinhados.
     */

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(10),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(10),

    html body[data-page="ao-vivo"]
    table.home-history th:nth-child(11),

    html body[data-page="ao-vivo"]
    table.home-history td:nth-child(11){

        white-space:nowrap !important;

        text-align:center !important;

        font-variant-numeric:
            tabular-nums;
    }

}

/* /XLX026_HORARIO_TX_24H_V1 */


/* ==========================================================
   XLX026_SUBMENU_VISUAL_V1

   Atividade das últimas 24 horas

   1. Linhas secundárias 2ch à esquerda no desktop
   2. Numeração principal/secundária mais visível

   Não altera estrutura ou funcionamento.
   ========================================================== */


/*
 * Numeração das linhas.
 *
 * Substitui visualmente a opacidade baixa utilizada
 * anteriormente, sem alterar o HTML ou JavaScript.
 */

html body[data-page="ao-vivo"]
table.home-history
.history-row-number {

    opacity: 1 !important;

    font-weight: 900 !important;

    font-variant-numeric: tabular-nums !important;

    text-shadow:
        0 0 5px rgba(0,216,255,.30) !important;
}


/*
 * Linha principal.
 * Mantemos exatamente na posição atual.
 */

html body[data-page="ao-vivo"]
table.home-history
tr.history-primary-row
.history-row-number {

    opacity: 1 !important;
}


/*
 * Transmissões anteriores dentro do submenu.
 *
 * Um pouco menos fortes que a linha principal,
 * porém muito mais legíveis que antes.
 */

html body[data-page="ao-vivo"]
table.home-history
tr.history-previous-row
.history-row-number {

    opacity: .90 !important;

    font-weight: 850 !important;
}


/*
 * DESKTOP
 *
 * Somente as LINHAS SECUNDÁRIAS abertas avançam
 * visualmente 2 caracteres para a esquerda.
 *
 * Cabeçalho, linha principal e larguras da tabela
 * continuam exatamente onde estão.
 */

@media (min-width:821px) {

    html body[data-page="ao-vivo"]
    table.home-history
    tbody
    tr.history-previous-row > td {

        position: relative !important;

        left: auto !important;
    }


    /*
     * Compensação no último campo para evitar
     * qualquer possibilidade de corte visual.
     */

    html body[data-page="ao-vivo"]
    table.home-history
    tbody
    tr.history-previous-row > td:last-child {

        padding-right: 0 !important;
    }

}


/*
 * MOBILE
 *
 * Não deslocamos as células.
 * Preservamos a apresentação mobile aprovada.
 */

@media (max-width:820px) {

    html body[data-page="ao-vivo"]
    table.home-history
    tbody
    tr.history-previous-row > td {

        left: auto !important;
    }

}


/* /XLX026_SUBMENU_VISUAL_V1 */


/* ==========================================================
   XLX026_SUBMENU_DIREITA_V1

   Submenu = filho da linha principal.

   As colunas permanecem alinhadas.
   Somente a identificação da linha secundária
   recebe recuo visual para a direita.
   ========================================================== */


@media (min-width:821px){

    /*
     * Nenhuma célula da transmissão secundária
     * é mais deslocada lateralmente.
     */

    html body[data-page="ao-vivo"]
    table.home-history
    tbody
    tr.history-previous-row > td{

        position:relative !important;

        left:auto !important;
    }


    /*
     * Primeira célula do submenu.
     *
     * Recuo para direita para criar a
     * hierarquia pai -> filho.
     */

    html body[data-page="ao-vivo"]
    table.home-history
    tbody
    tr.history-previous-row > td:first-child{

        padding-left:2.2ch !important;

        text-align:left !important;
    }


    /*
     * Número da transmissão secundária.
     *
     * Continua forte e legível,
     * porém claramente subordinado.
     */

    html body[data-page="ao-vivo"]
    table.home-history
    tbody
    tr.history-previous-row
    .history-row-number{

        display:inline-block !important;

        opacity:.92 !important;

        font-weight:850 !important;

        transform:none !important;
    }


    /*
     * Pequena indicação visual de submenu.
     */

    html body[data-page="ao-vivo"]
    table.home-history
    tbody
    tr.history-previous-row > td:first-child::before{

        content:"↳";

        display:inline-block;

        margin-right:.55ch;

        opacity:.65;

        font-weight:800;
    }

}


/*
 * Mobile continua exatamente sem deslocamento.
 */

@media (max-width:820px){

    html body[data-page="ao-vivo"]
    table.home-history
    tbody
    tr.history-previous-row > td{

        left:auto !important;
    }

}


/* /XLX026_SUBMENU_DIREITA_V1 */
