/* ==========================================================================
   CONTROLBOX - MAIN STYLES (VERSÃO FINAL INDUSTRIAL)
   Estrutura: Flexbox Layout
   Cores: Fundo Laranja/Cinza, TEXTO SEMPRE PRETO (#000)
   ========================================================================== */

:root {
    --primary: #ff6600;       /* Laranja Forte (Destaques) */
    --primary-light: #ffcc80; /* Laranja Claro (Tabelas/Fundo) */
    --gray-dark: #999999;     /* Cinza Médio (Bordas) */
    --gray-light: #e0e0e0;    /* Cinza Claro (Sidebar/Fundo Zebra) */
    --bg-body: #f4f4f4;       /* Fundo Geral */
    --sidebar-width: 250px;
    --text-color: #000000;    /* PRETO ABSOLUTO */
}

/* --- 1. RESET E BASE (REGRA DE OURO: TEXTO PRETO) --- */
* { 
    box-sizing: border-box; 
}

body { 
    font-family: Arial, sans-serif; 
    background: var(--bg-body); 
    color: var(--text-color) !important; /* Força texto preto globalmente */
    margin: 0; 
    overflow-x: hidden; /* Evita rolagem lateral */
}

a { text-decoration: none; color: #000; }
ul { list-style: none; padding: 0; margin: 0; }

/* Forçar inputs e elementos de form a terem texto preto */
input, select, textarea, button {
    color: #000 !important;
    font-family: inherit;
}

/* --- 2. ESTRUTURA DE LAYOUT (FLEXBOX) --- */
.main-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* Topo Fixo */
.top-bar {
    background: #fff;
    border-bottom: 3px solid var(--primary);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* Container Principal (Sidebar + Conteúdo) */
.content-wrapper {
    display: flex;
    flex: 1; /* Ocupa o resto da altura */
}

/* Conteúdo da Página */
.content-area {
    flex: 1;
    padding: 25px;
    background: var(--bg-body);
    overflow-y: auto;
}

/* --- 3. SIDEBAR (MENU LATERAL) --- */
/* Fundo Cinza para garantir contraste com texto Preto */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gray-light); 
    border-right: 2px solid var(--gray-dark);
    display: flex;
    flex-direction: column;
}

.sidebar h3 {
    background: var(--primary); /* Laranja */
    color: #000 !important;
    margin: 0;
    padding: 15px;
    text-align: center;
    font-size: 1rem;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
}

.sidebar-links a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
    transition: background 0.2s;
}

.sidebar-links a:hover {
    background: var(--primary-light); /* Laranja Claro no Hover */
    padding-left: 25px; /* Efeito visual de movimento */
}

/* Destaques Especiais no Menu */
.sidebar .text-danger {
    color: #000 !important; /* Mantém preto */
    background: #ffcccc; /* Fundo avermelhado leve */
    border-top: 2px solid #000;
}
.sidebar .text-danger:hover {
    background: #ff9999;
}

/* --- 4. TABELAS INDUSTRIAIS --- */
table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
    border: 1px solid #000;
    margin-top: 15px;
}

th { 
    background: var(--primary); /* Laranja */
    color: #000 !important; 
    padding: 12px; 
    text-align: left; 
    text-transform: uppercase;
    border: 1px solid #000;
}

td { 
    padding: 10px; 
    border: 1px solid #999; 
    color: #000 !important; 
}

/* Efeito Zebra (Laranja Claro / Cinza Claro) */
tr:nth-child(odd) td { background-color: var(--primary-light) !important; }
tr:nth-child(even) td { background-color: #f2f2f2 !important; }
tr:hover td { background-color: #fff !important; cursor: pointer; }

/* --- 5. COMPONENTES VISUAIS --- */

/* Botões */
.btn, .btn-sm, button[type=submit] {
    background: var(--primary);
    color: #000 !important;
    border: 2px solid #000;
    padding: 10px 20px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-block;
    box-shadow: 2px 2px 0px #000; /* Sombra sólida industrial */
}

.btn:hover {
    background: #e65c00;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #000;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    background: #fff; /* Botão pequeno branco */
    border: 1px solid #000;
}
.btn-sm:hover { background: var(--primary-light); }

/* Cards (Caixas Brancas) */
.bg-white-card { 
    background: white; 
    padding: 20px; 
    border: 2px solid #000; 
    border-radius: 0; /* Canto reto = Industrial */
    margin-bottom: 20px;
}

/* Dropzone (Upload) */
.drop-area {
    border: 3px dashed #000;
    background: var(--gray-light);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
}
.drop-area:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

/* --- 6. UTILITÁRIOS --- */
.d-flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-center { text-align: center; }
.m-0 { margin: 0; }
.mb-10 { margin-bottom: 10px; }
.font-bold { font-weight: bold; }

/* Top Bar Itens */
.logo-box { display: flex; align-items: center; }
.logo-title { margin-left: 15px; color: #000; }
.user-info { display: flex; align-items: center; gap: 15px; }
.lang-selector a { font-size: 1.5rem; margin: 0 5px; filter: grayscale(100%); }
.lang-selector a.active, .lang-selector a:hover { filter: grayscale(0%); }

/* Mobile */
@media (max-width: 768px) {
    .content-wrapper { flex-direction: column; }
    .sidebar { width: 100%; display: none; }
    .sidebar.active { display: flex; }
}
/* --- CLASSES DE SUPORTE (Para remover Inline do PHP) --- */

/* Alertas de Sucesso */
.alert-box {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #000;
    font-weight: bold;
}
.alert-box.success {
    background: #d4edda; /* Verde claro padrão */
    color: #000 !important;
}

/* Ícones e Textos */
.icon-lg { font-size: 24px; }
.box-desc { 
    font-size: 0.85rem; 
    margin-top: 5px; 
    color: #444 !important; /* Cinza escuro para diferenciar do título */
}

