/* ================= RESET E FONTES ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0b0e11; /* Fundo escuro padrão Binance/Corretoras */
    color: #eaecef;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ================= ESTRUTURA PRINCIPAL ================= */
.container {
    width: 100%;
    max-width: 900px;
    background-color: #181a20;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #2b3139;
    padding-bottom: 15px;
}

header h1 {
    color: #fcd535;
    font-size: 24px;
}

header p {
    color: #848e9c;
    font-size: 14px;
    margin-top: 5px;
}

/* ================= BOTÕES GERAIS ================= */
.btn-historico {
    color: #181a20;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    background: #fcd535;
    border-radius: 6px;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.btn-historico:hover {
    background: #e0bc2c;
}

/* ================= GUIAS HORIZONTAIS (ABAS DOS PARES, ESTILO IQ OPTION) ================= */
.tabs-nav {
    display: flex;
    background-color: #0b0e11;
    border: 1px solid #2b3139;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1 1 0;
    min-width: 0;
    background: transparent;
    border: none;
    border-right: 1px solid #2b3139;
    border-bottom: 3px solid transparent;
    padding: 12px 6px 10px;
    text-align: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn:hover {
    background-color: #1f2329;
}

/* A aba ativa "gruda" no painel de baixo (mesma cor de fundo, sem fresta) */
.tab-btn.ativa {
    background-color: #1f2329;
    border-bottom: 3px solid #fcd535;
}

.tab-nome {
    display: block;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.3px;
    color: #848e9c;
}

.tab-btn.ativa .tab-nome {
    color: #fcd535;
}

.tab-preco {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #0ecb81;
    font-variant-numeric: tabular-nums;
}

/* ================= SEPARAÇÃO POR MOEDA (BTC / ETH) ================= */
.pair-section {
    background-color: #1f2329;
    padding: 20px;
    border-radius: 0 0 12px 12px;
    border: 1px solid #2b3139;
    border-top: none;
    margin-bottom: 0;
}

@media (max-width: 520px) {
    .tab-nome { font-size: 12px; }
    .tab-preco { font-size: 11px; }
    .tab-btn { padding: 10px 4px 8px; }
}

.pair-title {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 15px;
    border-left: 4px solid #fcd535;
    padding-left: 10px;
}

/* ================= DASHBOARD NUMÉRICO (Preço, RSI, EMA) ================= */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.card {
    background-color: #2b3139;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.card h3 {
    font-size: 12px;
    color: #848e9c;
    text-transform: uppercase;
}

.card .value {
    font-size: 18px;
    font-weight: 600;
    margin-top: 8px;
    color: #ffffff;
}

/* ================= BLOCOS DE SINAIS (Estratégias) ================= */
.strategies-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.signal-box {
    text-align: center;
    background-color: #2b3139;
    padding: 20px 15px;
    border-radius: 8px;
    border: 2px solid #3b424a;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.signal-box h2 {
    font-size: 14px;
    color: #fcd535;
    margin-bottom: 15px;
}

.signal-status {
    font-size: 18px;
    font-weight: 800;
    padding: 15px 10px;
    border-radius: 6px;
    background-color: #3b424a;
    color: #ffffff;
    min-height: 80px;
    display: flex;
    flex-direction: column; /* o motor devolve 2 blocos (status + painel): empilha em vez de lado a lado */
    align-items: center;
    justify-content: center;
}

/* Cada bloco injetado pelo motor ocupa a linha inteira:
   a linha de STATUS fica em cima e o painel (OPERAÇÃO CANCELADA /
   RESULTADO ANTERIOR) na linha de baixo. */
.signal-status > div {
    width: 100%;
}

.timer {
    margin-top: 15px;
    font-size: 12px;
    color: #848e9c;
}

/* ================= CORES DINÂMICAS DOS SINAIS ================= */
.signal-call {
    background-color: #0ecb81 !important;
    color: #fff !important;
    border-color: #0ecb81 !important;
    box-shadow: 0 0 15px rgba(14, 203, 129, 0.2);
}

.signal-put {
    background-color: #f6465d !important;
    color: #fff !important;
    border-color: #f6465d !important;
    box-shadow: 0 0 15px rgba(246, 70, 93, 0.2);
}

.signal-wait {
    background-color: #f39c12 !important;
    color: #fff !important;
    border-color: #f39c12 !important;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.2);
}

/* ================= PÁGINA DE HISTÓRICO ================= */
.historico-container {
    margin-top: 20px;
    text-align: left;
}

.historico-item {
    background-color: #2b3139;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 5px solid #3b424a;
}

.win-border { border-left-color: #0ecb81; }
.loss-border { border-left-color: #f6465d; }

.historico-title {
    color: #fcd535;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.h-row {
    color: #848e9c;
    font-size: 14px;
    margin-bottom: 5px;
}

.h-result { 
    font-weight: 800; 
    font-size: 16px; 
}

.h-win { color: #0ecb81; }
.h-loss { color: #f6465d; }
.h-par { color: #ffffff; font-weight: 600; }

.menu-topo {
    text-align: center;
    margin-bottom: 25px;
}

.menu-topo a {
    color: #181a20;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    background: #fcd535;
    border-radius: 6px;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.menu-topo a:hover {
    background: #e0bc2c;
}

/* =========================================
   GUIAS HORIZONTAIS (TABS DOS PARES) - ESTILO CORRETORA
   ========================================= */
.tabs-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #181a20; /* Fundo escuro igual da foto */
    border: 1px solid #2b3139; /* Borda sutil */
    border-radius: 8px; /* Cantos arredondados */
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.2s ease;
    min-width: 140px;
    position: relative; /* Necessário para posicionar a bolinha de status */
}

.tab-btn:hover {
    background: #2b3139; /* Clareia de leve ao passar o mouse */
}

/* Tab Ativa (Quando o usuário clica) */
.tab-btn.ativa {
    border-color: #0ecb81; /* Borda verde */
    background: #1e2329;
}

/* =========================================
   BOLINHA DE STATUS (INDICADOR VISUAL)
   ========================================= */
/* Bolinha padrão (Procurando padrões = Branco) */
.tab-btn::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ffffff; /* Branco */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Bolinha Verde (Aviso de Entrada) */
.tab-btn.status-win::after { 
    background-color: #0ecb81; 
    box-shadow: 0 0 8px rgba(14, 203, 129, 0.6); /* Brilho neon sutil */
} 

/* Bolinha Laranja (Em andamento / Gales) */
.tab-btn.status-wait::after { 
    background-color: #f7931a; 
    box-shadow: 0 0 8px rgba(247, 147, 26, 0.6); 
} 

/* =========================================
   CONTEÚDO DA TAB (Textos e Ícones)
   ========================================= */
/* Nome do Par (Ex: BTC/USDT) */
.tab-nome {
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
}

/* =========================================
   MERCADO (CRYPTO / FOREX) - ESTILO CRACHÁ
   ========================================= */
.tab-tipo {
    color: #848e9c; /* Cinza claro */
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Ícone de velas japonesas pequeno ao lado da palavra Crypto/Forex */
.tab-tipo::before {
    content: '📊'; 
    font-size: 11px;
    opacity: 0.7;
}

/* =========================================
   OCULTAR PREÇO SOLTO NAS TABS
   ========================================= */
/* A pedido: Oculta aquele preço desconfigurado (ex: 83505.02) de dentro das abas */
.tab-preco {
    display: none !important; 
}