/* ==========================================================================
   COMPONENTS UI - "CLEAN ENTERPRISE THEME" (v6.0)
   ========================================================================== */

/* --- 1. CARDS E PAINÉIS --- */
.card {
    background: #ffffff;
    border: none;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08) !important;
    margin-bottom: 24px;
    overflow: visible !important; /* Permite sombras vazarem */
    transition: transform 0.2s ease;
}

/* Remove cores de fundo antigas (bg-primary, etc) e deixa limpo */
.card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 25px;
    border-radius: 20px 20px 0 0 !important;
}

/* Títulos dos Cards */
.card-header h5, .card-header h6 {
    color: var(--primary-color) !important; /* Sempre escuro */
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Ícones nos títulos (Coloridos automaticamente) */
.card-header i {
    background: rgba(52, 152, 219, 0.1); /* Fundo azulzinho padrão */
    color: var(--secondary-color);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 1rem;
}

/* Variações de cor para os ícones baseadas no contexto antigo */
.card-header.bg-success i, .text-success i { background: #dcfce7 !important; color: #15803d !important; }
.card-header.bg-danger i, .text-danger i { background: #fee2e2 !important; color: #991b1b !important; }
.card-header.bg-warning i, .text-warning i { background: #fef3c7 !important; color: #92400e !important; }
.card-header.bg-info i, .text-info i { background: #e0f2fe !important; color: #0369a1 !important; }

/* --- 2. FORMULÁRIOS MODERNOS --- */
.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-control, .form-select {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 0.95rem;
    color: #334155;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
}

/* Textareas (Notas, Seriais) */
textarea.form-control {
    font-family: 'Courier New', monospace; /* Fonte mono para seriais */
    line-height: 1.6;
}

/* --- 3. BOTÕES PREMIUM --- */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: none;
    transition: all 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 8px; }

/* Cores Sólidas */
.btn-primary { background: linear-gradient(135deg, #3498db, #2980b9); color: white; }
.btn-success { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; }
.btn-danger  { background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; }
.btn-warning { background: linear-gradient(135deg, #f1c40f, #f39c12); color: white; }
.btn-info    { background: linear-gradient(135deg, #3498db, #2980b9); color: white; } /* Info vira azul */

/* Botões Outline (Fundo branco) */
.btn-outline-secondary { border: 1px solid #e2e8f0; color: #64748b; background: white; }
.btn-outline-secondary:hover { background: #f1f5f9; color: #334155; }

/* --- 4. TABELAS LIMPAS --- */
.table-responsive {
    border-radius: 16px;
    box-shadow: none;
    border: 1px solid #f1f5f9;
}
.table { margin-bottom: 0; }
.table thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 15px;
    border: none;
}
.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.9rem;
}

/* --- 5. ELEMENTOS DE ALERTA E LISTAS --- */
/* Transformar os alertas padrão em cards suaves */
.alert {
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
}
.alert-info { background: #e0f2fe; color: #0369a1; }
.alert-warning { background: #fffbeb; color: #b45309; }
.alert-danger { background: #fef2f2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }

/* Melhorias para telas de Operação (Entrada/Saída) */

/* Cards de Coluna (Ex: Origem x Destino) */
.card.border-info, .card.border-success {
    border: 1px solid #e2e8f0 !important; /* Remove bordas coloridas grossas */
    border-top: 4px solid !important; /* Mantém só o topo colorido */
}
.card.border-info { border-top-color: #3498db !important; }
.card.border-success { border-top-color: #2ecc71 !important; }

/* Header interno (ex: "Informações da Filial") */
.card-header.bg-info, .card-header.bg-success {
    background: white !important;
    color: #334155 !important;
    border-bottom: 1px dashed #e2e8f0;
    padding: 15px 20px;
}
.card-header.bg-info h6, .card-header.bg-success h6 {
    color: #334155;
    font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}

/* Ícone do título */
.card-header.bg-info i { color: #3498db; background: #e0f2fe; }
.card-header.bg-success i { color: #2ecc71; background: #dcfce7; }

/* Input Groups (Data, Busca) */
.input-group-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    border-radius: 12px 0 0 12px;
}
.input-group .form-control {
    border-radius: 0 12px 12px 0;
}

/* --- RESPONSIVIDADE TABELAS (MOBILE) --- */
@media (max-width: 768px) {
    .table thead { display: none; }
    .table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    }
    .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
        border-bottom: 1px dashed #f1f5f9;
        text-align: right;
    }
    .table tbody td:last-child { border: none; justify-content: center; }
    .table tbody td::before {
        content: attr(data-label); /* Tenta pegar do HTML */
        font-weight: 700;
        color: #94a3b8;
        text-transform: uppercase;
        font-size: 0.7rem;
        text-align: left;
    }
}


/* ==========================================================================
   ALERTA GLOBAL (TRAVAMENTO DE TELA)
   ========================================================================== */
#global-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95); /* Fundo escuro quase sólido */
    backdrop-filter: blur(15px); /* Borra o fundo */
    z-index: 9999; /* Fica na frente de ABSOLUTAMENTE TUDO */
    display: none; /* Escondido por padrão */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    animation: fadeInAlert 0.3s ease-out;
}

.global-alert-box {
    background: white;
    max-width: 500px;
    width: 100%;
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: slideUpAlert 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Ícone pulsante */
.alert-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 25px auto;
    animation: pulseRed 2s infinite;
}

.global-alert-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 15px;
}

.global-alert-message {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-alert-confirm {
    background: #ef4444;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 15px 40px;
    border-radius: 50px;
    border: none;
    width: 100%;
    transition: transform 0.2s;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}
.btn-alert-confirm:hover {
    background: #dc2626;
    transform: translateY(-2px);
}
.btn-alert-confirm:active {
    transform: scale(0.95);
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@keyframes fadeInAlert { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUpAlert { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Correção de Texto em Alertas Informativos */
.alert-info {
    color: #055160 !important; /* Azul escuro padrão do Bootstrap */
    background-color: #cff4fc !important;
    border-color: #b6effb !important;
}
.alert-info ul, .alert-info li {
    color: #055160 !important; /* Garante que listas dentro do alerta sejam azuis */
}

/* ==========================================================================
   FORMULÁRIOS E INPUTS (PADRONIZAÇÃO GERAL)
   ========================================================================== */
.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-control, .form-select {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px; /* Arredondado */
    padding: 12px 15px; /* Mais espaço para digitar */
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1); /* Glow suave */
}

/* ==========================================================================
   TABELAS RESPONSIVAS (A MÁGICA MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    /* Esconde o cabeçalho da tabela no mobile */
    .table-responsive table thead {
        display: none;
    }

    /* Transforma cada linha (tr) em um Card */
    .table-responsive table tbody tr {
        display: block;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        margin-bottom: 15px;
        border: 1px solid #f1f5f9;
        padding: 15px;
    }

    /* Transforma cada célula (td) em uma linha flexível */
    .table-responsive table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed #f1f5f9;
        text-align: right; /* Conteúdo alinhado à direita */
    }

    .table-responsive table tbody td:last-child {
        border-bottom: none;
    }

    /* Cria o "Rótulo" da coluna usando um atributo data (se existir) ou ordem */
    /* Truque: Como não temos data-label em tudo, vamos estilizar genericamente */
    .table-responsive table tbody td::before {
        content: attr(data-label); /* Se você adicionar data-label no HTML */
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: #94a3b8;
        margin-right: 15px;
        text-align: left;
    }

    /* Ajuste para botões dentro da tabela mobile */
    .table-responsive table tbody td .btn {
        width: 100%;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    /* Ajuste específico para a coluna de Ações (botões) */
    .table-responsive table tbody td:last-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* css/components.css - Ajuste Fino de Tabelas */

/* Tabelas Compactas para Configurações */
.config-pane .table {
    font-size: 0.85rem; /* Fonte menor */
}

.config-pane .table th,
.config-pane .table td {
    padding: 8px 10px; /* Menos espaçamento */
    vertical-align: middle;
}

/* Coluna de Ações (Botões) - Fixa largura para não quebrar */
.config-pane .table td:last-child {
    white-space: nowrap;
    width: 1%; /* Força a coluna a ter o tamanho mínimo do conteúdo */
}

/* Badges menores nas tabelas de config */
.config-pane .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

/* Responsividade Específica para Tabela de Técnicos */
@media (max-width: 1200px) {
    /* Em telas médias, permite quebra de linha no nome/cargo */
    #techniciansList td {
        white-space: normal;
    }
}

/* css/components.css */

@media (max-width: 768px) {
    /* Regra específica para a tabela de Resumo de Estoque (#resumoEstoque) */
    #resumoEstoque tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    #resumoEstoque td {
        display: flex;
        justify-content: space-between;
        width: 100%;
        border: none;
        padding: 5px 0;
    }

    /* Adiciona rótulos automáticos para cada célula */
    #resumoEstoque td:nth-of-type(1)::before { content: "Modelo:"; font-weight: bold; color: #64748b; }
    #resumoEstoque td:nth-of-type(2)::before { content: "Estoque:"; font-weight: bold; color: #64748b; }
    #resumoEstoque td:nth-of-type(3)::before { content: "Transferidos:"; font-weight: bold; color: #64748b; }
    #resumoEstoque td:nth-of-type(4)::before { content: "Total:"; font-weight: bold; color: #64748b; }
    
    /* Esconde o cabeçalho da tabela */
    #relatorios .table thead { display: none; }
}

/* css/components.css - CORREÇÕES DE FONTE */

/* Formulários - Letra maior para digitar */
.form-control, .form-select {
    font-size: 1rem !important; /* Força tamanho normal */
    padding: 10px 15px;
}
.form-label {
    font-size: 0.85rem !important; /* Labels um pouco menores, mas legíveis */
    font-weight: 700;
}

/* Tabelas - Chega de letra miúda */
.table td {
    font-size: 0.95rem !important; /* Quase o tamanho normal */
    padding: 12px 15px;
}
.table th {
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botões */
.btn {
    font-size: 0.95rem !important;
}
.btn-sm {
    font-size: 0.85rem !important; /* Botões pequenos não podem ser minusculos */
}

/* Alertas e Badges */
.alert {
    font-size: 0.95rem;
}
.badge {
    font-size: 0.8rem !important; /* Badges legíveis */
    padding: 0.5em 0.8em;
}

/* ==========================================================================
   FIX FINAL: ALERTAS E NOTIFICAÇÕES (TOASTS)
   ========================================================================== */

/* 1. POSICIONAMENTO (Garante que não trave a tela) */
.toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 99999 !important; /* Fica acima de tudo */
    pointer-events: none;      /* Permite clicar através da área vazia */
    display: flex;
    flex-direction: column;
    gap: 10px;                 /* Espaço entre um alerta e outro */
}

/* 2. O CARTÃO DO ALERTA (Aumentando tamanho e beleza) */
.toast {
    pointer-events: auto;      /* O alerta em si recebe clique */
    background-color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important; /* Mais arredondado */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important; /* Sombra forte para destaque */
    opacity: 1 !important;     /* Remove transparência */
    min-width: 350px !important; /* Mais largo para caber o texto */
    font-family: 'Inter', sans-serif !important;
}

/* 3. CABEÇALHO DO ALERTA (Título e Ícone) */
.toast-header {
    padding: 12px 15px !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    display: flex;
    align-items: center;
}

.toast-header strong {
    font-size: 1rem !important; /* Aumenta título (16px) */
    font-weight: 800 !important;
    letter-spacing: 0.5px;
}

.toast-header i {
    font-size: 1.2rem !important; /* Ícone maior */
    margin-right: 10px !important;
}

/* 4. CORPO DO ALERTA (Aumenta a letra do texto) */
.toast-body {
    padding: 15px !important;      /* Mais respiro interno */
    font-size: 0.95rem !important; /* Fonte maior (aprox 15px) */
    color: #334155 !important;     /* Cinza escuro legível */
    line-height: 1.5 !important;   /* Espaço entre linhas */
    font-weight: 500 !important;
}

/* Botões dentro do alerta (Ex: "Ver Chat") */
.toast-body .btn {
    margin-top: 10px !important;
    width: 100% !important;
    font-size: 0.9rem !important;
}

/* ==========================================================================
   CORES DE ALTO CONTRASTE (Para cabeçalhos)
   ========================================================================== */

/* Sucesso (Verde) */
.toast-header.bg-success {
    background-color: #dcfce7 !important;
    color: #14532d !important;
}
/* Erro (Vermelho) */
.toast-header.bg-danger {
    background-color: #fee2e2 !important;
    color: #7f1d1d !important;
}
/* Aviso (Amarelo) */
.toast-header.bg-warning {
    background-color: #fef3c7 !important;
    color: #78350f !important;
}
/* Info (Azul) */
.toast-header.bg-info, .toast-header.bg-primary {
    background-color: #e0f2fe !important;
    color: #0c4a6e !important;
}

/* ==========================================================================
   FIX FINAL: ALERTAS (VISUAL + FUNCIONALIDADE)
   ========================================================================== */

.alert {
    /* Mantém o Flex para alinhar, mas permite ser sobrescrito */
    display: flex !important; 
    align-items: flex-start !important;
    padding: 15px 20px !important;
    border: none !important;
    border-radius: 10px !important;
    margin-bottom: 20px !important;
    line-height: 1.5 !important;
    position: relative;
}

/* --- A CORREÇÃO DO "FANTASMA" --- */
/* Se o elemento tiver style="display: none", força ele a sumir */
.alert[style*="display: none"], 
.alert.d-none {
    display: none !important;
}

/* Ícone */
.alert i, .alert .fas, .alert .fa {
    font-size: 1.4rem !important;
    margin-right: 15px !important;
    margin-top: 3px !important; /* Ajuste fino vertical */
    flex-shrink: 0 !important;
}

/* Texto e Listas */
.alert div, .alert span, .alert p {
    flex-grow: 1;
    width: 100%;
}
.alert ul { margin: 5px 0 0 0 !important; padding-left: 20px !important; }

/* Cores (Mantendo seu padrão bonito) */
.alert-info    { background: linear-gradient(to right, #e0f2fe, #fff); color: #0284c7; border-left: 5px solid #0284c7; }
.alert-info i  { color: #0284c7; }

.alert-danger  { background: linear-gradient(to right, #fee2e2, #fff); color: #b91c1c; border-left: 5px solid #b91c1c; }
.alert-danger i { color: #b91c1c; }

.alert-success { background: linear-gradient(to right, #dcfce7, #fff); color: #15803d; border-left: 5px solid #15803d; }
.alert-success i { color: #15803d; }

/* Correção Específica para o Banner de Atualização (Fixo embaixo) */
#update-banner {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    min-width: 300px;
    z-index: 9999 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    align-items: center !important; /* Alinha botão e texto no centro vertical */
}

/* ==========================================================================
   REFINAMENTO VISUAL (Correção Segura de Fontes)
   ========================================================================== */

/* 1. ALERTAS LEGÍVEIS (Sem quebrar ícones) */
.alert {
    color: #334155 !important;
}
.alert strong, .alert b {
    color: #1e293b !important;
    font-weight: 800 !important;
    margin-right: 5px;
}
/* Mantém cores dos ícones */
.alert-danger i { color: #dc2626 !important; }
.alert-info i { color: #0284c7 !important; }
.alert-warning i { color: #d97706 !important; }
.alert-success i { color: #16a34a !important; }

/* 2. CORREÇÃO DE FONTE EM CAMPOS DE TEXTO (Sem afetar ícones) */
textarea.form-control::placeholder,
textarea.form-control,
.form-text {
    /* Removemos .text-muted daqui para não quebrar o FontAwesome */
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: #64748b !important;
}

/* Destaque apenas para o que é digitável */
textarea.form-control {
    font-weight: 500;
}

/* Animação de Pulso para o Status 'Em Trânsito' */
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

.status-pulsing {
    animation: pulse-blue 2s infinite;
}

.hover-elevate:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
    border-color: #0d6efd !important; /* Borda azul ao passar o mouse */
}
.transition-all {
    transition: all 0.2s ease-in-out;
}

/*CSS TELA DE CTOS/*

/* Efeito de levantar o card ao passar o mouse */
.card-hover-modern {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,.05); /* Borda sutil */
}

.card-hover-modern:hover {
    transform: translateY(-5px); /* Move ligeiramente para cima */
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.10) !important; /* Sombra mais forte */
}

/* Bordas de acento no topo */
.border-top-success-accent {
    border-top: 4px solid #198754 !important; /* Verde do Bootstrap */
}

.border-top-info-accent {
    border-top: 4px solid #0dcaf0 !important; /* Azul ciano do Bootstrap */
}

/* Ícone da CTO */
.cto-icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(13, 110, 253, 0.1); /* Azul primário bem claro */
    color: #0d6efd;
    border-radius: 8px;
}

/* Borda lateral indicando status Pendente (Amarelo/Warning) */
.card-border-warning {
    border-left: 4px solid #ffc107 !important;
}

/* Avatar do Requisitante */
.requester-avatar {
    width: 40px;
    height: 40px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Card Frota Premium */
.fleet-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
}
.fleet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Marca d'água (Ícone Gigante Transparente) */
.fleet-watermark {
    position: absolute;
    bottom: -10px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    pointer-events: none;
    color: #000;
}

/* Estilo Premium para o Wizard de Vistoria */
.step-target { 
    width: 120px; 
    text-align: center; 
    padding: 10px; 
    border-radius: 12px; 
    background: #f1f3f5; 
    color: #adb5bd; 
    font-weight: bold; 
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.step-target.active { 
    background: #fff !important; 
    color: #1a2a6c !important; 
    border-color: #1a2a6c !important; 
    transform: translateY(-5px); 
    box-shadow: 0 5px 15px rgba(26, 42, 108, 0.2); 
}

.step-target.completed { 
    background: #d1e7dd !important; 
    color: #0f5132 !important; 
}

/* Onde estava o erro: Corrigido para text-transform */
.step-target small { 
    display: block; 
    font-size: 10px; 
    text-transform: uppercase; 
    margin-top: 4px; 
}

.step-line { 
    flex-grow: 1; 
    height: 2px; 
    background: #dee2e6; 
    align-self: center;
    margin-bottom: 10px; /* Ajuste para alinhar com o centro das bolinhas */
}

/* --- VISTORIA PREMIUM STYLES --- */

/* Variáveis Locais (Escopo Global ou Root) */
:root {
    --vp-primary: #2563eb;
    --vp-dark: #0f172a;
    --vp-light: #f8fafc;
    --vp-border: #e2e8f0;
    --vp-success: #10b981;
    --vp-danger: #ef4444;
}

/* Modal e Container */
.modal-content-premium {
    border: none !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: #fff;
}

.header-premium {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 1.5rem 2rem;
    color: white;
}

/* Navegação (Abas/Pills) */
.nav-pills-premium {
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 16px;
    margin: 0 1.5rem 1.5rem 1.5rem;
    border: 1px solid var(--vp-border);
}

.nav-pills-premium .nav-link {
    border-radius: 12px;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
}

.nav-pills-premium .nav-link.active {
    background: white;
    color: var(--vp-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Cards dos Itens */
.item-card {
    background: white;
    border: 1px solid var(--vp-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* Destaque vermelho sutil se tiver defeito marcado */
.item-card.has-defect {
    border-color: #fca5a5; 
    background-color: #fef2f2;
}

.item-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

/* Inputs Modernos */
.input-premium {
    background-color: #f1f5f9 !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    padding: 0.6rem 1rem !important;
    font-weight: 500 !important;
    transition: all 0.2s;
}

.input-premium:focus {
    background-color: white !important;
    border-color: var(--vp-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
    outline: none;
}

/* --- BOTÕES DE STATUS (A MÁGICA VISUAL) --- */
.status-btn-group {
    background: #f8fafc;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--vp-border);
    display: inline-flex;
    gap: 4px;
}

.btn-premium {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Estado: OK ATIVO (Sólido) */
.btn-premium-ok.active {
    background-color: var(--vp-success);
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
    transform: scale(1.05);
}

/* Estado: OK INATIVO (Ghost) */
.btn-premium-ok {
    background-color: transparent;
    color: #94a3b8; /* Cinza claro */
    border: 1px solid transparent;
}
.btn-premium-ok:hover {
    color: var(--vp-success);
    background-color: #d1fae5;
}

/* Estado: RUIM ATIVO (Sólido) */
.btn-premium-nok.active {
    background-color: var(--vp-danger);
    color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}

/* Estado: RUIM INATIVO (Ghost) */
.btn-premium-nok {
    background-color: transparent;
    color: #94a3b8;
    border: 1px solid transparent;
}
.btn-premium-nok:hover {
    color: var(--vp-danger);
    background-color: #fee2e2;
}

/* Checkboxes Chips (Pílulas de defeito) */
.chip-check:checked + label {
    background-color: var(--vp-dark) !important;
    color: white !important;
    border-color: var(--vp-dark) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.chip-check + label {
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.85rem;
    border: 1px solid var(--vp-border);
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

/*===============================================*/

/*alinamentos colunas */

/* --- CORREÇÃO DEFINITIVA DE ALINHAMENTO (EPIs) --- */

/* 1. Alinhamento Vertical */
.modal-content-premium table th,
.modal-content-premium table td {
    vertical-align: middle !important;
}

/* 2. Larguras fixas aplicadas nas células de DADOS (td) 
   Isso garante que o cabeçalho mesclado obedeça a essas larguras */

/* Coluna 1: CA (Pequena) */
.modal-content-premium tbody td:nth-child(1) {
    width: 8%; 
    font-weight: 800;
    color: #64748b;
    padding-left: 1.5rem !important;
}

/* Coluna 2: Descrição (Grande) */
.modal-content-premium tbody td:nth-child(2) {
    width: 32%; 
    font-weight: 600;
    color: #334155;
}

/* Coluna 3: Data Entrega (Média) */
.modal-content-premium tbody td:nth-child(3) {
    width: 15%; 
    text-align: center;
}

/* Coluna 4: Data Validade (Média) */
.modal-content-premium tbody td:nth-child(4) {
    width: 15%; 
    text-align: center;
}

/* Coluna 5: Status (Dropdown) */
.modal-content-premium tbody td:nth-child(5) {
    width: 20%; 
    text-align: center;
}

/* Coluna 6: Ação (Lixeira) */
.modal-content-premium tbody td:nth-child(6) {
    width: 10%; 
    text-align: center;
    padding-right: 1.5rem !important;
}

/* Ajuste visual do Cabeçalho Mesclado */
.modal-content-premium thead th {
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: none;
    background: #1e293b; /* Cor escura do header */
}

/*===================================================================*/

/* =========================================
   ANIMAÇÕES DO RANKING (MVP)
   ========================================= */

@keyframes mvpPulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

@keyframes mvpTextShine {
    0% { background-position: -100%; }
    100% { background-position: 200%; }
}

.mvp-badge-podium {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%); /* Gradiente Rubi */
    color: white;
    border: 2px solid #fff;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 0.35em 0.8em;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); /* Sombra 3D */
    animation: mvpPulseGlow 2s infinite; /* Animação do Pulso */
    z-index: 10;
}

/* Brilho no texto e estrela */
.mvp-badge-podium span {
    background: linear-gradient(to right, #fff 20%, #ffd700 40%, #fff 60%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: mvpTextShine 3s linear infinite reverse;
    display: inline-block;
}

/*=================================================================================*/

/* Cards da Sidebar (Notificações) */
.sidebar-card {
    background: #fff;
    border: 1px solid #e9ecef; /* Borda bem suave */
    border-radius: 8px; /* Cantos arredondados */
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-card:hover {
    transform: translateY(-2px); /* Efeito de levitação */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    border-color: #dee2e6;
}

/* Ícone Redondo com Fundo Colorido */
.card-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

/*==================================================================================*/

/* === MODAL DE VÍNCULO RH (Responsivo) === */

/* Scrollbar personalizada e suave */
.custom-scroll::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: #f1f1f1; }
.custom-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: #999; }

/* Container Principal do Modal */
.modal-custom-content {
    border-radius: 20px;
    overflow: hidden;
    height: auto; 
    max-height: 95vh; /* Limite de segurança para não estourar a tela */
    display: flex;
    flex-direction: column;
}

/* Áreas de rolagem (Colunas) */
.col-scroll-area {
    overflow: visible; /* No mobile, deixa crescer naturalmente */
    height: auto;
}

/* --- Regras para Desktop (Telas grandes) --- */
@media (min-width: 992px) {
    .modal-custom-content {
        height: 80vh; /* Altura fixa apenas no desktop */
    }
    .col-scroll-area {
        overflow-y: auto; /* Scroll apenas dentro da coluna */
        height: 100%;
    }
    /* Garante que o formulário ocupe a altura total para empurrar o botão para baixo */
    .form-desktop-height {
        min-height: 100%;
    }
}

/*====================================================================================*/

/* === CLASSE UNIVERSAL PARA MODAIS INTELIGENTES === */

/* 1. Faz o modal ocupar altura fixa no Desktop e organiza o scroll */
@media (min-width: 992px) {
    .modal-universal .modal-content {
        height: 80vh; /* Altura padrão confortável */
        display: flex;
        flex-direction: column;
        overflow: hidden; /* Evita scroll duplo */
    }

    .modal-universal .modal-body {
        overflow-y: auto; /* Scroll SÓ no corpo */
        flex-grow: 1;     /* Ocupa todo o espaço disponível */
    }
    
    /* Personaliza a barra de rolagem para ficar bonita */
    .modal-universal .modal-body::-webkit-scrollbar { width: 8px; }
    .modal-universal .modal-body::-webkit-scrollbar-track { background: #f1f1f1; }
    .modal-universal .modal-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
    .modal-universal .modal-body::-webkit-scrollbar-thumb:hover { background: #999; }
}

/* 2. No Mobile/Tablet, deixa o modal crescer naturalmente */
@media (max-width: 991px) {
    .modal-universal .modal-content {
        height: auto !important;
        max-height: 95vh;
        display: flex;
        flex-direction: column;
    }
    .modal-universal .modal-body {
        overflow-y: auto;
    }
}

/* 3. Classe auxiliar para quando o modal for Maximizado via JS */
.modal-fullscreen-force .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
    height: 100vh !important;
}

.modal-fullscreen-force .modal-content {
    height: 100vh !important;
    border-radius: 0 !important;
}

/*------------------------------*/

.cursor-pointer {
    cursor: pointer;
}
.modal-fullscreen .modal-body {
    padding: 0; /* Remove padding para o header fixo funcionar bem */
    background-color: #f8f9fa;
}

/*===================================*/

/* --- EVENT MANAGEMENT MODULE STYLES --- */

/* Cards with hover effect */
.evt-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff; /* White card */
}
.evt-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important; /* Premium shadow */
}

/* Header Icons in Cards */
.evt-header-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 12px;
    font-size: 1.2rem;
}

/* Labels */
.evt-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b; /* Slate-500 */
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

/* Premium Inputs */
.evt-input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 600;
    color: #1e293b; /* Slate-800 */
    background-color: #f8fafc; /* Slate-50 */
    transition: all 0.2s;
}
.evt-input:focus {
    background-color: #ffffff;
    border-color: #4f46e5; /* Indigo-600 */
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* List Items */
.list-item-premium {
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
    transition: all 0.2s;
}
.list-item-premium:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

/* Active State for Kit Selection */
.kit-active {
    border-left: 4px solid #4f46e5 !important;
    background-color: #eef2ff !important; /* Indigo-50 */
}

/* Custom Scrollbar */
.custom-scroll::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

/*================================*/

/* ==========================================================================
   ESTILOS PREMIUM - MÓDULO DE EVENTOS
   ========================================================================== */

/* Fundo e Layout */
.evt-bg {
    background-color: #f3f4f6; /* Cinza claro moderno */
    min-height: 90vh;
}

/* Cards Premium */
.evt-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Força altura total */
    position: relative; /* Para posicionamento absoluto se necessário */
    overflow: hidden; /* Evita scroll duplo */
}
.evt-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.06); 
}

/* O Card Pai (Direita) */
.evt-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden; /* Garante que nada vaze */
}

/* Tipografia */
.evt-title { 
    font-family: 'Segoe UI', sans-serif; 
    font-weight: 700; 
    color: #1e293b; 
    letter-spacing: -0.5px; 
}
.evt-subtitle { 
    font-size: 0.85rem; 
    color: #64748b; 
    font-weight: 500; 
}
.evt-label { 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #94a3b8; 
    margin-bottom: 6px; 
    display: block; 
    letter-spacing: 0.5px; 
}

/* Inputs Modernos */
.evt-input {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 600;
    background-color: #f8fafc;
    transition: all 0.2s;
}
.evt-input:focus {
    background-color: white;
    border-color: #6366f1; /* Cor Indigo */
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Ícones e Botões */
.evt-icon-box {
    width: 48px; 
    height: 48px;
    border-radius: 12px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
}
.btn-premium {
    border-radius: 10px; 
    font-weight: 700; 
    padding: 10px 20px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    font-size: 0.8rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}
.btn-premium:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); 
}

/* Painéis de Conteúdo (Vazio e Editor) */
#emptyStateKit, #detalhesKitPainel {
    flex-grow: 1; /* Ocupa todo o espaço disponível */
    width: 100%;
    height: 100%;
}

/* Correção das Abas (IMPORTANTE) */
/* Esconde todas as abas personalizadas por padrão */
/* Correção das Abas Principais */
.tab-pane-custom {
    display: none; /* Esconde por padrão */
    height: 100%; /* Garante altura total */
}
/* A classe que será adicionada via JS para mostrar */
.tab-pane-custom.active-tab {
    display: block !important;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Navegação de Abas */
.nav-pills .nav-link.active { 
    background-color: #1e293b !important; 
    color: white !important; 
    box-shadow: 0 4px 10px rgba(30, 41, 59, 0.2);
}
.nav-pills .nav-link { 
    color: #64748b; 
    font-weight: 600; 
    padding: 10px 25px; 
    border-radius: 50px; 
    transition: all 0.2s;
}

/* Os Painéis Filhos (Vazio e Editor) */
#emptyStateKit, #detalhesKitPainel {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    /* Centralização padrão */
    justify-content: center; 
    align-items: center;
}

/* Ajuste específico para o painel de edição ocupar o topo */
#detalhesKitPainel {
    justify-content: flex-start !important; /* Começa do topo */
    align-items: stretch !important; /* Estica a largura */
}

/*================*/

/* ============================================================
   1. CORREÇÕES DO SISTEMA (ABAS E ESTRUTURA)
   ============================================================ */

/* Garante que as abas do Bootstrap funcionem */
.tab-content > .tab-pane {
    display: none !important;
}
.tab-content > .active {
    display: block !important;
}

/* ============================================================
   2. TEMA CYBERPUNK & TR-069 (COMPILADO)
   ============================================================ */

:root {
    --cyber-bg: #0f111a;
    --cyber-panel: rgba(20, 25, 40, 0.98);
    --neon-green: #00ff88;
    --neon-blue: #00ccff;
    --neon-red: #ff3366;
    --neon-orange: #ffaa00;
    --glass-bg: rgba(23, 25, 35, 0.95);
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
}

/* --- A. DASHBOARD (CENTRAL DE COMANDO NA TELA PRINCIPAL) --- */

.command-center {
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 25px;
    color: #fff;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

/* Efeito de brilho no topo */
.command-center::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
}

.command-center .fiber-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.command-center .fiber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

/* Cards Holográficos (Usados na Dashboard e nos Modais) */
.command-center .holo-card,
.cyber-theme .holo-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    position: relative;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.command-center .holo-card:hover,
.cyber-theme .holo-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.1);
}

.holo-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a0a0a0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.holo-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.holo-unit {
    font-size: 0.75rem;
    color: #888;
    margin-top: -2px;
}

/* Barras de Progresso */
.tech-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.3);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}
.tech-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 8px currentColor;
}

/* Status Colors (Com !important para garantir a cor forte) */
.status-good { color: var(--neon-green) !important; text-shadow: 0 0 5px rgba(0,255,136,0.3); }
.status-warn { color: var(--neon-orange) !important; text-shadow: 0 0 5px rgba(255,170,0,0.3); }
.status-bad { color: var(--neon-red) !important; text-shadow: 0 0 5px rgba(255,51,102,0.3); }

/* Botões da Dashboard */
.command-center .action-deck {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* --- B. MODAIS CYBERPUNK (AQUI ESTÁ A CORREÇÃO DO BRANCO) --- */
/* Só afeta modais com a classe .cyber-theme */

.modal.cyber-theme .modal-content {
    background-color: #0f111a !important; /* FORÇA PRETO */
    background-image: linear-gradient(145deg, #13151f 0%, #090a10 100%) !important;
    border: 1px solid rgba(0, 204, 255, 0.3) !important; /* Borda Neon Azul */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8) !important;
    color: #fff !important; /* Texto Branco */
}

.modal.cyber-theme .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.1) 0%, transparent 100%);
}

.modal.cyber-theme .modal-title {
    color: var(--neon-cyan) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.modal.cyber-theme .btn-close {
    filter: invert(1) brightness(200%) !important; /* X Branco */
    opacity: 1 !important;
}

/* --- C. INPUTS E TABELAS (CORREÇÃO DE CONTRASTE) --- */

/* Inputs Escuros e Brilhantes */
.cyber-theme .form-control, 
.cyber-theme .form-select,
.command-center .form-control {
    background-color: rgba(0, 0, 0, 0.5) !important; /* Fundo escuro */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important; /* Letra branca */
    font-family: 'Consolas', 'Monaco', monospace;
    transition: all 0.3s ease;
}

.cyber-theme .form-control:focus, 
.cyber-theme .form-select:focus,
.command-center .form-control:focus {
    background-color: rgba(0, 0, 0, 0.8) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2) !important;
}

/* Labels e Textos */
.cyber-theme .form-label {
    color: var(--neon-cyan) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Tabelas Escuras */
.cyber-theme .table {
    color: #ddd !important;
    background-color: transparent !important;
}
.cyber-theme .table thead th {
    border-bottom: 1px solid var(--neon-blue) !important;
    color: var(--neon-blue) !important;
    background-color: rgba(0,0,0,0.2) !important;
}
.cyber-theme .table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* Abas (Nav Tabs) */
.cyber-theme .nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.cyber-theme .nav-link {
    color: var(--text-muted) !important;
    border: none !important;
}
.cyber-theme .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.05) !important;
}
.cyber-theme .nav-link.active {
    background: transparent !important;
    color: var(--neon-cyan) !important;
    border-bottom: 2px solid var(--neon-cyan) !important;
    font-weight: bold;
}

/* Setores (Caixas internas) */
.cyber-sector {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

/* Botões Neon Gerais */
.cyber-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}
.cyber-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-2px);
    color: #fff;
}
.cyber-btn.primary {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    background: rgba(0, 204, 255, 0.1);
}
.cyber-btn.primary:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.4);
}
.cyber-btn.danger {
    border-color: var(--neon-red);
    color: var(--neon-red);
    background: rgba(255, 51, 102, 0.1);
}
.cyber-btn.danger:hover {
    background: var(--neon-red);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.4);
}

/*-------------------------------------*/

/* Cor do texto de placeholder (Dica) dentro da Central de Comando */
.command-center input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: italic;
}

/* Garante que o input tenha texto branco ao digitar */
.command-center input {
    color: #ffffff !important;
    background-color: rgba(0,0,0,0.5) !important;
}


/*-----------------------------------------------*/

/* --- CORREÇÃO GLOBAL PARA MODAIS CYBER --- */

/* ==========================================================================
   CORREÇÃO ESPECÍFICA: MODAL SPEEDTEST (VELOCÍMETRO)
   ========================================================================== */

/* 1. Força texto branco em tudo dentro do overlay do Speedtest */
#speedModalOverlay,
#speedModalOverlay div,
#speedModalOverlay span,
#speedModalOverlay h5 {
    color: #ffffff !important;
}

/* 2. Corrige especificamente o "text-muted" que estava ficando preto/invisível */
#speedModalOverlay .text-muted {
    color: #e0e0e0 !important; /* Um cinza bem clarinho quase branco */
    text-shadow: 0 0 5px rgba(0,0,0,0.5); /* Sombra para destacar do fundo neon */
}

/* 3. Garante que o botão "Sair" (Outline) tenha texto visível */
#speedModalOverlay .btn-outline-light {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* 4. Efeito especial no ícone do velocímetro */
#speedModalOverlay i.fa-tachometer-alt {
    /* Mantém a cor rosa definida no HTML, mas reforça o brilho */
    filter: drop-shadow(0 0 10px var(--neon-pink));
}

/* ==========================================================================
   CORREÇÃO FINAL: BOTÃO INICIAR DO SPEEDTEST
   ========================================================================== */

/* Força o texto do botão ser SEMPRE branco */
#speedModalOverlay #btnStartSpeed {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* Sombra leve para leitura */
}

/* Garante que o fundo continue Rosa Neon mesmo se o mouse sair */
#speedModalOverlay #btnStartSpeed {
    background-color: var(--neon-pink, #ff007f) !important; /* Fallback se a var falhar */
    opacity: 1 !important;
}

/*----------------------------------------------------------------*/

/* =================================================================
   TOOLTIPS (BALÃO DE AJUDA) - ESTILO CYBERPUNK
   ================================================================= */
.info-icon {
    display: inline-block;
    margin-left: 5px;
    color: #00f3ff; /* Azul Neon */
    cursor: help;
    font-size: 0.8rem;
    position: relative;
}

.info-icon:hover::after {
    content: attr(data-tooltip); /* Pega o texto do atributo */
    position: absolute;
    bottom: 120%; /* Aparece em cima */
    left: 50%;
    transform: translateX(-50%);
    background: #0f111a; /* Fundo Preto */
    border: 1px solid #00f3ff;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: pre-wrap; /* Permite quebrar linha */
    width: 200px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    z-index: 1000;
    font-weight: normal;
    line-height: 1.4;
    pointer-events: none; /* O mouse não atrapalha */
}

/* Triângulo do balão */
.info-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 90%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #00f3ff transparent transparent transparent;
    z-index: 1000;
}