
body {
    font-family: 'Arial', sans-serif;
}

/* Container principal para os elementos */
.container {
    display: flex;
    flex-direction: row;
    width: 100%;
}

/* Para controle responsivo e espaÃ§amento */
.row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
}


/* *************************** */

.custom-container {
    padding: 20px;
    background-color: #f8f9fa;
}

/* Caixa de informaÃ§Ãµes no topo */
.custom-show {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Layout flexÃ­vel */
.main-content {
    display: flex;
    gap: 20px;
    flex-direction: row;
}

/* Caixa de Pesquisa */
.search-box {
    width: 30%;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #dddddd;
}

/* Caixa Lateral de Resultados */
.box-lateral {
    width: 70%;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Parte superior de Resultados */
.box-lateral-1 {
    font-size: 18px;
    font-weight: bold;
}

/* Caixa de Resultados com scroll */
.result-box {
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid #dddddd;
    padding-top: 10px;
}

.result-item {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #dddddd;
}



/* ************************** */

/* CustomizaÃ§Ã£o do select ./wp-content/uploads/csv/modelo.csv */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url('./wp-content/themes/awaken/images/seta_down.png') no-repeat right center;
    padding-right: 20px;
}

form select.form-control {
    appearance: auto; /* Mostra a seta de seleÃ§Ã£o padrÃ£o */
    -webkit-appearance: auto; /* Para navegadores com Webkit */
    -moz-appearance: auto; /* Para navegadores com Mozilla */
    padding-right: 30px; /* Garante espaÃ§o suficiente para a seta */
}


.custom-alert {
    background-color: #dedad9;
    color: #000;
    border: 10px solid #dedad9;
    padding: 10px;
    margin-bottom: 0px;
    border-radius: 5px;
}


/* BotÃ£o dentro do search-box */
.search-box button {
    background-color: #0056b3 !important;
    color: #fff !important;
    border: none;
    width: 100%;
    height: calc(2.25rem + 2px);
}

.search-box button:hover {
    background-color: #0069d9 !important;
}

/* TÃ­tulo do search-box */
.search-box h5 {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

/* Estilos para o box-lateral-2 */
.box-lateral-2 {
    min-height: 20px;
    max-height: 80px;
    margin-top: 10px;
    padding: 10px;
    background-color: transparent;
    box-sizing: border-box;
}

.result-box h5 {
    background-color: #f7f7f7;
    padding: 10px;
    margin: 0;
    font-weight: bold;
}

/* BotÃ£o de mais informaÃ§Ãµes */
.btn-more-info {
    background-color: #0069d9;
    color: white;
    border: none;
    padding: 10px 15px;
    text-align: center;
    cursor: pointer;
}

.btn-more-info:hover {
    background-color: #0069d9;
}

.custom-container {
    background-color: #f7f7f7;
    margin-top: 20px !important;
    margin-left: 20px !important;
}

/* Ajustes para responsividade */
@media (max-width: 768px) {
    .box-lateral, .search-box {
        width: 100%; /* Ocupam 100% em telas menores */
        margin-left: 0;
        order: initial;
    }
}


/* Inicio Container principal 19082025 */

/* custom-style.css */

/* Estilos gerais */
.custom-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Caixa de informaÃ§Ãµes no topo - padronizada */
.custom-show {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-show h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0056b3;
    font-size: 18px;
}

.custom-show p {
    font-size: 16px;
    line-height: 1.5;
}

/* Container principal - usando floats */
.main-content {
    overflow: hidden; /* Limpa os floats */
}

/* Caixa de pesquisa - usando float */
.search-box {
    float: left;
    width: 30%;
    min-width: 300px;
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.search-box h5 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #0056b3;
    font-weight: 500;
    font-size: 15px;
}

/* FormulÃ¡rios */
.form-group {
    margin-bottom: 8px;
}

.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 5px 8px;
    width: 100%;
    height: 34px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Labels */
.form-group label {
    font-size: 14px;
    margin-bottom: 3px;
    display: block;
    font-weight: 500;
}

/* BotÃµes */
.btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    height: 34px;
    line-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border: 1px solid transparent;
    font-size: 13px;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* BotÃ£o de documentos */
.document-button {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: 13px;
    height: 34px;
    line-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border: 1px solid transparent;
}

.document-button:hover {
    background-color: #0069d9;
}

/* Filtros selecionados */
.filtros-selecionados {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.filtros-selecionados h6 {
    margin-top: 0;
    margin-bottom: 6px;
    color: #0056b3;
    font-weight: 500;
    font-size: 14px;
}

.filtros-selecionados ul {
    padding-left: 15px;
}

.filtros-selecionados li {
    margin-bottom: 3px;
    font-size: 13px;
}

/* Caixa lateral - usando float */
.box-lateral {
    float: right;
    width: 68%;
    min-width: 400px;
}

.box-lateral-1 {
    background-color: #0056b3;
    color: white;
    padding: 18px;
    border-radius: 8px 8px 0 0;
    font-size: 1.3rem;
    font-weight: 500;
}

.result-box {
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: 650px;
    overflow-y: auto;
}

.result-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 15px;
}

.result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.result-item p {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 15px;
}

.result-item strong {
    color: #0056b3;
}

/* Mensagens informativas */
.info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #bee5eb;
}

/* Responsividade */
@media (max-width: 768px) {
    .search-box, .box-lateral {
        float: none;
        width: 100%;
    }
    
    .custom-container {
        padding: 10px;
    }
    
    .result-box {
        max-height: none;
    }
    
    /* Ajustes para mobile */
    .form-control {
        font-size: 14px;
        height: 40px;
    }
    
    .btn {
        height: 40px;
        font-size: 14px;
    }
    
    .document-button {
        height: 40px;
        font-size: 14px;
    }
}



/* Fim Container principal 19082025 */

// No final do arquivo, substitua o hook de ativação por:
register_activation_hook(__FILE__, function() {
    crud_licitacoes_load_users();
    crud_licitacoes_load_licitacoes();
    
    // Criar diretório CSS se não existir
    $css_dir = plugin_dir_path(__FILE__) . 'css';
    if (!file_exists($css_dir)) {
        mkdir($css_dir, 0755, true);
    }
    
    // Criar arquivo CSS
    $css_file = $css_dir . '/crud_licitacoes.css';
    $css_content = '
    /* Estilos para o CRUD de Licitações */
    .crud-licitacoes {
        font-family: Arial, sans-serif;
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }
    
    .dashboard-title {
        text-align: center;
        margin-bottom: 30px;
        color: #0056b3;
    }
    
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding: 15px;
        background-color: #f8f9fa;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .user-info {
        font-size: 16px;
    }
    
    .actions {
        display: flex;
        gap: 10px;
    }
    
    .btn {
        display: inline-block;
        padding: 8px 15px;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        text-decoration: none;
        font-weight: 500;
        transition: background-color 0.3s;
    }
    
    .btn:hover {
        background: #0069d9;
        text-decoration: none;
        color: white;
    }
    
    .btn-danger {
        background: #dc3545;
    }
    
    .btn-danger:hover {
        background: #c82333;
    }
    
    .btn-secondary {
        background: #6c757d;
    }
    
    .btn-secondary:hover {
        background: #5a6268;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 14px;
    }
    
    .btn-primary {
        background: #007bff;
    }
    
    .btn-primary:hover {
        background: #0069d9;
    }
    
    .btn-search {
        background: #28a745;
    }
    
    .btn-search:hover {
        background: #218838;
    }
    
    .btn-clear {
        background: #6c757d;
    }
    
    .btn-clear:hover {
        background: #5a6268;
    }
    
    .message {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 4px;
    }
    
    .message.success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }
    
    .message.error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }
    
    .search-section {
        margin-bottom: 30px;
        padding: 20px;
        background: #f8f9fa;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .search-form {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .search-input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ced4da;
        border-radius: 4px;
        font-size: 16px;
    }
    
    .search-info {
        margin-top: 10px;
        font-size: 14px;
        color: #6c757d;
    }
    
    .table-wrapper {
        overflow-x: auto;
    }
    
    .licitacoes-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border-radius: 5px;
        overflow: hidden;
    }
    
    .licitacoes-table th,
    .licitacoes-table td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #dee2e6;
    }
    
    .licitacoes-table th {
        background-color: #0056b3;
        color: white;
        font-weight: 500;
        text-transform: uppercase;
        font-size: 14px;
    }
    
    .licitacoes-table tr:nth-child(even) {
        background-color: #f8f9fa;
    }
    
    .licitacoes-table tr:hover {
        background-color: #f1f1f1;
    }
    
    .actions {
        display: flex;
        gap: 5px;
        white-space: nowrap;
    }
    
    .actions .btn {
        margin-right: 5px;
    }
    
    .no-data {
        padding: 30px;
        text-align: center;
        background-color: #f8f9fa;
        border-radius: 5px;
        color: #6c757d;
        font-size: 16px;
    }
    
    .crud-licitacoes-login {
        max-width: 400px;
        margin: 50px auto;
        padding: 30px;
        border: 1px solid #ddd;
        border-radius: 5px;
        background: #f9f9f9;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .crud-licitacoes-login h2 {
        text-align: center;
        margin-top: 0;
        margin-bottom: 25px;
        color: #0056b3;
    }
    
    .login-form .form-group {
        margin-bottom: 20px;
    }
    
    .login-form label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #333;
    }
    
    .login-form input[type="text"],
    .login-form input[type="password"] {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 16px;
    }
    
    .login-form .btn-primary {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
    
    .crud-licitacoes-form {
        max-width: 700px;
        margin: 0 auto;
        padding: 30px;
        border: 1px solid #ddd;
        border-radius: 5px;
        background: #f9f9f9;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .crud-licitacoes-form .form-group {
        margin-bottom: 20px;
    }
    
    .crud-licitacoes-form label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #333;
    }
    
    .crud-licitacoes-form input[type="text"],
    .crud-licitacoes-form input[type="number"],
    .crud-licitacoes-form select,
    .crud-licitacoes-form textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 16px;
    }
    
    .crud-licitacoes-form textarea {
        resize: vertical;
        min-height: 120px;
    }
    
    .form-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 30px;
    }
    
    /* Responsividade */
    @media (max-width: 768px) {
        .header {
            flex-direction: column;
            gap: 15px;
            text-align: center;
        }
        
        .actions {
            justify-content: center;
        }
        
        .search-form {
            flex-direction: column;
        }
        
        .search-input {
            margin-bottom: 10px;
        }
        
        .table-wrapper {
            overflow-x: scroll;
        }
        
        .licitacoes-table {
            min-width: 700px;
        }
        
        .actions {
            flex-direction: column;
        }
        
        .actions .btn {
            margin-right: 0;
            margin-bottom: 5px;
        }
    }
    ';
    
    file_put_contents($css_file, $css_content);
});