/* ================================================= */
/* ARQUIVO: admin.css (Estilos do Painel de Admin) */
/* Depende de global.css para as variáveis de cor */
/* ================================================= */

/* Estrutura do Layout (Sidebar + Conteúdo) */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --------------------
   1. Sidebar (Menu Lateral)
   -------------------- */
.sidebar {
    width: 250px;
    background-color: #1a1a1a; /* Fundo mais escuro para a Sidebar */
    border-right: 1px solid #343a40; 
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    position: fixed; 
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    text-align: center;
    padding: 0 20px 30px;
    border-bottom: 1px solid #343a40;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
}

.sidebar-header h3 {
    color: var(--advence-blue);
    font-size: 1.4em;
    margin: 0;
}

.sidebar-nav {
    flex-grow: 1; 
    padding-top: 10px;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: var(--advence-dark); /* Prata/Claro */
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 1em;
}

.nav-item:hover, .nav-item.active {
    background-color: #343a40; 
    color: var(--advence-light);
    border-left: 3px solid var(--advence-blue);
    padding-left: 17px;
}

hr {
    border: 0;
    height: 1px;
    background: #343a40;
    margin: 10px 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #343a40;
}

.btn-logout {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: #dc3545; 
    color: var(--advence-light);
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* --------------------
   2. Conteúdo Principal
   -------------------- */
.admin-content {
    margin-left: 250px; 
    width: calc(100% - 250px);
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #343a40;
}

/* --------------------
   3. Dashboard (Sondagem/Contadores)
   -------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    text-align: center;
    padding: 20px;
    color: var(--advence-light);
    box-shadow: var(--advence-shadow);
    border: none; 
    cursor: pointer;
}

.dashboard-card h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: var(--advence-light);
}

.card-count {
    font-size: 3em;
    font-weight: bold;
    margin: 10px 0;
}

/* Cores de Fundo para os Cards de Sondagem */
.bg-blue { background-color: var(--advence-blue); }
.bg-green { background-color: #28a745; } 
.bg-gold { background-color: var(--advence-gold); color: var(--advence-dark); }
.bg-red { background-color: #dc3545; } 

/* --------------------
   4. Tabela de Dados (Visão Geral - Apenas Visualização)
   -------------------- */
.tabela-contas {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.tabela-contas thead th {
    background-color: #343a40; 
    color: var(--advence-dark);
    padding: 12px 15px;
    text-align: left;
}

.tabela-contas tbody td {
    background-color: #2c2c2c; 
    border-bottom: 1px solid #343a40;
    padding: 12px 15px;
    color: var(--advence-dark);
}

.tabela-contas tbody tr:hover td {
    background-color: #343a40; 
}

/* Oculta coluna "Ações" da tabela de VISUALIZAÇÃO */
.tabela-view td:last-child,
.tabela-view thead th:last-child {
    display: none; 
}

/* Status Colors */
.status-ativo { color: #28a745; font-weight: bold; } 
.status-bloqueado { color: #dc3545; font-weight: bold; } 
.status-teste { color: var(--advence-gold); font-weight: bold; } 

/* Responsividade Básica */
@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
    }
    .admin-content {
        margin-left: 0;
        width: 100%;
    }
}

/* ================================================= */
/* ADIÇÕES AO ARQUIVO: admin.css (Contas Ativas) */
/* ================================================= */

/* --------------------
   5. Barra de Pesquisa e Inputs
   -------------------- */
.search-container {
    margin-bottom: 25px;
    display: flex;
    gap: 10px;
}
.search-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #343a40;
    color: var(--advence-dark);
    font-size: 1em;
    transition: border-color 0.3s;
}
.search-input:focus {
    border-color: var(--advence-blue);
    outline: none;
}
.search-button {
    /* Reutilizando estilos do btn-cta e search-button */
    background-color: var(--advence-blue);
    color: var(--advence-light);
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
}

/* Bloqueio Programado */
.bloqueio-programado {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #444;
}
.date-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #2c2c2c;
    color: var(--advence-dark);
    font-size: 0.9em;
    margin-top: 5px;
}


/* Estilos para o File Map */
.file-item {
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--advence-fundo-claro); /* Cor de fundo mais clara que o fundo principal */
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #3b3b3b; /* Escurece no hover */
}

.file-item.selected {
    background-color: var(--advence-blue); /* Cor azul para o selecionado */
    color: white;
    border: 1px solid var(--advence-blue);
}

.file-type-folder {
    font-weight: bold;
    cursor: default; /* Pastas não são clicáveis para seleção */
}