/* assets/css/styles.css (VERSÃO ORIGINAL COMPLETA + ESTILOS FUTURISTAS UNIFICADOS) */

/* ===== Reset básico e Fonte Principal ===== */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== Variáveis de Cores Base ===== */
:root {
    --primary-color: #007bff;
    --primary-dark-color: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --light-bg-color: #f0f2f5;
    --dark-bg-color: #121212;
    --light-text-color: #212529;
    --dark-text-color: #e0e0e0;
    --card-bg-light: #ffffff;
    --card-bg-dark: #1e1e1e;
    --border-color-light: #dee2e6;
    --border-color-dark: #2d2d2d;
}

/* ===== Estrutura Principal ===== */
#wrapper { display: flex; height: 100vh; overflow: hidden; }
#page-content-wrapper { flex-grow: 1; overflow-y: auto; min-height: 100vh; }
#sidebar-wrapper {
    width: 250px;
    display: flex;
    flex-direction: column;
    transition: width 0.35s ease, background-color 0.3s ease;
    box-shadow: 3px 0 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1000;
    flex-shrink: 0;
}
#wrapper.sidebar-collapsed #sidebar-wrapper { width: 80px; }
#wrapper.sidebar-collapsed .sidebar-heading span,
#wrapper.sidebar-collapsed .nav-link span,
#wrapper.sidebar-collapsed .sidebar-footer span { display: none; }
#wrapper.sidebar-collapsed .nav-link { text-align: center; padding-left: 0 !important; padding-right: 0 !important; }
#wrapper.sidebar-collapsed .nav-link i { margin-right: 0 !important; }

/* ===== Estilo do Menu Lateral (Sidebar) ===== */
.sidebar-heading {
    padding: 1.5rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
    color: #d5d5d5;
    background: linear-gradient(180deg, #4a4a4a, #333);
    text-shadow: 1px 1px 1px #000, -1px -1px 1px #777;
}
/* AQUI ESTÁ A ALTERAÇÃO: Adicionado overflow-y: auto; */
#sidebar-wrapper ul.components {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-grow: 1;
    overflow-y: auto; /* Garante a barra de rolagem quando necessário */
    scrollbar-width: thin; /* Para Firefox */
    scrollbar-color: #888 #555; /* Para Firefox */
}
/* Estilização da barra de rolagem para navegadores Webkit (Chrome, Safari) */
#sidebar-wrapper ul.components::-webkit-scrollbar {
    width: 8px;
}
#sidebar-wrapper ul.components::-webkit-scrollbar-track {
    background: #555;
}
#sidebar-wrapper ul.components::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
    border: 2px solid #555;
}
#sidebar-wrapper ul.components li a.nav-link {
    padding: 12px 15px;
    display: block;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    border-left: 5px solid transparent;
    color: #ffffff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
#sidebar-wrapper ul.components li a.nav-link i { width: 20px; margin-right: 10px; font-size: 1.1rem; text-align: center; }
#sidebar-wrapper ul.components li a.nav-link:hover,
#sidebar-wrapper ul.components li a.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left: 5px solid var(--warning-color);
    text-shadow: 0 0 8px var(--warning-color);
}
#sidebar-wrapper ul.components li a.nav-link.text-danger { color: #ff8a80 !important; font-weight: bold; }
#sidebar-wrapper ul.components li a.nav-link.text-danger:hover {
    background-color: rgba(255, 82, 82, 0.2) !important;
    color: #ff5252 !important;
    text-shadow: 0 0 8px #ff5252;
}
.sidebar-footer {
    padding: 1rem;
    white-space: nowrap;
}

/* ===== Temas ===== */
/* Tema Claro (Light) */
body.theme-light { background: var(--light-bg-color); color: var(--light-text-color); }
body.theme-light #sidebar-wrapper { background: linear-gradient(145deg, #007bff, #0056b3); }
body.theme-light .card { background-color: var(--card-bg-light); }
body.theme-light .card-header { border-bottom-color: var(--border-color-light); }
body.theme-light .table-primary { background-color: var(--primary-color); }
body.theme-light #sidebar-wrapper ul.components::-webkit-scrollbar-track { background: #d4d4d4; }
body.theme-light #sidebar-wrapper ul.components::-webkit-scrollbar-thumb { background-color: #a0a0a0; border-color: #d4d4d4; }


/* Tema Oceano */
body.theme-ocean { --primary-color: #009688; --light-bg-color: #e0f2f1; --border-color-light: #b2dfdb; }
body.theme-ocean #sidebar-wrapper { background: linear-gradient(145deg, #009688, #00695c); }
body.theme-ocean .card { border: 1px solid var(--border-color-light); }
body.theme-ocean #sidebar-wrapper ul.components::-webkit-scrollbar-track { background: #b2dfdb; }
body.theme-ocean #sidebar-wrapper ul.components::-webkit-scrollbar-thumb { background-color: #80cbc4; border-color: #b2dfdb; }


/* Tema Escuro (Base) */
@keyframes animate-gradient-sidebar { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
body.theme-dark { background: var(--dark-bg-color); color: var(--dark-text-color); }
body.theme-dark #sidebar-wrapper { background-size: 400% 400%; animation: animate-gradient-sidebar 15s ease infinite; background-image: linear-gradient(-45deg, #222, #111, #333, #111); }
body.theme-dark #sidebar-wrapper ul.components li a.nav-link { color: #ccc; }
body.theme-dark .card { background-color: var(--card-bg-dark); border: 1px solid var(--border-color-dark); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
body.theme-dark .card-header { border-bottom-color: var(--border-color-dark); }
body.theme-dark .table-primary { background-color: #3a3a3a; }
body.theme-dark #sidebar-wrapper ul.components::-webkit-scrollbar-track { background: #2d2d2d; }
body.theme-dark #sidebar-wrapper ul.components::-webkit-scrollbar-thumb { background-color: #555; border-color: #2d2d2d; }

/* Tema Mar Profundo */
body.theme-deep-sea { --dark-bg-color: #0c181d; --card-bg-dark: #1a2c35; --border-color-dark: #3a505b; }
body.theme-deep-sea #sidebar-wrapper { background-image: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #2196f3); }
body.theme-deep-sea #sidebar-wrapper ul.components li a.nav-link:hover,
body.theme-deep-sea #sidebar-wrapper ul.components li a.nav-link.active { color: #6dd5ed; border-left-color: #6dd5ed; }
body.theme-deep-sea .table-primary { background-color: #2c5364; }

/* Tema Crepúsculo */
body.theme-twilight { --dark-bg-color: #1e1e2f; --card-bg-dark: #282a36; --border-color-dark: #44475a; }
body.theme-twilight #sidebar-wrapper { background-image: linear-gradient(-45deg, #23074d, #44475a, #cc5333, #23074d); }
body.theme-twilight #sidebar-wrapper ul.components li a.nav-link:hover,
body.theme-twilight #sidebar-wrapper ul.components li a.nav-link.active { color: #ff79c6; border-left-color: #ff79c6; }
body.theme-twilight .table-primary { background-color: #44475a; }
body.theme-twilight .text-success { color: #50fa7b !important; }
body.theme-twilight .text-danger { color: #ff5555 !important; }

/* Tema Endian Firewall */
body.theme-endian { --primary-color: #99CC33; --light-bg-color: #fff; --light-text-color: #444; --border-color-light: #e0e0e0; --card-bg-light: #f7f7f7; }
body.theme-endian #page-content-wrapper { background: var(--light-bg-color); }
body.theme-endian #sidebar-wrapper { background: #585858; animation: none; }
body.theme-endian .sidebar-heading { background: #444; color: #eee; text-shadow: none; }
body.theme-endian #sidebar-wrapper ul.components li a.nav-link { color: #ccc; text-shadow: none; font-weight: 500; }
body.theme-endian #sidebar-wrapper ul.components li a.nav-link:hover { background-color: #777; color: #fff; border-left-color: var(--primary-color); text-shadow: none; }
body.theme-endian #sidebar-wrapper ul.components li a.nav-link.active { background-color: var(--primary-color) !important; color: #333 !important; font-weight: bold; border-left-color: #fff; text-shadow: none; }
body.theme-endian .page-title-futuristic, 
body.theme-endian h1, body.theme-endian h2, body.theme-endian h3 { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important; background: none !important; -webkit-text-fill-color: inherit !important; color: #555 !important; text-shadow: none !important; animation: none !important; }
body.theme-endian .card { border: 1px solid var(--border-color-light); border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
body.theme-endian .table-primary { background-color: var(--primary-color); }
body.theme-endian #sidebar-wrapper ul.components::-webkit-scrollbar-track { background: #e0e0e0; }
body.theme-endian #sidebar-wrapper ul.components::-webkit-scrollbar-thumb { background-color: #999; border-color: #e0e0e0; }

/* ===== Componentes Específicos ===== */
.dashboard-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.dashboard-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.dashboard-card .icon-wrapper {
    padding: 15px;
    border-radius: 50%;
    margin-right: 20px;
    font-size: 24px;
    flex-shrink: 0;
}
.dashboard-card .card-title { font-size: 0.9rem; font-weight: 500; color: #6c757d; }
.dashboard-card .card-value { font-size: 1.75rem; font-weight: 700; }
body.theme-dark .dashboard-card .card-title { color: #adb5bd; }

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid var(--border-color-light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--light-text-color);
    background-color: var(--card-bg-light);
    transition: all 0.2s ease;
}
.quick-action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    color: var(--primary-color);
}
.quick-action-btn i { font-size: 2.5rem; margin-bottom: 10px; }
.quick-action-btn span { font-weight: 600; text-align: center; }

body.theme-dark .quick-action-btn {
    border-color: var(--border-color-dark);
    color: var(--dark-text-color);
    background-color: var(--card-bg-dark);
}
body.theme-dark .quick-action-btn:hover { color: var(--warning-color); }

/* Melhorias na Tabela */
.table { border-radius: 0.5rem; overflow: hidden; }
.table thead th {
    border-bottom-width: 0;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.table td, .table th {
    white-space: nowrap;
}
/* ===== Estilos para os Cards de Resumo (Usado no Dashboard e Carteira) ===== */
.dashboard-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%; /* Garante que todos os cards tenham a mesma altura */
}
.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.dashboard-card .icon-wrapper {
    padding: 15px;
    border-radius: 50%;
    margin-right: 20px;
    font-size: 24px;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dashboard-card .card-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 2px;
}
.dashboard-card .card-value {
    font-size: 1.75rem;
    font-weight: 700;
    white-space: nowrap; /* Proíbe a quebra de linha do valor */
}
body.theme-dark .dashboard-card .card-title {
    color: #adb5bd;
}
/* ===== ESTILO DEFINITIVO PARA PÁGINAS DE AUTENTICAÇÃO ===== */

.login-body {
    /* Define a imagem de fundo local e garante que ela cubra toda a tela */
    background-image: url('../images/login-background.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Mantém a imagem fixa durante o scroll */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Cria a camada escura semi-transparente para destacar o formulário */
.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.15); /* de 0.6 para 0.15 */
    z-index: 1;
}

/* Garante que o card do formulário fique na frente da camada escura */
.login-body .card {
    position: relative;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.98);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
/* ===== PÁGINA SIMULADOR DE TRADE (O VIDENTE) v3.0 - ESTILO DEFINITIVO ===== */

/* Painel de Ações (Botões estilo Card) */
.vidente-actions-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.vidente-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid var(--border-color-light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--light-text-color);
    background-color: var(--card-bg-light);
    transition: all 0.2s ease-in-out;
    min-height: 130px;
    cursor: pointer;
    text-align: center;
}

.vidente-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.vidente-action-card i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.vidente-action-card:hover i {
    transform: scale(1.1);
}

.vidente-action-card span {
    font-weight: 600;
}

/* Adaptação para temas escuros */
body.theme-dark .vidente-action-card {
    border-color: var(--border-color-dark);
    color: var(--dark-text-color);
    background-color: var(--card-bg-dark);
}
body.theme-dark .vidente-action-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-color: var(--warning-color);
}
body.theme-dark .vidente-action-card:hover,
body.theme-dark .vidente-action-card:hover span {
    color: var(--warning-color);
}


/* Estilos para os Cards de Resultado (já estavam bons, apenas ajustes menores) */
#vidente-results-container {
    margin-top: 2rem;
}
.vidente-result-card {
    background-color: var(--card-bg-light);
    border: 1px solid var(--border-color-light);
    border-left-width: 5px;
    border-left-color: var(--primary-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
body.theme-dark .vidente-result-card {
    background-color: var(--card-bg-dark);
    border-color: var(--border-color-dark);
    border-left-color: var(--primary-color);
}
.vidente-result-card .card-header {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    background-color: transparent;
    border-bottom: 1px solid var(--border-color-light);
}
body.theme-dark .vidente-result-card .card-header {
    border-bottom-color: var(--border-color-dark);
}

/* (O restante dos estilos para os cards de resultado permanece o mesmo) */
.diagnostic-list { list-style: none; padding: 0; }
.diagnostic-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-color-light); }
body.theme-dark .diagnostic-item { border-bottom-color: var(--border-color-dark); }
.diagnostic-item:last-child { border-bottom: none; }
.diagnostic-item .metric-name { font-weight: 500; }
.diagnostic-item .metric-value { font-weight: 700; }
.diagnostic-item .status-icon { font-size: 1.2rem; margin-right: 10px; }
.status-icon.pass { color: var(--success-color); }
.status-icon.fail { color: var(--danger-color); }
.status-icon.warn { color: var(--warning-color); }
.tooltip-icon { cursor: pointer; color: var(--secondary-color); margin-left: 8px; }
.trade-plan-list { list-style: none; padding: 0; }
.trade-plan-item { display: flex; align-items: center; padding: 12px 5px; font-size: 1.1rem; }
.trade-plan-item i { font-size: 1.5rem; margin-right: 15px; width: 25px; text-align: center; }
.trade-plan-item .plan-label { font-weight: 600; }
.trade-plan-item .plan-value { margin-left: auto; font-weight: 700; font-size: 1.2rem; }
.trade-plan-item .plan-note { font-size: 0.85rem; color: var(--secondary-color); margin-left: 8px; }
.vidente-disclaimer { font-size: 0.8rem; color: var(--secondary-color) !important; padding: 10px; background-color: rgba(108, 117, 125, 0.05); border-radius: 4px; margin-top: 10px; }

/* ===== ESTILO ESPECÍFICO PARA O TÍTULO DO SIMULADOR ===== */

@keyframes animate-brain-gradient { 
    0% { background-position: 0% 50%; } 
    50% { background-position: 100% 50%; } 
    100% { background-position: 0% 50%; } 
}

.page-title-simulator { 
    font-family: 'Poppins', sans-serif; 
    font-weight: 700; 
    font-size: 2.8rem; 
    background: linear-gradient(90deg, #7f00ff, #0072ff, #00c6ff, #7f00ff); 
    background-size: 400% 400%; 
    animation: animate-brain-gradient 10s ease-in-out infinite; 
    -webkit-background-clip: text; 
    background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

/********************************************************************************/
/* ===== POLIMENTO FINAL: SIDEBAR "SUPERNOVA" + CONFIGS "MANUAL DO TITÃ" ===== */
/********************************************************************************/

/* Animações Globais */
@keyframes brand-gradient-animation-supernova {
    0% { background-position: 0% 50%; } 
    50% { background-position: 100% 50%; } 
    100% { background-position: 0% 50%; }
}
@keyframes pulse-glow-arena {
    from {
        box-shadow: 0 0 8px rgba(0, 246, 255, 0.3), inset 0 0 8px rgba(0, 246, 255, 0.2);
    }
    to {
        box-shadow: 0 0 20px rgba(0, 246, 255, 0.7), inset 0 0 12px rgba(0, 246, 255, 0.5);
    }
}
@keyframes icon-breath-supernova {
    0% { text-shadow: 0 0 12px #00e5ff, 0 0 22px #00e5ff; }
    50% { text-shadow: 0 0 22px #00e5ff, 0 0 45px #a162f7, 0 0 70px #f762a1; }
    100% { text-shadow: 0 0 12px #00e5ff, 0 0 22px #00e5ff; }
}
@keyframes exit-pulse-supernova {
    0% { text-shadow: 0 0 10px #ff4757; } 
    50% { text-shadow: 0 0 25px #ff4757, 0 0 40px #ff4757; } 
    100% { text-shadow: 0 0 10px #ff4757; }
}

/* Estrutura principal da Sidebar - INCONDICIONAL - SOBRESCREVE TEMAS */
#sidebar-wrapper {
    background: #0d1016 !important;
    border-right: 1px solid rgba(0, 198, 255, 0.25) !important;
    animation: pulse-glow-arena 3s infinite alternate !important;
}

/* Textura de fundo Hexagonal - INCONDICIONAL */
#sidebar-wrapper::before {
    content: '' !important;
    position: absolute !important;
    top: 0; left: 0; width: 100%; height: 100% !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%2300c6ff' fill-opacity='0.04' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.99 7.5V30L0 22.5zM15 30v-7.5L28 15v7.5z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") !important;
    z-index: 0 !important;
    pointer-events: none !important;
    opacity: 0.7 !important;
}
#sidebar-wrapper > * { position: relative !important; z-index: 1 !important; }

/* Título da Coroa - INCONDICIONAL */
#sidebar-wrapper .sidebar-heading {
    background: linear-gradient(180deg, rgba(13,17,23,0.8) 0%, rgba(13,17,23,0) 100%) !important;
    border-bottom: 1px solid rgba(0, 198, 255, 0.4) !important;
    box-shadow: none !important;
    padding: 1.2rem 1rem !important;
    text-shadow: none !important;
    color: #fff !important;
}
#sidebar-wrapper .sidebar-brand-title {
    font-size: 1.4rem !important; margin: 0 !important; font-family: 'Poppins', sans-serif !important; font-weight: 700 !important;
}
#sidebar-wrapper .sidebar-brand-title .brand-text {
    background: linear-gradient(90deg, #00e5ff, #a162f7, #f762a1, #ff93de, #00e5ff) !important;
    background-size: 350% 350% !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: brand-gradient-animation-supernova 8s ease-in-out infinite !important;
}
#sidebar-wrapper .sidebar-brand-title i.fa-rocket {
    color: #00e5ff !important;
    animation: icon-breath-supernova 3s ease-in-out infinite !important;
    transition: all 0.3s ease !important;
}

/* O restante das regras da Sidebar... */
#sidebar-wrapper ul.components li a.nav-link { color: #b0c4de !important; border-left: 4px solid transparent !important; transition: all 0.2s ease-in-out !important; text-shadow: none !important; background: none !important; font-weight: 500 !important; }
#sidebar-wrapper ul.components li a.nav-link i { color: #8799c0 !important; transition: all 0.2s ease-in-out !important; }
#sidebar-wrapper ul.components li a.nav-link:hover { background: linear-gradient(90deg, rgba(0, 198, 255, 0.15) 0%, rgba(0, 198, 255, 0) 100%) !important; color: #ffffff !important; border-left-color: #00c6ff !important; text-shadow: 0 0 5px rgba(255,255,255,0.5) !important; }
#sidebar-wrapper ul.components li a.nav-link:hover i { color: #00e5ff !important; text-shadow: 0 0 12px #00c6ff !important; transform: scale(1.1) !important; }
#sidebar-wrapper ul.components li a.nav-link.active { font-weight: 700 !important; color: #ffffff !important; background: linear-gradient(90deg, rgba(0, 198, 255, 0.25) 0%, rgba(0, 198, 255, 0.05) 100%) !important; border-left: 4px solid #00f6ff !important; box-shadow: 0 0 15px rgba(0, 198, 255, 0.5), 0 0 30px rgba(0, 198, 255, 0.3), inset 0 0 10px rgba(0, 198, 255, 0.2) !important; }
#sidebar-wrapper ul.components li a.nav-link.active i { color: #ffffff !important; text-shadow: 0 0 8px #ffffff, 0 0 20px #00e5ff !important; }
#sidebar-wrapper ul.components li a.nav-link.text-danger { color: #ff6b81 !important; font-weight: 700 !important; }
#sidebar-wrapper ul.components li a.nav-link.text-danger:hover { color: #ffffff !important; border-left-color: #ff4757 !important; background-color: rgba(255, 28, 78, 0.2) !important; animation: exit-pulse-supernova 2s ease-in-out infinite !important; }
#sidebar-wrapper ul.components li a.nav-link.text-danger:hover i { color: #ffffff !important; }
#sidebar-wrapper .sidebar-footer { border-top: 1px solid rgba(0, 198, 255, 0.3) !important; background-color: #0d1016 !important; }


/* === INÍCIO: BLOCO DE ESTILO "MANUAL DO TITÃ" PARA PÁGINAS DE CONFIGURAÇÃO === */

.card-titan-style { background-color: #1a2233 !important; border: 1px solid #00ffff !important; box-shadow: 0 0 20px #00ffff !important; color: #fff !important; border-radius: .3rem; }
.card-header-titan-style { border-bottom: 1px solid #00ffff !important; background-color: transparent !important; color: #fff !important; font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 600; padding: 1.5rem; }
.card-header-titan-style i { margin-right: 10px; text-shadow: 0 0 8px #00ffff; }
.form-label-titan-style { font-weight: 600; color: #00ffff; text-shadow: 0 0 3px #00ffff; }
.form-control-titan-style { background-color: rgba(0,0,0,0.3) !important; border: 1px solid #3a505b !important; color: #e1e1e1 !important; border-radius: 4px !important; transition: all 0.3s ease !important; }
.form-control-titan-style:focus { background-color: rgba(0,0,0,0.5) !important; border-color: #00ffff !important; box-shadow: 0 0 10px #00ffff !important; }
.btn-titan-style-primary { background-color: transparent !important; border: 1px solid #00ffff !important; color: #00ffff !important; font-weight: 600; transition: all 0.3s ease; }
.btn-titan-style-primary:hover { background-color: #00ffff !important; color: #1a2233 !important; box-shadow: 0 0 15px #00ffff; }
.btn-titan-style-success { background-color: transparent !important; border: 1px solid var(--success-color) !important; color: var(--success-color) !important; font-weight: 600; transition: all 0.3s ease; }
.btn-titan-style-success:hover { background-color: var(--success-color) !important; color: #fff !important; box-shadow: 0 0 15px var(--success-color); }
.btn-titan-style-danger { background-color: transparent !important; border: 1px solid var(--danger-color) !important; color: var(--danger-color) !important; font-weight: 600; transition: all 0.3s ease; }
.btn-titan-style-danger:hover { background-color: var(--danger-color) !important; color: #fff !important; box-shadow: 0 0 15px var(--danger-color); }
.btn-titan-style-secondary { background-color: transparent !important; border: 1px solid var(--secondary-color) !important; color: var(--secondary-color) !important; font-weight: 600; transition: all 0.3s ease; }
.btn-titan-style-secondary:hover { background-color: var(--secondary-color) !important; color: #fff !important; box-shadow: 0 0 15px var(--secondary-color); }
.alert-titan-style-success, .alert-titan-style-danger, .alert-titan-style-info { border: 1px solid; background-color: rgba(26, 34, 51, 0.8); color: #fff; padding: 1rem; border-radius: .25rem; }
.alert-titan-style-success { border-color: var(--success-color); }
.alert-titan-style-danger { border-color: var(--danger-color); }
.alert-titan-style-info { border-color: #00ffff; }
.list-group-titan-style { background-color: rgba(0,0,0,0.3) !important; border: 1px solid #3a505b !important; }
.list-group-titan-style .list-group-item { background-color: transparent !important; color: #e1e1e1 !important; border-bottom: 1px solid #3a505b; }
.list-group-titan-style .list-group-item:last-child { border-bottom: none; }
.list-group-titan-style .text-muted { color: #8a9fdd !important; }
.badge-titan-style-success, .badge-titan-style-secondary { padding: .6em 1em; font-weight: 600; color: #1a2233 !important; }
.badge-titan-style-success { background-color: #28a745 !important; box-shadow: 0 0 10px #28a745; }
.badge-titan-style-secondary { background-color: #6c757d !important; box-shadow: 0 0 10px #6c757d; }
.card-inner-titan-style { background-color: rgba(0,0,0,0.2) !important; border: 1px solid #3a505b !important; padding: 1.5rem; border-radius: .25rem; }

/* =================================================================== */
/* ESTILOS CENTRALIZADOS PARA MONITOR DE ATIVOS (rank_trade.php)       */
/* =================================================================== */

/* Título animado padrão (usado em várias páginas) */
.animated-title {
    font-weight: 700;
    background: linear-gradient(to right, #4e73df, #1cc88a, #f6c23e);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-animation 4s linear infinite;
}
@keyframes gradient-animation { to { background-position: -200% center; } }

/* Estilos para os cards do Monitor de Ativos */
.asset-logo-monitor { 
    width: 32px; 
    height: 32px; 
    margin-right: 10px; 
    border-radius: 50%;
    vertical-align: middle;
}
.monitor-card {
    transition: all 0.3s ease;
}
.monitor-card:hover {
    transform: translateY(-5px);
}
.monitor-card .current-price {
    font-size: 1.8rem;
    font-weight: 700;
}
.monitor-card .progress { 
    height: 8px; 
    border-radius: 8px; 
}
.monitor-card .target-hit-container { 
    text-align: center; 
}
.monitor-card-form .card-header, .monitor-card-form .card-body {
    border-color: #3a505b;
}

/* Regra para o Tema Escuro (Titan, etc) */
.theme-dark .monitor-card,
.theme-dark .monitor-card-form {
    background-color: #1a2233;
    border: 1px solid #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    color: #fff;
}
.theme-dark .monitor-card:hover {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
}
.theme-dark .monitor-card .progress {
    background-color: rgba(255,255,255,0.1);
}
.theme-dark .monitor-card .card-header,
.theme-dark .monitor-card .card-body,
.theme-dark .monitor-card .card-footer {
    background-color: transparent;
    border-color: #3a505b;
}
.theme-dark .current-price {
    color: var(--bs-primary);
}

/* Regra para o Tema Claro (Default) */
.theme-light .monitor-card,
.theme-light .monitor-card-form {
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #212529;
}
.theme-light .monitor-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.theme-light .monitor-card .current-price {
    color: #0d6efd;
}
/* =================================================================== */
/* ESTILOS PARA O MODAL COM EFEITO NEON (Padrão Titã)             */
/* =================================================================== */

.modal-content-neon { 
    background-color: #1a2233; 
    border: 1px solid #00ffff; 
    box-shadow: 0 0 20px #00ffff; 
    color: #fff; 
}

.modal-header-neon { 
    border-bottom: 1px solid #00ffff; 
}

.modal-footer-neon { 
    border-top: 1px solid #00ffff; 
}
/* =================================================================== */
/* CORREÇÃO DE ALINHAMENTO PARA MOVIMENTAÇÕES DO MERCADO             */
/* =================================================================== */

/* Garante a centralização de todas as colunas da tabela por padrão */
#movers-table th, 
#movers-table td {
    text-align: center;
    vertical-align: middle;
}

/* Mantém o alinhamento à esquerda para a coluna do Símbolo, que tem o logo */
#movers-table th:nth-child(2), 
#movers-table td:nth-child(2) {
    text-align: left;
}

/* =================================================================== */
/* ARENA DOS TITÃS: CORREÇÃO DEFINITIVA DO EFEITO NEON (TEMA CLARO) */
/* =================================================================== */

/* Aplica o brilho neon azul aos cards principais da Arena no tema claro,
   replicando o efeito do card 'Meu Perfil de Competidor' sem alterar o fundo. */
.theme-light .card-carteira,
.theme-light .card-ranking,
.theme-light .card-contratos,
.theme-light .card-contratos-ativos,
.theme-light .card-trilha,
.theme-light .card-conquistas,
.theme-light .card-aviso {
    border: 1px solid #00c6ff; /* A borda azul brilhante e fina */
    box-shadow: 0 0 18px rgba(0, 198, 255, 0.5); /* O brilho azul emanando da borda */
}
/* ===================================================================== */
/* ===     CORREÇÕES DE CONTRASTE PARA O TEMA CLARO (LIGHT THEME)    === */
/* ===================================================================== */

/* Garante que o texto 'muted' (cinza claro) seja mais escuro e legível em fundos brancos. */
body:not(.theme-dark) .text-muted {
    color: #5a5c69 !important; /* Um tom de cinza mais escuro e padrão do tema claro */
}
/* =================================================================== */
/* ARENA DOS TITÃS: CORREÇÃO DE LEITURA PARA O TÍTULO DO RANKING   */
/* =================================================================== */

body.theme-dark .card-ranking .card-header h6 {
    color: #f6656f !important; /* Amarelo-dourado vibrante */
    text-shadow: 0 0 7px rgba(246, 194, 62, 0.5); /* Efeito de brilho sutil */
}

/* Melhora a legibilidade do título da Carteira Virtual */
body.theme-dark .card-carteira .card-header h6 {
    color: #1cc88a !important; /* O verde vibrante da borda */
    text-shadow: 0 0 7px rgba(28, 200, 138, 0.6); /* Efeito de brilho verde */
}
/* =================================================================== */
/* ARENA DOS TITÃS: IDENTIDADE VISUAL PARA TÍTULOS E CARDS (v2)    */
/* =================================================================== */

/* --- Identidade Marcante para o Nome do Competidor --- */
/* Usamos 'body.theme-dark' para aumentar a especificidade da regra */

body.theme-dark .profile-display-name {
    color: hwb(186 0% 0%) !important;
    /* Efeito de brilho mais suave, sem a camada branca */
    text-shadow: 0 0 8px #00e5ff, 0 0 15px rgba(0, 115, 255, 0.8) !important;
}

/* --- Identidade de Cor e Luz para Títulos dos Painéis --- */
body.theme-dark .card-perfil .card-header h6 {
    color: hsl(225, 72%, 65%) !important;
    text-shadow: 0 0 8px rgba(78, 115, 223, 0.7) !important;
}

body.theme-dark .card-carteira .card-header h6 {
    color: #1cc88a !important;
    text-shadow: 0 0 8px rgba(28, 200, 138, 0.7) !important;
}

body.theme-dark .card-trilha .card-header h6 {
    color: #f6c23e !important;
    text-shadow: 0 0 8px rgba(246, 194, 62, 0.7) !important;
}

body.theme-dark .card-contratos .card-header h6 {
    color: #f6c23e !important;
    text-shadow: 0 0 8px rgba(246, 194, 62, 0.7) !important;
}

/* Mantendo a sua personalização para o ranking */
body.theme-dark .card-ranking .card-header h6 {
    color: #e74a3b !important; /* Vermelho Vibrante */
    text-shadow: 0 0 8px rgba(231, 74, 59, 0.7) !important;
}
/* =================================================================== */
/* === COCKPIT: CORREÇÃO DE COR PARA MENSAGEM DE STATUS (TEMA CLARO) == */
/* =================================================================== */

/* Aplica-se a qualquer tema que NÃO seja escuro */
body:not(.theme-dark) .scan-update-info {
    font-weight: 500;
    border: none;
}

/* Estilo para "Atualização do Sistema" no tema claro */
body:not(.theme-dark) .scan-update-info.system-update {
    color: #0056b3; /* Azul escuro e forte */
    background-color: #e7f3ff; /* Fundo azul bem claro */
    text-shadow: none;
}

/* Estilo para "Sua Análise" no tema claro */
body:not(.theme-dark) .scan-update-info.user-update {
    color: #855b00; /* Laranja/marrom escuro */
    background-color: #fff8e1; /* Fundo amarelo bem claro */
    text-shadow: none;
}

/* =============================================== */
/* === ESTILOS PERSONALIZADOS DA ÁREA DE ADMIN === */
/* =============================================== */

/* Estilo para o rodapé da tabela de logs e outros painéis */
.pagination-footer-titan {
    padding: 1rem !important;
    background-color: #1a2129 !important; /* Força o fundo sólido */
    border-top: 1px solid #3a505b !important;
    display: flex !important;
    justify-content: center !important;
    position: relative; /* Garante que não fique por baixo de outros elementos */
    z-index: 2; /* Garante que fique por cima */
}

/* Esconde o título do relatório na visualização normal da tela */
#print-header {
    display: none;
}

/* Regras para a impressão de relatórios */
@page {
    size: landscape; /* Define a orientação da página como paisagem */
    margin: 1cm;     /* Define uma margem de 1cm */
}

@media print {
    /* Mostra e estiliza o título apenas na hora de imprimir */
    #print-header {
        display: block;
        text-align: center;
        margin-bottom: 2rem;
    }
    #print-header h1 {
        font-size: 18pt;
    }
    #print-header p {
        font-size: 10pt;
        color: #666;
    }

    /* Esconde tudo que não queremos imprimir */
    body > #wrapper > .sidebar, 
    body > #wrapper > #page-content-wrapper > .navbar,
    .ticker-wrap,
    .card.shadow.mb-4:not(.card-titan-table),
    .card-titan-table .card-header,
    .card-titan-table .card-footer,
    .animated-title,
    .footer-titan,
    .pagination-footer-titan { /* Esconde a paginação na impressão também */
        display: none !important;
    }

    /* Garante que o conteúdo da tabela ocupe a página toda */
    #page-content-wrapper, #wrapper, .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
    }

    .card.card-titan-table {
        box-shadow: none !important;
        border: none !important;
    }

    /* Garante que o tema escuro seja revertido para impressão */
    body, .table {
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    .badge {
        border: 1px solid #ccc;
        color: #333 !important;
        background-color: #f0f0f0 !important;
    }

    /* Regras para ajustar o tamanho da tabela na impressão */
    table {
        font-size: 9pt; 
    }
    th, td {
        padding: 4px !important;
    }
}

/* =================================================================== */
/* ===     ESTILO UNIFICADO PARA CARDS DE RESUMO (ADMIN)           === */
/* =================================================================== */

.admin-summary-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    border-width: 1px;
    border-style: solid;
    border-left-width: 5px;
}
.admin-summary-card:hover {
    transform: translateY(-5px);
}
.admin-summary-card .icon-wrapper {
    padding: 15px;
    border-radius: 50%;
    margin-right: 20px;
    font-size: 24px;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-summary-card .card-title {
    font-size: 0.9rem;
    font-weight: 500;
}
.admin-summary-card .card-value {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Cores para o Tema Claro */
.card-border-left-primary { border-left-color: #4e73df !important; }
.card-border-left-primary .icon-wrapper { background-color: rgba(78, 115, 223, 0.1); color: #4e73df; }
.card-border-left-success { border-left-color: #1cc88a !important; }
.card-border-left-success .icon-wrapper { background-color: rgba(28, 200, 138, 0.1); color: #1cc88a; }
.card-border-left-info { border-left-color: #36b9cc !important; }
.card-border-left-info .icon-wrapper { background-color: rgba(54, 185, 204, 0.1); color: #36b9cc; }
.card-border-left-warning { border-left-color: #f6c23e !important; }
.card-border-left-warning .icon-wrapper { background-color: rgba(246, 194, 62, 0.1); color: #f6c23e; }

/* =================================================================== */
/* ===   PADRONIZAÇÃO VISUAL: ADMIN GERENCIAR USUÁRIOS (TEMA CLARO) === */
/* =================================================================== */

/* Estilo para os cards de ação no topo da página (Tema Claro) */
.admin-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    border-radius: .5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: var(--card-bg-light);
    border: 1px solid var(--border-color-light);
    color: var(--light-text-color);
    min-height: 180px;
    height: 100%;
}
.admin-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.admin-action-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}
.admin-action-card:hover i {
    color: var(--primary-color);
}
.admin-action-card span {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

/* Ajuste fino para centralizar texto em cards de ação */
.admin-action-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.action-text-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding-left: 10px;
}

/* =================================================================== */
/* ===         REFINAMENTO FINAL: TABELA DE AUDITORIA              === */
/* =================================================================== */

/* 1. Centraliza o conteúdo da tabela de logs por padrão */
#logsTable th,
#logsTable td {
    text-align: center;
    vertical-align: middle;
}

/* 2. Mantém a coluna "Descrição" alinhada à esquerda para melhor legibilidade */
#logsTable th:nth-child(4),
#logsTable td:nth-child(4) {
    text-align: left;
}

/* 3. Corrige o contraste do badge de evento no Tema Claro */
/* Aplica-se a qualquer tema que NÃO seja o escuro */
body:not(.theme-dark) .log-event-badge {
    background-color: #e7f3ff; /* Fundo azul bem claro */
    color: #0056b3 !important; /* Texto azul escuro para alto contraste */
    border: 1px solid #b8d6f3;
    font-weight: 600;
}

/* =================================================================== */
/* ===         REFINAMENTO VISUAL: MODAIS (TEMA CLARO)             === */
/* =================================================================== */

/* Aplica-se a qualquer tema que NÃO seja o escuro */
body:not(.theme-dark) .modal-content {
    border: 1px solid #dee2e6;
    /* Borda lateral colorida, como nos cards de resumo */
    border-left: 5px solid var(--primary-color); 
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

body:not(.theme-dark) .modal-header {
    background-color: #f8f9fc; /* Fundo cinza bem claro para destacar */
    border-bottom: 1px solid #dee2e6;
}

/* Título do modal com a cor primária do tema */
body:not(.theme-dark) .modal-header .modal-title {
    color: var(--primary-dark-color);
    font-weight: 600;
}

/* Deixa o botão de fechar (X) mais visível */
body:not(.theme-dark) .modal-header .btn-close {
    filter: invert(0.5) sepia(1) saturate(20) hue-rotate(170deg);
}

/* Campos de formulário com mais destaque */
body:not(.theme-dark) .modal-body .form-control,
body:not(.theme-dark) .modal-body .form-select {
    background-color: #fdfdff;
    border-color: #ced4da;
    transition: all 0.2s ease-in-out;
}

/* Efeito de foco nos campos, usando a cor primária */
body:not(.theme-dark) .modal-body .form-control:focus,
body:not(.theme-dark) .modal-body .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

body:not(.theme-dark) .modal-footer {
    background-color: #f8f9fc;
    border-top: 1px solid #dee2e6;
}

/* Novas cores de borda para cards */
.card-border-left-danger { border-left-color: #e74a3b !important; }
.card-border-left-danger .icon-wrapper { background-color: rgba(231, 74, 59, 0.1); color: #e74a3b; }
.card-border-left-dark { border-left-color: #5a5c69 !important; }
.card-border-left-dark .icon-wrapper { background-color: rgba(90, 92, 105, 0.1); color: #5a5c69; }

/* =================================================================== */
/* ===         ESTILOS PARA PÁGINA DE CONFIGURAÇÕES                === */
/* =================================================================== */

/* Estilo para o seletor de avatar no Tema Claro */
.avatar-label img {
    transition: all 0.2s ease-in-out;
    border: 3px solid #dee2e6; /* Borda cinza padrão */
    background-color: #f8f9fc;
}
.avatar-radio:checked + .avatar-label img {
    border-color: var(--primary-color); /* Borda azul ao selecionar */
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

/* =================================================================== */
/* ===         REFINAMENTO VISUAL: PÁGINA DE CONFIGURAÇÕES         === */
/* =================================================================== */

/* Aplica um fundo sutil e cor ao cabeçalho dos cards na página de
   configurações, apenas no tema claro. */
body:not(.theme-dark) .card-header .fa-user-astronaut,
body:not(.theme-dark) .card-header .fa-cogs {
    color: var(--primary-color);
}

body:not(.theme-dark) #page-content-wrapper .card-header {
    background-color: #f8f9fc;
}

/* =================================================================== */
/* ===    AJUSTE FINO: ESPESSURA DA BORDA EM CARDS (TEMA CLARO)     === */
/* =================================================================== */

/* Aumenta a espessura da borda lateral para cards no tema claro */
body:not(.theme-dark) .card[class*="card-border-left-"] {
    border-left-width: 3px;
}

/* =================================================================== */
/* === AJUSTE FINO: CORES DOS BOTÕES NA PÁGINA DE CONFIGURAÇÕES    === */
/* =================================================================== */

/* Garante que o botão no card 'Identidade' (borda azul) seja azul. */
body:not(.theme-dark) .card-border-left-primary .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
body:not(.theme-dark) .card-border-left-primary .btn-primary:hover {
    background-color: var(--primary-dark-color);
    border-color: var(--primary-dark-color);
}

/* Altera o botão no card 'Configurações' (borda ciano) para ser ciano. */
body:not(.theme-dark) .card-border-left-info .btn-primary {
    background-color: var(--info-color);
    border-color: var(--info-color);
}
body:not(.theme-dark) .card-border-left-info .btn-primary:hover {
    opacity: 0.9;
}

/* Novas cores de borda para cards do dashboard */
.card-border-left-purple { border-left-color: #6f42c1 !important; }
.card-border-left-purple .icon-wrapper { background-color: rgba(111, 66, 193, 0.1); color: #6f42c1; }
.card-border-left-pink { border-left-color: #e83e8c !important; }
.card-border-left-pink .icon-wrapper { background-color: rgba(232, 62, 140, 0.1); color: #e83e8c; }

/* =================================================================== */
/* === AJUSTE FINO: BORDA LATERAL PARA AÇÕES RÁPIDAS (TEMA CLARO)  === */
/* =================================================================== */

/* Adiciona a borda lateral colorida aos botões de ação rápida */
.quick-action-btn[class*="card-border-left-"] {
    border-left-width: 4px;
    border-left-style: solid;
}
/* =================================================================== */
/* ===         REFINAMENTO FINAL: BORDAS DOS GRÁFICOS (DASHBOARD)  === */
/* =================================================================== */

/* Adiciona uma borda e cabeçalho sutis aos cards de gráfico no tema claro */
body:not(.theme-dark) .dashboard-chart-card {
    border: 1px solid #e3e6f0;
}

body:not(.theme-dark) .dashboard-chart-card .card-header {
    background-color: #f8f9fc;
    font-weight: 600;
}

/* =================================================================== */
/* ===         PADRONIZAÇÃO GERAL: TÍTULOS DE PÁGINA               === */
/* =================================================================== */

.page-title-standard {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 2rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(90deg, #007bff, #1cc88a, #6f42c1, #007bff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* ALTERAÇÃO AQUI: de 6s para 15s */
    animation: gradient-animation 20s ease-in-out infinite;
}

.page-title-standard i {
    font-size: 2rem;
    margin-right: 15px;
    /* Aplica o mesmo gradiente ao ícone */
    background: linear-gradient(90deg, #007bff, #1cc88a, #6f42c1, #007bff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* ALTERAÇÃO AQUI: de 6s para 15s */
    animation: gradient-animation 20s ease-in-out infinite;
}

/* =================================================================== */
/* ===         PADRONIZAÇÃO GERAL: SUBTÍTULOS DE SEÇÃO             === */
/* =================================================================== */

.subtitle-standard {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center; /* CORRIGIDO para center */
    text-align: center;
    background: linear-gradient(90deg, #007bff, #1cc88a, #6f42c1, #007bff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-animation 20s ease-in-out infinite;
}

.subtitle-standard i {
    font-size: 1.4rem;
    margin-right: 15px;
    background: linear-gradient(90deg, #007bff, #1cc88a, #6f42c1, #007bff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-animation 15s ease-in-out infinite;
}

/* =================================================================== */
/* ===         REFINAMENTO FINAL: TABELA DE OPERAÇÕES              === */
/* =================================================================== */

/* Adiciona um fundo sutil ao cabeçalho de tabelas dentro de cards no tema claro */
body:not(.theme-dark) .card .table > thead {
    background-color: #f8f9fc;
}

/* ===================================================================== */
/* === CORREÇÃO UNIFICADA PARA TABELAS DE OPERAÇÕES (v4 - Final)     === */
/* ===================================================================== */

/* Seleciona a tabela em 'operations.php' (pelo ID) E as tabelas
   em 'livro_operacoes.php' (pela classe), aplicando o mesmo estilo. */

div.card .table#recent-operations-table td,
div.card .table.operations-table td {
    font-size: 0.9rem !important;
    padding: 0.6rem 0.5rem !important;
    vertical-align: middle;
}

div.card .table#recent-operations-table th,
div.card .table.operations-table th {
    font-size: 0.8rem !important;
    padding: 0.75rem 0.5rem !important;
    white-space: nowrap;
}


/* =================================================================== */
/* === REFINAMENTO: BORDAS NOS BOTÕES (v4 - Final e Detalhado)     === */
/* =================================================================== */

/* Define uma borda base para todos os botões no grupo */
.market-movers-actions .btn {
    border: 1px solid var(--border-color-light) !important;
    border-left-width: 4px !important; /* Borda esquerda mais espessa */
    font-weight: 600;
    margin: 0 4px; /* Pequeno espaçamento horizontal */
}

/* Define a COR da borda esquerda para cada tipo de botão */
.market-movers-actions .btn.btn-primary,
.market-movers-actions .btn.btn-outline-primary {
    border-left-color: var(--primary-color) !important;
}

.market-movers-actions .btn.btn-outline-warning {
    border-left-color: var(--warning-color) !important;
}

.market-movers-actions .btn.btn-outline-info {
    border-left-color: var(--info-color) !important;
}

/* Garante que o botão ativo (sólido) tenha a borda da mesma cor do fundo */
.market-movers-actions .btn.btn-primary {
    border-color: var(--primary-color) !important;
    border-left-width: 4px !important; /* Garante a espessura */
}

/* ... (regras existentes para .btn-primary, .btn-outline-warning, etc.) ... */

/* Define a COR da borda esquerda para cada tipo de botão */
.market-movers-actions .btn.btn-primary,
.market-movers-actions .btn.btn-outline-primary {
    border-left-color: var(--primary-color) !important;
}
.market-movers-actions .btn.btn-outline-warning {
    border-left-color: var(--warning-color) !important;
}
.market-movers-actions .btn.btn-outline-info {
    border-left-color: var(--info-color) !important;
}
/* ADICIONE ESTA NOVA REGRA ABAIXO */
.market-movers-actions .btn.btn-outline-danger {
    border-left-color: var(--danger-color) !important;
}

/* ... (restante do código) ... */

    @keyframes animate-gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
    .page-title-futuristic {
        font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 2.5rem;
        background: linear-gradient(90deg, #00c6ff, #0072ff, #7f00ff, #00c6ff);
        background-size: 300% 300%; animation: animate-gradient 8s ease-in-out infinite;
        -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
        text-shadow: 0 0 5px rgba(0, 198, 255, 0.5);
    }
    /* AJUSTE VISUAL 1: Centralização do cabeçalho de categoria */
    .category-header th {
        background-color: rgba(0, 255, 255, 0.1) !important; color: #00ffff !important;
        font-weight: 600; text-align: left !important; /* GARANTIDO ESTAR CENTRALIZADO */
        padding-left: 1.5rem !important;
        border-top: 2px solid #00ffff !important; border-bottom: 1px solid #00ffff !important;
    }
    
    /* CSS LENDÁRIO (Inalterado) */
    @keyframes ekg-pulse-green { 0%, 100% { text-shadow: 0 0 5px rgba(0, 255, 127, 0.7), 0 0 10px rgba(0, 255, 127, 0.5); transform: scale(1); } 50% { text-shadow: 0 0 10px rgba(0, 255, 127, 1), 0 0 20px rgba(0, 255, 127, 0.7); transform: scale(1.05); } }
    @keyframes ekg-pulse-yellow { 0%, 100% { text-shadow: 0 0 5px rgba(255, 193, 7, 0.7), 0 0 10px rgba(255, 193, 7, 0.5); transform: scale(1); } 50% { text-shadow: 0 0 10px rgba(255, 193, 7, 1), 0 0 20px rgba(255, 193, 7, 0.7); transform: scale(1.05); } }
    @keyframes ekg-pulse-red { 0%, 100% { text-shadow: 0 0 5px rgba(220, 53, 69, 0.7), 0 0 10px rgba(220, 53, 69, 0.5); transform: scale(1); } 50% { text-shadow: 0 0 10px rgba(220, 53, 69, 1), 0 0 20px rgba(220, 53, 69, 0.7); transform: scale(1.05); } }
    @keyframes guardian-pulse { 0%, 100% { text-shadow: 0 0 6px #0d6efd, 0 0 12px #0d6efd, 0 0 20px #fff; transform: scale(1.05); } 50% { text-shadow: 0 0 12px #0d6efd, 0 0 24px #0d6efd, 0 0 40px #fff; transform: scale(1.15); } }
    .vital-signs-js i { font-size: 1.1rem; transition: all 0.3s ease; }
    .pulse-positive i.fa-brain, .pulse-positive i.fa-cloud-sun { animation: ekg-pulse-green 2.5s ease-in-out infinite; }
    .pulse-neutral i.fa-brain, .pulse-neutral i.fa-cloud { animation: ekg-pulse-yellow 3s ease-in-out infinite; }
    .pulse-negative i.fa-brain, .pulse-negative i.fa-cloud-rain { animation: ekg-pulse-red 2s ease-in-out infinite; }
    .pulse-guardian i.fa-gem { animation: guardian-pulse 1.5s ease-in-out infinite; }

    /* AJUSTE VISUAL 2: Efeito Neon para o Modal de Ajuda */
    .modal-content-neon {
        border: 1px solid #00ffff;
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.5), 0 0 30px rgba(0, 114, 255, 0.3);
    }

    /* Estilo para subtítulos/descrições de página */
.page-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d; /* Cinza um pouco mais escuro que o 'muted' */
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* =================================================================== */
/* ===       ANÁLISE GRÁFICA: ESTILO HÍBRIDO PARA CARDS            === */
/* =================================================================== */

.summary-card-v2 {
    text-align: center;
    padding: 1.25rem;
    height: 100%;
}
.summary-card-v2 .summary-card-title {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 500;
}
.summary-card-v2 .summary-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.summary-card-v2 .summary-card-value i {
    font-size: 1.5rem;
    margin-right: 10px;
    opacity: 0.7;
}

/* =================================================================== */
/* ===   PADRONIZAÇÃO VISUAL: TÍTULOS DE CARD INTERNO            === */
/* =================================================================== */

.card .card-header .card-header-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-dark-color, #0056b3);
    display: flex;
    align-items: center;
    margin: 0; /* Remove margens extras */
}

.card .card-header .card-header-title i {
    font-size: 1rem;
    margin-right: 10px;
    opacity: 0.8;
}
/* =================================================================== */
/* ===     REFINAMENTO VISUAL: IDENTIDADE P/ PERFIS DE RISCO       === */
/* =================================================================== */

/* Define a cor base para o perfil MODERADO (que já vem checado) */
.risk-profile-options .form-check-input#risk_moderate:checked + .form-check-label {
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
    color: #000; /* Texto preto para melhor contraste com o amarelo */
}

/* Define a cor para o perfil CONSERVADOR quando selecionado */
.risk-profile-options .form-check-input#risk_conservative:checked + .form-check-label {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

/* Define a cor para o perfil ARROJADO quando selecionado */
.risk-profile-options .form-check-input#risk_aggressive:checked + .form-check-label {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
    color: #fff;
}

/*
 * CORREÇÃO DEFINITIVA: Centraliza e força a quebra de linha
 * no texto dos cards de ação do painel administrativo.
*/
.admin-action-link .action-text-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 0 5px; /* Adiciona um pequeno respiro nas laterais */
}

.admin-action-link .action-text-wrapper span {
    word-break: break-word; /* Força a quebra de palavras longas */
}

/* =================================================================== */
/* ===    REFINAMENTO: VISIBILIDADE DO STATUS DO SCANNER (TEMA CLARO) == */
/* =================================================================== */

.scan-source-info {
    color: #5a5c69 !important; /* Cinza escuro para alto contraste */
    font-weight: 600 !important; /* Semi-negrito para destaque */
}

/* ========================================================= */
/* 🔥 TITAN FIX: CONTRASTE PROFISSIONAL PARA TEMA CLARO */
/* ========================================================= */

/* Fundo geral mais suave */
body.theme-light {
    background: #f5f7fa;
}

/* Card principal continua branco */
body.theme-light .card {
    background-color: #ffffff;
    border: 1px solid #e3e8ef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-radius: 12px;
}

/* 🔥 CARD INTERNO (RADAR, MAPA, ETC) */
body.theme-light .card-inner,
body.theme-light .bloco-interno,
body.theme-light .radar-bloco {
    background: linear-gradient(145deg, #f8fafc, #eef3f8);
    border: 1px solid #dde5ec;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* 🔥 ITENS INDIVIDUAIS (ativos, sinais, etc) */
body.theme-light .item-card,
body.theme-light .signal-card,
body.theme-light .ativo-card {
    background: #ffffff;
    border: 1px solid #e6ecf2;
    border-left: 4px solid #0d6efd;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

body.theme-light .item-card:hover,
body.theme-light .signal-card:hover,
body.theme-light .ativo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

/* 🔥 MAPA TÉRMICO (separação visual dos blocos internos) */
body.theme-light .mapa-termico-bloco {
    background: linear-gradient(145deg, #f4f8fb, #eaf1f7);
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    padding: 10px;
}

/* 🔥 SEPARAÇÃO DE GRID (evita "tudo colado") */
body.theme-light .row > div {
    margin-bottom: 10px;
}

/* 🔥 MICRO-CONTRASTE PARA TEXTO */
body.theme-light .text-muted {
    color: #5a5c69 !important;
}
/* =========================================================
   TRADEACAD - Controle rápido do som das notificações
   Preferência salva no navegador via localStorage.
   ========================================================= */
.notification-sound-toggle {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(0, 217, 255, 0.35);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.16), rgba(102, 92, 255, 0.12));
    color: #00d9ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(0, 217, 255, 0.18);
    transition: all 0.2s ease;
}
.notification-sound-toggle:hover {
    color: #ffffff;
    border-color: rgba(0, 217, 255, 0.75);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.32), rgba(102, 92, 255, 0.22));
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.35);
    transform: translateY(-1px);
}
.notification-sound-toggle.is-muted {
    color: #ff4d6d;
    border-color: rgba(255, 77, 109, 0.45);
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.16), rgba(31, 41, 55, 0.12));
    box-shadow: 0 0 14px rgba(255, 77, 109, 0.16);
}
body.theme-light .notification-sound-toggle {
    background: linear-gradient(135deg, #eefbff, #f5f7ff);
    color: #0084a8;
    border-color: rgba(0, 132, 168, 0.28);
    box-shadow: 0 4px 12px rgba(0, 132, 168, 0.10);
}
body.theme-light .notification-sound-toggle:hover {
    color: #005a73;
    background: linear-gradient(135deg, #dff7ff, #edf0ff);
    border-color: rgba(0, 132, 168, 0.45);
}
body.theme-light .notification-sound-toggle.is-muted {
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.28);
    background: linear-gradient(135deg, #fff0f2, #ffffff);
}


/* =====================================================================
   v124 - Compatibilidade global do login no mobile.
   O styles.css antigo também mexe em .login-body; estas regras impedem que
   ele force o login para o layout flex/desktop no celular.
   ===================================================================== */
body.login-body.auth-page.auth-mobile-server,
body.login-body.auth-page.auth-mobile-force,
body.login-body.auth-page[data-auth-mobile="1"] {
    display: block !important;
    align-items: initial !important;
    justify-content: initial !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

body.login-body.auth-page.auth-mobile-server .auth-shell,
body.login-body.auth-page.auth-mobile-force .auth-shell,
body.login-body.auth-page[data-auth-mobile="1"] .auth-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
}

body.login-body.auth-page.auth-mobile-server .auth-layout,
body.login-body.auth-page.auth-mobile-force .auth-layout,
body.login-body.auth-page[data-auth-mobile="1"] .auth-layout {
    display: block !important;
    grid-template-columns: none !important;
    width: min(430px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    margin: 0 auto !important;
}


/* v126 - evita que regras antigas de styles.css voltem a centralizar o login como desktop no mobile */
html.ta-auth-mobile-server body.login-body,
html.ta-auth-mobile-force body.login-body,
body.login-body[data-auth-mobile="1"] {
    display: block !important;
    align-items: initial !important;
    justify-content: initial !important;
    min-height: 100svh !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}
