﻿/* --- VARIÁVEIS DE ALTO CONTRASTE (INTELIGÊNCIA V2) --- */
:root {
    --bg-deep: #05070a; /* Fundo total para contraste máximo */
    --bg-card: #0f172a; /* Azul marinho profundo para cartões */
    --neon-blue: #38bdf8; /* Azul de Destaque (Ciano) */
    --neon-green: #22c55e; /* Verde Vibrante */
    --neon-red: #ff4d4d; /* Vermelho Alerta */
    --neon-yellow: #fbbf24; /* Amarelo Alerta */
    --text-main: #ffffff; /* TEXTO PRINCIPAL AGORA É BRANCO PURO */
    --text-muted: #94a3b8; /* Cinza azulado mais legível */
    --border-color: #1e293b; /* Bordas mais visíveis */
}

/* --- RESET E FUNDO --- */
html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deep) !important;
    color: var(--text-main) !important;
    line-height: 1.5;
}

/* --- LEITURA DE TEXTO MELHORADA --- */
h1, h2, h3, h4, h5, b, strong {
    color: #ffffff !important; /* Força branco em todos os títulos */
    text-shadow: 0 0 1px rgba(0,0,0,0.5); /* Melhora contorno das letras */
}

.text-muted {
    color: #cbd5e1 !important; /* Cinza bem mais claro que o anterior */
}

/* --- FORMULÁRIOS (CONTRASTE PARA DIGITAÇÃO) --- */
.form-control, .form-select {
    background-color: #000000 !important; /* Fundo preto para o texto branco brilhar */
    border: 1px solid #334155 !important;
    color: #ffffff !important; /* Texto digitado sempre branco */
    font-weight: 500;
}

    .form-control::placeholder {
        color: #475569 !important; /* Placeholder discreto mas visível */
    }

.form-label {
    color: var(--neon-blue) !important; /* Labels agora em Ciano para facilitar localização */
    font-size: 0.8rem;
    text-shadow: 0 0 5px rgba(56, 189, 248, 0.2);
}

/* --- TABELAS (FOCO NA MATRIZ) --- */
.table {
    color: #ffffff !important;
}

    .table thead th {
        background-color: #0f172a !important;
        color: var(--neon-blue) !important; /* Títulos da tabela em Ciano */
        border-bottom: 2px solid var(--neon-blue) !important;
        font-weight: 700;
        text-transform: uppercase;
    }

.table-hover tbody tr:hover {
    background-color: rgba(56, 189, 248, 0.1) !important; /* Realce azul ao passar o mouse */
}

/* --- SCROLLBARS (MAIS VISÍVEIS) --- */
::-webkit-scrollbar-thumb {
    background: #334155;
    border: 2px solid var(--bg-deep);
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--neon-blue);
    }

/* --- COMPONENTES --- */
.glass-card {
    background: var(--bg-card);
    border: 1px solid #334155;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background-color: var(--neon-blue) !important;
    color: #000000 !important; /* Texto preto no fundo azul para ler melhor */
    border: none;
    font-weight: 800;
}

/* Customização do Modal de Reconexão Blazor */
#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10001;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(5, 7, 10, 0.9); /* Tom escuro do seu sistema */
    color: #38bdf8; /* Azul destaque */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

    /* Quando o Blazor está tentando reconectar */
    #components-reconnect-modal.components-reconnect-show {
        display: flex;
    }

    /* Conteúdo interno do modal */
    #components-reconnect-modal::before {
        content: "⚠️ CONEXÃO INTERROMPIDA";
        font-weight: bold;
        font-size: 1.5rem;
        margin-bottom: 10px;
        display: block;
    }

    #components-reconnect-modal::after {
        content: "Tentando restabelecer vínculo com o servidor de inteligência...";
        font-size: 0.9rem;
        color: #94a3b8;
    }

    /* Esconde os botões padrão de "retry" que o Blazor tenta colocar */
    #components-reconnect-modal h5,
    #components-reconnect-modal .components-reconnect-hide {
        display: none !important;
    }